diff --git a/models/model.cpp b/models/model.cpp new file mode 100644 index 0000000..3c826ff --- /dev/null +++ b/models/model.cpp @@ -0,0 +1,61 @@ +#include "model.h" + +ModelObject::ModelObject() { + +} + +void ModelObject::clear() { + normal.clear(); + vertex.clear(); + mapcoord.clear(); + polygon.clear(); +} + +void ModelObject::calcNormales() { + normal.clear(); + Punkt3D a, b; + for(unsigned int i=0; i +#include +#include "../punkt2d.h" +#include "../punkt3d.h" +#include "../gltexture.h" +// #include "load3ds.h" + +class ModelObject { + friend class Load3ds; + private: + std::vector normal; + std::vector vertex; + std::vector mapcoord; + std::vector polygon; + void calcNormales(); + std::string name; + public: + ModelObject(); + + void render(); + void clear(); + +}; + +class Model { + private: + std::vector objects; + + + public: + Model(); + void addObject(ModelObject c); + void clear(); + void render(); +}; + +#endif