Changeset 6313 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Dec 27, 2005, 12:53:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/vertex_array_model.cc
r6310 r6313 52 52 this->setClassID(CL_MODEL, "VertexArrayModel"); 53 53 this->bFinalized = false; 54 55 // importing the data to the new Model. 56 this->newStripe(); 57 58 for (unsigned int i = 0; i < model.getVertexCount()*3; i+=3) 59 { 60 this->addVertex(model.getVertexArray()[i], model.getVertexArray()[i+1], model.getVertexArray()[i+2]); 61 } 62 for (unsigned int i = 0; i < model.getVertexCount()*3; i+=3) 63 this->addColor(model.getVertexArray()[i], model.getVertexArray()[i+1], model.getVertexArray()[i+2]); 64 for (unsigned int i = 0; i < model.getNormalsCount()*3; i+=3) 65 this->addNormal(model.getNormalsArray()[i], model.getNormalsArray()[i+1], model.getNormalsArray()[i+2]); 66 // for (unsigned int i = 0; i < model.getTexCoordCount(); i+=2) 67 // this->addTexCoor(model.getTexCoordArray()[i], model.getTexCoordArray()[i+1]); 68 for (unsigned int i = 0; i < model.getVertexCount()*2; i+=2) 69 this->addTexCoor(1,2); 70 54 71 55 72 // The acTC object generating this Model. // … … 64 81 actcBeginInput(tc); 65 82 for(unsigned int i = 0; i < model.getTriangleCount(); i++) 83 { 66 84 actcAddTriangle(tc, 67 85 model.getTriangles()[i].indexToVertices[0], 68 86 model.getTriangles()[i].indexToVertices[1], 69 87 model.getTriangles()[i].indexToVertices[2]); 88 } 70 89 actcEndInput(tc); 71 90 72 // importing the data to the new Model.73 this->newStripe();74 75 for (unsigned int i = 0; i < model.getVertexCount(); i+=3)76 this->addVertex(model.getVertexArray()[i], model.getVertexArray()[i+1], model.getVertexArray()[i+2]);77 for (unsigned int i = 0; i < model.getVertexCount(); i+=3)78 this->addColor(model.getVertexArray()[i], model.getVertexArray()[i+1], model.getVertexArray()[i+2]);79 for (unsigned int i = 0; i < model.getNormalsCount(); i+=3)80 this->addNormal(model.getNormalsArray()[i], model.getNormalsArray()[i+1], model.getNormalsArray()[i+2]);81 // for (unsigned int i = 0; i < model.getTexCoordCount(); i+=2)82 // this->addTexCoor(model.getTexCoordArray()[i], model.getTexCoordArray()[i+1]);83 for (unsigned int i = 0; i < model.getVertexCount(); i+=3)84 this->addTexCoor(1,2);85 91 86 92
Note: See TracChangeset
for help on using the changeset viewer.