Last change
on this file since 6028 was
6022,
checked in by bensch, 19 years ago
|
orxonox/trunk: merged the NewModel branche back to the trunk.
merged with command
svn merge branches/newModel/ trunk/ -r 6016:HEAD
no conflicts
|
File size:
1.3 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file vertex_array_model.h |
---|
3 | * @brief Contains the VertexArrayModel Class that handles 3D-Models rendered out of VertexArrays |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _VERTEX_ARRAY_MODEL_H |
---|
7 | #define _VERTEX_ARRAY_MODEL_H |
---|
8 | |
---|
9 | #include "model.h" |
---|
10 | |
---|
11 | #include "glincl.h" |
---|
12 | |
---|
13 | #include "array.h" |
---|
14 | #include <list> |
---|
15 | |
---|
16 | /* Forward Declaration */ |
---|
17 | class Material; |
---|
18 | |
---|
19 | |
---|
20 | ///////////// |
---|
21 | /// MODEL /// |
---|
22 | ///////////// |
---|
23 | //! Class that handles 3D-Models. it can also read them in and display them. |
---|
24 | class VertexArrayModel : public Model |
---|
25 | { |
---|
26 | public: |
---|
27 | VertexArrayModel(); |
---|
28 | virtual ~VertexArrayModel(); |
---|
29 | |
---|
30 | void draw() const; |
---|
31 | |
---|
32 | void addVertex(float x, float y, float z); |
---|
33 | |
---|
34 | void addNormal(float x, float y, float z); |
---|
35 | |
---|
36 | void addTexCoor(float u, float v); |
---|
37 | |
---|
38 | void addIndice(GLubyte indice); |
---|
39 | |
---|
40 | void finalize(); |
---|
41 | |
---|
42 | |
---|
43 | void cubeModel(); |
---|
44 | |
---|
45 | private: |
---|
46 | void importToVertexArray(); |
---|
47 | |
---|
48 | private: |
---|
49 | bool finalized; //!< Sets the Object to be finalized. |
---|
50 | |
---|
51 | tArray<GLfloat> vertices; //!< The Array that handles the Vertices. |
---|
52 | tArray<GLfloat> normals; //!< The Array that handles the Normals. |
---|
53 | tArray<GLfloat> texCoords; //!< The Array that handles the VertexTextureCoordinates. |
---|
54 | |
---|
55 | tArray<GLubyte> indices; //!< The Array that tells us what Vertex is connected to which other one. |
---|
56 | }; |
---|
57 | |
---|
58 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.