Changeset 694 for GTP/trunk/Lib/Vis/Preprocessing/src/X3dParser.cpp
- Timestamp:
- 03/15/06 08:59:33 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/X3dParser.cpp
r693 r694 54 54 static SAXParser::ValSchemes valScheme = SAXParser::Val_Auto; 55 55 56 56 #define ROTATE_SCENE 1 57 57 58 58 … … 83 83 StrX lname(name); 84 84 string element(lname.LocalForm()); 85 85 86 if (element == "Shape") 86 87 EndShape(); 87 88 } 88 89 89 // HACK 90 void RotateMesh(Mesh *mesh)91 { 92 VertexContainer:: const_iterator it, it_end = mesh->mVertices.end();90 91 static void RotateMesh(Mesh *mesh) 92 { 93 VertexContainer::iterator it, it_end = mesh->mVertices.end(); 93 94 94 95 const float angle = 30.0f * PI / 180.0f; 95 const Matrix4x4 rot = RotationYMatrix( 30);96 const Matrix4x4 rot = RotationYMatrix(angle); 96 97 97 98 for (it = mesh->mVertices.begin(); it != it_end; ++ it) 98 99 { 99 const Vector3 pt = rot * (*it);100 (*it) = rot * (*it); 100 101 } 101 102 } … … 124 125 125 126 mesh->mFaces.push_back(new Face(vc)); 126 if (0)127 //if (ROTATE_SCENE) 127 128 RotateMesh(mesh); 128 129 mesh->Preprocess(); … … 142 143 { 143 144 // HACK 144 if (0)145 //if (ROTATE_SCENE) 145 146 RotateMesh(mCurrentMesh); 146 147 mCurrentMesh->Preprocess(); … … 156 157 delete mCurrentMesh; 157 158 } 159 158 160 mCurrentMesh = NULL; 159 161 } … … 246 248 247 249 248 while (1)250 while (1) 249 251 { 250 252 float x = (float)strtod(ptr, &endptr); … … 298 300 StartIndexedFaceSet(attributes); 299 301 } 300 302 301 303 if (element == "Shape") { 302 cout <<"+";304 cout << "+"; 303 305 mCurrentMesh = new Mesh; 304 306 } … … 503 505 StrX lname(name); 504 506 string element(lname.LocalForm()); 507 505 508 if (element == "Shape") 506 509 EndShape();
Note: See TracChangeset
for help on using the changeset viewer.