Changeset 6453 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Jan 9, 2006, 11:11:59 PM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/vertex_array_model.cc
r6452 r6453 179 179 void VertexArrayModel::addVertex(float x, float y, float z) 180 180 { 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)); 184 182 this->pModelInfo.numVertices++; 185 183 } … … 196 194 void VertexArrayModel::addNormal(float x, float y, float z) 197 195 { 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)); 201 197 this->pModelInfo.numNormals++; 202 198 } … … 225 221 void VertexArrayModel::addColor(float r, float g, float b) 226 222 { 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)); 230 224 // FIXME 231 225 } … … 357 351 this->stripes.size(), 358 352 this->indices.size(), 359 this->vertices.size() /3,360 this->normals.size() /3,353 this->vertices.size(), 354 this->normals.size(), 361 355 this->texCoords.size()/2, 362 this->colors.size() ) /3;356 this->colors.size() ); 363 357 for (GLuint i = 1; i < this->stripes.size(); ++i) 364 358 { -
trunk/src/lib/graphics/importer/vertex_array_model.h
r6452 r6453 51 51 unsigned int indiceCount() const { return this->indices.size(); }; 52 52 53 float& vertex(unsigned int i) { return this->vertices[i]; };53 // float& vertex(unsigned int i) { return this->vertices[i]; }; 54 54 55 55 // … … 63 63 64 64 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. 69 69 70 70 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.