Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6452 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Jan 9, 2006, 10:42:56 PM (19 years ago)
Author:
bensch
Message:

trunk: vertexArrayModel minor functionality update

Location:
trunk/src/lib/graphics/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/vertex_array_model.cc

    r6314 r6452  
    3737  this->setClassID(CL_MODEL, "VertexArrayModel");
    3838
    39   this->bFinalized = false;
    4039  this->newStripe();
    4140}
     
    5150{
    5251  this->setClassID(CL_MODEL, "VertexArrayModel");
    53   this->bFinalized = false;
    54 
    55     // importing the data to the new Model.
     52
     53  // importing the data to the new Model.
    5654  this->newStripe();
    5755
     
    252250  // finalize the Arrays
    253251  this->newStripe();
    254   this->bFinalized = true;
    255252}
    256253
  • trunk/src/lib/graphics/importer/vertex_array_model.h

    r6310 r6452  
    4545  void finalize();
    4646
     47  unsigned int vertexCount() const { return this->vertices.size(); };
     48  unsigned int normalCount() const { return this->normals.size(); };
     49  unsigned int texCoordCount() const { return this->texCoords.size(); };
     50  unsigned int colorCount() const { return this->colors.size(); };
     51  unsigned int indiceCount() const { return this->indices.size(); };
     52
     53  float& vertex(unsigned int i) { return this->vertices[i]; };
     54
    4755  //
    4856  void planeModel(float sizeX, float sizeY, unsigned int resolutionX, unsigned int resolutionY);
     
    5563
    5664 private:
    57   bool                       bFinalized;       //!< Sets the Object to be finalized.
    58 
    59   std::vector<GLfloat>       vertices;        //!< The Array that handles the Vertices.
    60   std::vector<GLfloat>       normals;         //!< The Array that handles the Normals.
    61   std::vector<GLfloat>       texCoords;       //!< The Array that handles the VertexTextureCoordinates.
    62   std::vector<GLfloat>       colors;          //!< The Array that handles Colors.
     65  std::vector<float>       vertices;        //!< The Array that handles the Vertices.
     66  std::vector<float>       normals;         //!< The Array that handles the Normals.
     67  std::vector<float>       texCoords;       //!< The Array that handles the VertexTextureCoordinates.
     68  std::vector<float>       colors;          //!< The Array that handles Colors.
    6369
    6470  std::vector<GLuint>        indices;         //!< The Array that tells us what Vertex is connected to which other one.
Note: See TracChangeset for help on using the changeset viewer.