Changeset 3953 in orxonox.OLD for orxonox/branches/physics/src/lib/graphics/importer/primitive_model.cc
- Timestamp:
- Apr 25, 2005, 9:29:41 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/lib/graphics/importer/primitive_model.cc
r3684 r3953 33 33 PrimitiveModel::PrimitiveModel(PRIMITIVE type, float size, unsigned int detail) 34 34 { 35 this->initialize();36 37 35 switch (type) 38 36 { … … 54 52 break; 55 53 } 56 this->importToGL (); 57 58 this->cleanup(); 54 this->finalize(); 59 55 } 60 56 … … 123 119 { 124 120 v1 = vertexCount+1; 125 this->addFace(3, TEXCOORD, v1, v1, v3, v3, v4, v4);121 this->addFace(3, VERTEX_TEXCOORD, v1, v1, v3, v3, v4, v4); 126 122 } 127 123 else if (j == detail) 128 124 { 129 125 v3 = vertexCount+2; 130 this->addFace(3, TEXCOORD, v1, v1, v2, v2, v3, v3);126 this->addFace(3, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3); 131 127 } 132 128 else 133 this->addFace(4, TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);129 this->addFace(4, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4); 134 130 } 135 131 } … … 163 159 p1 = 2*i+1; 164 160 p2 = 2*i+2; 165 if (i <= detail);166 161 p3 = 2*i+4; 167 162 p4 = 2*i+3; 168 163 // something is wrong here 169 this->addFace(4, 0, p1, p2, p3, p4); 170 this->addFace(3, 0, p4, p1, 2*detail+1); 171 this->addFace(3, 0, p2, p3, 2*detail+2); 172 } 173 addFace(4,0, 2*detail-1, 2*detail, 2, 1); 174 this->addFace(3, VERTEX, 1, 2*detail-1, 2*detail+1); 175 this->addFace(3, VERTEX, 2*detail, 2, 2*detail+2); 164 this->addFace(4, VERTEX_ONLY, p1, p2, p3, p4); 165 this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail+1); 166 this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+2); 167 } 168 // caps 169 this->addFace(4, VERTEX_ONLY, 2*detail-1, 2*detail, 2, 1); 170 this->addFace(3, VERTEX_ONLY, 1, 2*detail-1, 2*detail+1); 171 this->addFace(3, VERTEX_ONLY, 2*detail, 2, 2*detail+2); 176 172 } 177 173 … … 207 203 else 208 204 v2 = i+4; 209 this->addFace(3, VERTEX , 1, v1, v2);210 this->addFace(3, VERTEX , 2, v1, v2);205 this->addFace(3, VERTEX_ONLY, 1, v1, v2); 206 this->addFace(3, VERTEX_ONLY, 2, v1, v2); 211 207 } 212 208 } … … 238 234 v3 = (i+1)*detail + (j+1); 239 235 v4 = i*detail + (j+1); 240 this->addFace(4, TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);236 this->addFace(4, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4); 241 237 } 242 238 }
Note: See TracChangeset
for help on using the changeset viewer.