Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/newModel/src/lib/graphics/importer/vertex_array_model.h @ 6021

Last change on this file since 6021 was 6021, checked in by bensch, 18 years ago

newModel new static_model class added

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 */
17class Material;
18
19
20/////////////
21/// MODEL ///
22/////////////
23//! Class that handles 3D-Models. it can also read them in and display them.
24class 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.