Changeset 1001 for GTP/trunk/Lib/Vis/Preprocessing/src/VrmlExporter.cpp
- Timestamp:
- 06/05/06 23:14:04 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/VrmlExporter.cpp
r863 r1001 24 24 } 25 25 26 26 27 VrmlExporter::~VrmlExporter() 27 28 { … … 31 32 32 33 bool VrmlExporter::ExportRays(const RayContainer &rays, 33 const float length,34 const RgbColor &color)34 const float length, 35 const RgbColor &color) 35 36 { 36 37 RayContainer::const_iterator ri = rays.begin(); … … 115 116 for (; ri != rays.end(); ri++) { 116 117 const Vector3 a = (*ri)->GetOrigin(); 117 //const Vector3 b = (*ri)->mTerminationObject ? (*ri)->GetTermination() : a + 1000 * Normalize((*ri)->GetDir());118 const Vector3 b = (*ri)->GetTermination(); // matt: change again!!118 const Vector3 b = (*ri)->mTerminationObject ? (*ri)->GetTermination() : a + 1000 * Normalize((*ri)->GetDir()); 119 //const Vector3 b = (*ri)->GetTermination(); // matt: change back!! 119 120 120 121 stream<<a.x<<" "<<a.y<<" "<<a.z<<" ,"; … … 152 153 } 153 154 155 154 156 void VrmlExporter::ExportIntersectable(Intersectable *object) 155 157 { 156 158 switch (object->Type()) 157 159 { 158 159 160 case Intersectable::MESH_INSTANCE: 161 ExportMeshInstance((MeshInstance *)object); 162 break; 160 163 case Intersectable::TRANSFORMED_MESH_INSTANCE: 161 Export MeshInstance((MeshInstance *)object);164 ExportTransformedMeshInstance(dynamic_cast<TransformedMeshInstance *>(object)); 162 165 break; 163 166 case Intersectable::VIEW_CELL: … … 180 183 181 184 185 void VrmlExporter::ExportTransformedMeshInstance(TransformedMeshInstance *mi) 186 { 187 Mesh mesh(*mi->GetMesh()); 188 189 Matrix4x4 m; 190 mi->GetWorldTransform(m); 191 mesh.ApplyTransformation(m); 192 193 ExportMesh(&mesh); 194 } 195 196 182 197 void VrmlExporter::ExportViewCells(const ViewCellContainer &viewCells) 183 198 { … … 189 204 } 190 205 } 206 191 207 192 208 void VrmlExporter::ExportBspLeaves(const BspTree &tree, const int maxPvs) … … 290 306 stream << "}" << endl; // end material 291 307 stream << "}" << endl; // end apperance 292 //stream << "}" << endl; // end shape 293 308 294 309 295 310 // wireframe modes => set indexed lines … … 314 329 { 315 330 Face *face = *fi; 316 331 317 332 VertexIndexContainer::const_iterator vi = face->mVertexIndices.begin(); 318 319 for (; vi != face->mVertexIndices.end(); vi++)333 334 for (; vi != face->mVertexIndices.end(); ++ vi) 320 335 { 321 336 stream << *vi << " "; … … 331 346 332 347 stream << "]" << endl; // end coordIndex 333 348 334 349 335 350 stream << "coord Coordinate {" << endl; … … 385 400 stream << "}" << endl; // end material 386 401 stream << "}" << endl; // end apperance 387 //stream << "}" << endl; // end shape 388 402 389 403 390 404 // wireframe modes => set indexed lines
Note: See TracChangeset
for help on using the changeset viewer.