/*! * @file vertex_array_model.h * @brief Contains the VertexArrayModel Class that handles 3D-Models rendered out of VertexArrays */ #ifndef _VERTEX_ARRAY_MODEL_H #define _VERTEX_ARRAY_MODEL_H #include "model.h" #include "glincl.h" #include /* Forward Declaration */ class Material; ///////////// /// MODEL /// ///////////// //! Class that handles 3D-Models. it can also read them in and display them. /** * this renders models with help of the OpenGL glVertexArray */ class VertexArrayModel : public Model { public: VertexArrayModel(); virtual ~VertexArrayModel(); void draw() const; void newStripe(); void addVertex(float x, float y, float z); void addNormal(float x, float y, float z); void addTexCoor(float u, float v); void addColor(float r, float g, float b); void addIndice(GLuint indice); void finalize(); // void planeModel(); void spiralSphere(const float radius, const unsigned int loops, const unsigned int segmentsPerLoop); void debug() const; private: void importToVertexArray(); private: bool bFinalized; //!< Sets the Object to be finalized. std::vector vertices; //!< The Array that handles the Vertices. std::vector normals; //!< The Array that handles the Normals. std::vector texCoords; //!< The Array that handles the VertexTextureCoordinates. std::vector colors; //!< The Array that handles Colors. std::vector indices; //!< The Array that tells us what Vertex is connected to which other one. std::vector stripes; //!< A lsit of Stripes of this Model. }; #endif