Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6453 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Jan 9, 2006, 11:11:59 PM (19 years ago)
Author:
bensch
Message:

trunk Vectors instead of floats used in VertexArrayModel

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

Legend:

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

    r6452 r6453  
    179179void VertexArrayModel::addVertex(float x, float y, float z)
    180180{
    181   this->vertices.push_back(x);
    182   this->vertices.push_back(y);
    183   this->vertices.push_back(z);
     181  this->vertices.push_back(Vector(x,y,z));
    184182  this->pModelInfo.numVertices++;
    185183}
     
    196194void VertexArrayModel::addNormal(float x, float y, float z)
    197195{
    198   this->normals.push_back(x);
    199   this->normals.push_back(y);
    200   this->normals.push_back(z);
     196  this->normals.push_back(Vector(x,y,z));
    201197  this->pModelInfo.numNormals++;
    202198}
     
    225221void VertexArrayModel::addColor(float r, float g, float b)
    226222{
    227   this->colors.push_back(r);
    228   this->colors.push_back(g);
    229   this->colors.push_back(b);
     223  this->colors.push_back(Vector(r,g,b));
    230224  // FIXME
    231225}
     
    357351            this->stripes.size(),
    358352            this->indices.size(),
    359             this->vertices.size()/3,
    360             this->normals.size()/3,
     353            this->vertices.size(),
     354            this->normals.size(),
    361355            this->texCoords.size()/2,
    362             this->colors.size() )/3;
     356            this->colors.size() );
    363357  for (GLuint i = 1; i < this->stripes.size(); ++i)
    364358  {
  • trunk/src/lib/graphics/importer/vertex_array_model.h

    r6452 r6453  
    5151  unsigned int indiceCount() const { return this->indices.size(); };
    5252
    53   float& vertex(unsigned int i) { return this->vertices[i]; };
     53//  float& vertex(unsigned int i) { return this->vertices[i]; };
    5454
    5555  //
     
    6363
    6464 private:
    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.
     65  std::vector<Vector>        vertices;        //!< The Array that handles the Vertices.
     66  std::vector<Vector>        normals;         //!< The Array that handles the Normals.
     67  std::vector<float>         texCoords;       //!< The Array that handles the VertexTextureCoordinates.
     68  std::vector<Vector>        colors;          //!< The Array that handles Colors.
    6969
    7070  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.