- Timestamp:
- Feb 7, 2006, 1:57:54 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/md2Model.cc
r7059 r7068 91 91 92 92 this->debug(); 93 } 93 94 //write the modelinfo information 95 this->pModelInfo.numVertices = this->data->numVertices; 96 this->pModelInfo.numTriangles = this->data->numTriangles; 97 this->pModelInfo.numNormals = 0; 98 this->pModelInfo.numTexCoor = this->data->numTexCoor; 99 this->pModelInfo.pVertices = (float*)this->data->pVertices; 100 this->pModelInfo.pNormals = NULL; 101 this->pModelInfo.pTexCoor = (float*)this->data->pTexCoor; 102 103 // triangle conversion 104 this->pModelInfo.pTriangles = new sTriangleExt[this->data->numTriangles]; 105 for( int i = 0; i < this->data->numTriangles; i++) 106 { 107 this->pModelInfo.pTriangles[i].indexToVertices[0] = this->data->pTriangles[i].indexToVertices[0]; 108 this->pModelInfo.pTriangles[i].indexToVertices[1] = this->data->pTriangles[i].indexToVertices[1]; 109 this->pModelInfo.pTriangles[i].indexToVertices[2] = this->data->pTriangles[i].indexToVertices[2]; 110 111 this->pModelInfo.pTriangles[i].indexToTexCoor[0] = this->data->pTriangles[i].indexToTexCoor[0]; 112 this->pModelInfo.pTriangles[i].indexToTexCoor[1] = this->data->pTriangles[i].indexToTexCoor[1]; 113 this->pModelInfo.pTriangles[i].indexToTexCoor[2] = this->data->pTriangles[i].indexToTexCoor[2]; 114 } 115 } 116 94 117 95 118 /** -
trunk/src/world_entities/world_entity.cc
r7055 r7068 166 166 //this->setModel((Model*)ResourceManager::getInstance()->load(fileName, MD2, RP_CAMPAIGN), 0); 167 167 this->setModel(m, 0); 168 169 if( m != NULL) 170 this->buildObbTree(4); 168 171 } 169 172 }
Note: See TracChangeset
for help on using the changeset viewer.