From 4db04f28c7e7fe30e895f9db9d69413e16dd8e5c Mon Sep 17 00:00:00 2001 From: seba Date: Fri, 11 Apr 2008 16:43:46 +0200 Subject: [PATCH] modelobject --- models/model.cpp | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ models/model.h | 40 +++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 models/model.cpp create mode 100644 models/model.h 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