Changeset 1221 for GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
- Timestamp:
- 08/18/06 19:28:12 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r1201 r1221 14 14 #include "SamplingStrategy.h" 15 15 #include "VspOspTree.h" 16 16 #include "ObjParser.h" 17 #include "ArchModeler2MLRT.hxx" 17 18 18 19 … … 93 94 scene->mRoot->UpdateBox(); 94 95 } 95 96 // plane separating view space regions 96 97 97 if (1) 98 98 { 99 // plane separating view space regions 99 100 const Vector3 scale(1.0f, 0.0, 0); 100 101 … … 133 134 Environment::GetSingleton()->GetBoolValue("Preprocessor.detectEmptyViewSpace", mDetectEmptyViewSpace); 134 135 Environment::GetSingleton()->GetBoolValue("Preprocessor.exportVisibility", mExportVisibility ); 136 Environment::GetSingleton()->GetIntValue("Preprocessor.rayCastMethod", mRayCastMethod); 135 137 136 138 char buffer[256]; … … 220 222 if (strstr(filename.c_str(), ".ply") || strstr(filename.c_str(), ".plb")) 221 223 parser = new PlyParser; 222 else 223 parser = new UnigraphicsParser; 224 else if (strstr(filename.c_str(), ".obj")) 225 parser = new ObjParser; 226 else 227 parser = new UnigraphicsParser; 224 228 225 229 cout<<filename<<endl; 226 result = parser->ParseFile(filename, &mSceneGraph->mRoot, mLoadPolygonsAsMeshes); 230 231 if (mRayCastMethod == Preprocessor::INTEL_RAYCASTER) 232 result = parser->ParseFile(filename, &mSceneGraph->mRoot, mLoadPolygonsAsMeshes, &mFaceParents); 233 else 234 result = parser->ParseFile(filename, &mSceneGraph->mRoot, mLoadPolygonsAsMeshes); 227 235 228 236 delete parser; … … 234 242 if (strstr(filenames[i].c_str(), ".x3d")) 235 243 parser = new X3dParser; 236 else 244 else 237 245 parser = new UnigraphicsParser; 238 246 239 247 SceneGraphNode *node; 240 248 if (parser->ParseFile(filenames[i], &node)) { … … 736 744 return NULL; 737 745 } 746 738 747 // should never come here 739 748 return NULL; … … 741 750 742 751 743 } 752 bool Preprocessor::InitRayCast(const string externKdTree) 753 { 754 switch (mRayCastMethod) // use intel ray tracing 755 { 756 case INTEL_RAYCASTER: 757 return mlrtaLoadAS(externKdTree.c_str()); 758 case INTERNAL_RAYCASTER: 759 default: 760 break; 761 } 762 763 return true; 764 } 765 766 }
Note: See TracChangeset
for help on using the changeset viewer.