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
RevLine 
[2823]1/*!
[6010]2 * @file vertex_array_model.h
3 * @brief Contains the VertexArrayModel Class that handles 3D-Models rendered out of VertexArrays
4 */
[2823]5
[6010]6#ifndef _VERTEX_ARRAY_MODEL_H
7#define _VERTEX_ARRAY_MODEL_H
[2773]8
[6021]9#include "model.h"
[5701]10
[3917]11#include "glincl.h"
[6009]12
[4577]13#include "array.h"
[5774]14#include <list>
[2748]15
[6010]16/* Forward Declaration */
17class Material;
[3427]18
[6010]19
[4022]20/////////////
21/// MODEL ///
22/////////////
23//! Class that handles 3D-Models. it can also read them in and display them.
[6021]24class VertexArrayModel : public Model
[4022]25{
[3398]26 public:
[6010]27  VertexArrayModel();
28  virtual ~VertexArrayModel();
[3910]29
[4746]30  void draw() const;
[3910]31
[6010]32  void addVertex(float x, float y, float z);
[3913]33
[6010]34  void addNormal(float x, float y, float z);
[6008]35
[6010]36  void addTexCoor(float u, float v);
[6008]37
[6010]38  void addIndice(GLubyte indice);
[4106]39
[6010]40  void finalize();
[4468]41
42
[6010]43  void cubeModel();
[4468]44
45 private:
[6012]46  void importToVertexArray();
[4468]47
48 private:
[5774]49  bool                       finalized;       //!< Sets the Object to be finalized.
[4468]50
[6008]51  tArray<GLfloat>            vertices;        //!< The Array that handles the Vertices.
52  tArray<GLfloat>            normals;         //!< The Array that handles the Normals.
[6010]53  tArray<GLfloat>            texCoords;       //!< The Array that handles the VertexTextureCoordinates.
[4468]54
[6010]55  tArray<GLubyte>            indices;         //!< The Array that tells us what Vertex is connected to which other one.
[2748]56};
[2773]57
58#endif
Note: See TracBrowser for help on using the repository browser.