Changeset 860
- Timestamp:
- 04/28/06 18:42:54 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis
- Files:
-
- 2 added
- 104 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/scripts/Plugin_VisibilitySceneManager.vcproj
r850 r860 88 88 EnableFiberSafeOptimizations="TRUE" 89 89 OptimizeForProcessor="2" 90 AdditionalIncludeDirectories=""$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Dependencies\include";..\include;..\..\..\OnlineCullingCHC\include;..\..\..\Preprocessing\ src"90 AdditionalIncludeDirectories=""$(OGRE_PATH)\PlugIns\OctreeSceneManager\include";"$(OGRE_PATH)\Samples\Common\include";"$(OGRE_PATH)\Dependencies\include\CEGUI";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\include";"$(OGRE_PATH)\OgreMain\include";"$(OGRE_PATH)\Dependencies\include";..\include;..\..\..\OnlineCullingCHC\include;..\..\..\Preprocessing\include" 91 91 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GTP_VISIBILITY_MODIFIED_OGRE" 92 92 StringPooling="TRUE" … … 222 222 </File> 223 223 <File 224 RelativePath="..\include\OgreTypeConverter.h"> 225 </File> 226 <File 224 227 RelativePath="..\include\OgreVisibilityOptionsManager.h"> 225 228 </File> 226 229 <File 227 230 RelativePath="..\include\OgreVisibilitySceneManager.h"> 228 </File>229 <File230 RelativePath="..\include\ViewCellBspTree.h">231 231 </File> 232 232 </Filter> … … 257 257 <File 258 258 RelativePath="..\src\OgreSolidHalfBoundingBox.cpp"> 259 </File> 260 <File 261 RelativePath="..\src\OgreTypeConverter.cpp"> 259 262 </File> 260 263 <File -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r853 r860 836 836 } 837 837 838 bool OcclusionCullingSceneManager::CompareBoundingBoxes(const AxisAlignedBox &boxa,838 /*bool OcclusionCullingSceneManager::CompareBoundingBoxes(const AxisAlignedBox &boxa, 839 839 const AxisAlignedBox &boxb) 840 840 { 841 841 } 842 842 */ 843 843 void OcclusionCullingSceneManager::LoadViewCells(string filename) 844 844 { … … 862 862 MovableObject *mo = oit.getNext(); 863 863 AxisAlignedBox bbox = mo->getWorldBoundingBox(); 864 CompareBoundingBoxes(*oit, box);864 // CompareBoundingBoxes(*oit, box); 865 865 } 866 866 } -
GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj
r833 r860 491 491 </File> 492 492 <File 493 RelativePath="..\include\Polygon3.h">494 </File>495 <File496 493 RelativePath="..\include\Preprocessor.h"> 497 494 </File> -
GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.cpp
r704 r860 9 9 #include "Mesh.h" 10 10 11 using namespace GtpVisibilityPreprocessor { 12 11 13 #define FATAL Debug 12 14 #define FATAL_ABORT exit(1) … … 54 56 for (it = newpoly.mVertices.begin(); it != it_end; ++ it) 55 57 Include(*it); 58 } 59 60 void 61 AxisAlignedBox3::Include(const PolygonContainer &polys) 62 { 63 PolygonContainer::const_iterator it, it_end = polys.end(); 64 65 for (it = polys.begin(); it != it_end; ++ it) 66 Include(*(*it)); 56 67 } 57 68 … … 2038 2049 2039 2050 2040 void AxisAlignedBox3::AddBoxToMesh(Mesh *mesh) const2051 void IncludeBoxInMesh(const AxisAlignedBox3 &box, Mesh &mesh) 2041 2052 { 2042 2053 // add 6 vertices of the box 2043 int index = (int)mesh ->mVertices.size();2054 int index = (int)mesh.mVertices.size(); 2044 2055 2045 for (int i=0; i < 8; i++)2056 for (int i=0; i < 8; ++ i) 2046 2057 { 2047 2058 Vector3 v; 2048 GetVertex(i, v);2049 mesh ->mVertices.push_back(v);2059 box.GetVertex(i, v); 2060 mesh.mVertices.push_back(v); 2050 2061 } 2051 2062 2052 mesh ->AddFace(new Face(index + 0, index + 1, index + 3, index + 2) );2053 mesh ->AddFace(new Face(index + 0, index + 2, index + 6, index + 4) );2054 mesh ->AddFace(new Face(index + 4, index + 6, index + 7, index + 5) );2063 mesh.AddFace(new Face(index + 0, index + 1, index + 3, index + 2) ); 2064 mesh.AddFace(new Face(index + 0, index + 2, index + 6, index + 4) ); 2065 mesh.AddFace(new Face(index + 4, index + 6, index + 7, index + 5) ); 2055 2066 2056 mesh ->AddFace(new Face(index + 3, index + 1, index + 5, index + 7) );2057 mesh ->AddFace(new Face(index + 0, index + 4, index + 5, index + 1) );2058 mesh ->AddFace(new Face(index + 2, index + 3, index + 7, index + 6) );2067 mesh.AddFace(new Face(index + 3, index + 1, index + 5, index + 7) ); 2068 mesh.AddFace(new Face(index + 0, index + 4, index + 5, index + 1) ); 2069 mesh.AddFace(new Face(index + 2, index + 3, index + 7, index + 6) ); 2059 2070 } 2060 2071 … … 2111 2122 2112 2123 } 2124 2125 } -
GTP/trunk/Lib/Vis/Preprocessing/src/AxisAlignedBox3.h
r859 r860 108 108 void Include(const Polygon3 &newpoly); 109 109 void Include(const AxisAlignedBox3 &bbox); 110 void Include (const PolygonContainer &polys); 110 111 void Include(Mesh *mesh); 111 112 // Expand the axis-aligned box to include given values in particular axis … … 359 360 const AxisAlignedBox3 &neighbour) const; 360 361 361 /** Adds the box faces to the mesh.362 */ 363 void AddBoxToMesh(Mesh *mesh) const;362 /** Includes the box faces to the mesh description 363 */ 364 friend void IncludeBoxInMesh(const AxisAlignedBox3 &box, Mesh &mesh); 364 365 365 366 /** Box faces are turned into polygons. -
GTP/trunk/Lib/Vis/Preprocessing/src/Beam.cpp
r840 r860 4 4 #include "Polygon3.h" 5 5 6 using namespace GtpVisibilityPreprocessor { 6 7 7 8 void … … 209 210 mPlanes.pop_back(); 210 211 } 212 213 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Beam.h
r542 r860 11 11 class Intersectable; 12 12 class Mesh; 13 14 namespace GtpVisibilityPreprocessor { 13 15 14 16 // the values need for rss tree update computed already inside the glrendererbuffer … … 114 116 }; 115 117 118 } 116 119 117 120 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Camera.cpp
r492 r860 14 14 15 15 16 using namespace GtpVisibilityPreprocessor { 16 17 17 18 … … 143 144 144 145 } 146 147 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Camera.h
r492 r860 5 5 #include "AxisAlignedBox3.h" 6 6 7 namespace GtpVisibilityPreprocessor { 8 7 9 class KdTree; 8 10 class SceneGraph; 11 9 12 10 13 class Camera … … 73 76 }; 74 77 78 } 75 79 76 80 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Containers.h
r850 r860 6 6 7 7 using namespace std; 8 9 namespace GtpVisibilityPreprocessor { 8 10 9 11 class ViewCell; … … 56 58 typedef vector<IndexedBoundingBox> IndexedBoundingBoxContainer; 57 59 60 } 61 58 62 #endif // _Container_H__ 59 -
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp
r859 r860 21 21 22 22 23 using namespace GtpVisibilityPreprocessor { 24 23 25 Environment *environment = NULL; 24 26 … … 2201 2203 2202 2204 } 2205 2206 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Environment.h
r492 r860 18 18 #include "common.h" 19 19 20 namespace GtpVisibilityPreprocessor { 21 20 22 class Vector3; 21 22 23 23 24 … … 352 353 extern Environment *environment; 353 354 355 } 356 354 357 #endif // __ENVIRON_H__ 355 358 -
GTP/trunk/Lib/Vis/Preprocessing/src/ExactPreprocessor.cpp
r372 r860 1 1 #include "ExactPreprocessor.h" 2 2 3 3 using namespace GtpVisibilityPreprocessor { 4 4 5 bool 5 6 ExactPreprocessor::ComputeVisibility() … … 9 10 }; 10 11 11 12 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ExactPreprocessor.h
r439 r860 1 1 #ifndef _ExactPreprocessor_H__ 2 2 #define _ExactPreprocessor_H__ 3 4 namespace GtpVisibilityPreprocessor { 3 5 4 6 #include "Preprocessor.h" … … 11 13 12 14 }; 13 14 15 16 } 15 17 16 18 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.cpp
r712 r860 2 2 #include "X3dExporter.h" 3 3 #include "VrmlExporter.h" 4 5 using namespace GtpVisibilityPreprocessor { 4 6 5 7 Exporter * … … 24 26 } 25 27 28 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Exporter.h
r535 r860 5 5 #include <vector> 6 6 using namespace std; 7 8 namespace GtpVisibilityPreprocessor { 7 9 8 10 #include "Material.h" … … 139 141 }; 140 142 141 143 } 142 144 143 145 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/FromPointVisibilityTree.cpp
r840 r860 17 17 #include "ViewCellsManager.h" 18 18 #include "Beam.h" 19 20 using namespace GtpVisibilityPreprocessor { 19 21 20 22 #define USE_FIXEDPOINT_T 0 … … 3930 3932 } 3931 3933 } 3934 3935 } -
GTP/trunk/Lib/Vis/Preprocessing/src/FromPointVisibilityTree.h
r810 r860 10 10 #include "RayInfo.h" 11 11 #include "ViewCellBsp.h" 12 13 namespace GtpVisibilityPreprocessor { 12 14 13 15 class ViewCell; … … 25 27 class ViewCellsTree; 26 28 27 28 struct BspRay;29 29 30 30 … … 845 845 }; 846 846 847 847 } 848 848 849 849 -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r859 r860 15 15 16 16 #include <QVBoxLayout> 17 18 using namespace GtpVisibilityPreprocessor { 17 19 18 20 static CGcontext sCgContext = NULL; … … 2165 2167 glClearColor(1.0f, 1.0f, 1.0f, 1.0f); 2166 2168 } 2169 2170 } -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h
r811 r860 11 11 #include "Renderer.h" 12 12 #include "Beam.h" 13 14 namespace GtpVisibilityPreprocessor { 13 15 14 16 class SceneGraph; … … 426 428 extern GlDebuggerWidget *debuggerWidget; 427 429 430 } 431 428 432 #endif 429 433 -
GTP/trunk/Lib/Vis/Preprocessing/src/Halton.cpp
r492 r860 1 1 2 2 #include "Halton.h" 3 4 using namespace GtpVisibilityPreprocessor { 3 5 4 6 // global halton generator … … 6 8 Halton2 halton2; 7 9 float Halton2::_invBases[2]; 10 11 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Halton.h
r497 r860 4 4 #include <iostream> 5 5 using namespace std; 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 class Halton2 { … … 132 134 133 135 extern Halton2 halton2; 136 } 134 137 135 138 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h
r850 r860 4 4 #include "AxisAlignedBox3.h" 5 5 #include "Pvs.h" 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 struct VssRayContainer; … … 79 81 }; 80 82 83 } 81 84 82 85 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.cpp
r859 r860 9 9 10 10 int KdNode::mailID = 1; 11 12 using namespace GtpVisibilityPreprocessor { 11 13 12 14 … … 1052 1054 return (int)beam.mKdNodes.size(); 1053 1055 } 1056 1057 } -
GTP/trunk/Lib/Vis/Preprocessing/src/KdTree.h
r859 r860 10 10 #include "Pvs.h" 11 11 #include "Viewcell.h" 12 12 13 namespace GtpVisibilityPreprocessor { 14 13 15 class KdNode; 14 16 class KdLeaf; … … 537 539 538 540 539 541 } 540 542 541 543 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Material.cpp
r608 r860 1 1 #include "common.h" 2 2 #include "Material.h" 3 4 using namespace GtpVisibilityPreprocessor { 3 5 4 6 … … 23 25 a + Random(b)); 24 26 } 27 28 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Material.h
r608 r860 2 2 #define __MATERIAL_H 3 3 4 namespace GtpVisibilityPreprocessor { 4 5 5 6 … … 47 48 48 49 49 50 } 50 51 51 52 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Matrix4x4.cpp
r245 r860 5 5 #include <iomanip> 6 6 using namespace std; 7 8 using namespace GtpVisibilityPreprocessor { 7 9 8 10 … … 646 648 return Vector3(M.x[3][0], M.x[3][1], M.x[3][2]); 647 649 } 650 651 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Matrix4x4.h
r209 r860 4 4 #include <iostream> 5 5 using namespace std; 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 class Vector3; … … 99 101 }; 100 102 101 103 } 102 104 103 105 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Mesh.cpp
r859 r860 3 3 #include "MeshKdTree.h" 4 4 #include "Triangle3.h" 5 6 using namespace GtpVisibilityPreprocessor { 7 5 8 6 9 int Intersectable::sMailId = 21843194198; … … 592 595 return mesh; 593 596 } 597 598 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Mesh.h
r859 r860 9 9 #include "AxisAlignedBox3.h" 10 10 #include "Material.h" 11 12 namespace GtpVisibilityPreprocessor { 11 13 12 14 struct Triangle3; … … 255 257 }; 256 258 257 259 } 258 260 259 261 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/MeshKdTree.cpp
r752 r860 5 5 #include "Mesh.h" 6 6 #include "MeshKdTree.h" 7 8 using namespace GtpVisibilityPreprocessor { 9 7 10 8 11 float MeshKdTree::mSplitBorder; … … 462 465 463 466 } 467 468 } -
GTP/trunk/Lib/Vis/Preprocessing/src/MeshKdTree.h
r177 r860 9 9 #include "Ray.h" 10 10 11 11 namespace GtpVisibilityPreprocessor { 12 12 13 class MeshKdNode; 13 14 class MeshKdLeaf; … … 265 266 266 267 267 268 } 268 269 269 270 -
GTP/trunk/Lib/Vis/Preprocessing/src/MutualVisibility.cpp
r386 r860 10 10 #include "Triangle3.h" 11 11 #include "SceneGraph.h" 12 13 using namespace GtpVisibilityPreprocessor { 12 14 13 15 void … … 709 711 } 710 712 713 } -
GTP/trunk/Lib/Vis/Preprocessing/src/MutualVisibility.h
r501 r860 4 4 #include "Vector3.h" 5 5 #include "Ray.h" 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 class Intersectable; … … 180 182 181 183 182 184 } 183 185 184 186 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Parser.h
r658 r860 4 4 #include <string> 5 5 using namespace std; 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 class SceneGraphNode; … … 20 22 }; 21 23 24 } 22 25 23 26 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Plane3.cpp
r639 r860 3 3 4 4 5 using namespace GtpVisibilityPreprocessor { 5 6 6 7 … … 82 83 return - Distance(a) / dv; // TODO: could be done more efficiently 83 84 } 85 86 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Plane3.h
r697 r860 3 3 4 4 #include "Vector3.h" 5 6 namespace GtpVisibilityPreprocessor { 5 7 6 8 … … 75 77 76 78 77 79 } 78 80 79 81 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/PlyParser.cpp
r752 r860 9 9 #include "Mesh.h" 10 10 11 using namespace GtpVisibilityPreprocessor { 11 12 12 13 // int facesPerMesh = 100000000; … … 291 292 return true; 292 293 } 294 295 } -
GTP/trunk/Lib/Vis/Preprocessing/src/PlyParser.h
r752 r860 4 4 #include "Parser.h" 5 5 #include "Containers.h" 6 7 using namespace GtpVisibilityPreprocessor { 6 8 7 9 class ViewCellsManager; … … 24 26 }; 25 27 28 } 26 29 27 30 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Polygon3.cpp
r840 r860 4 4 #include "Ray.h" 5 5 #include "Triangle3.h" 6 7 8 using namespace GtpVisibilityPreprocessor { 9 6 10 7 11 Polygon3::Polygon3(): … … 260 264 261 265 262 void Polygon3::IncludeInBox(const PolygonContainer &polys, AxisAlignedBox3 &box)263 {264 PolygonContainer::const_iterator it, it_end = polys.end();265 266 for (it = polys.begin(); it != it_end; ++ it)267 box.Include(*(*it));268 }269 270 271 266 // int_lineseg returns 1 if the given line segment intersects a 2D 272 267 // ray travelling in the positive X direction. This is used in the … … 569 564 } 570 565 } 566 567 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Polygon3.h
r840 r860 9 9 #include "Mesh.h" 10 10 #include <iomanip> 11 12 namespace GtpVisibilityPreprocessor { 11 13 12 14 class Polygon3; … … 118 120 Polygon3 *CreateReversePolygon() const; 119 121 120 /// vertices are connected in counterclockwise order.121 VertexContainer mVertices;122 123 /// we can also store materials with polygons124 Material *mMaterial;125 126 /// pointer to the mesh instance this polygon is derived from127 MeshInstance *mParent;128 129 /// Rays piercing this polygon130 RayContainer mPiercingRays;131 132 133 /** Includes polygons to axis aligned box.134 */135 static void IncludeInBox(const PolygonContainer &polys, AxisAlignedBox3 &box);136 122 137 123 /** Classify polygons with respect to the plane. … … 155 141 */ 156 142 friend void IncludePolyInMesh(const Polygon3 &poly, Mesh &mesh); 143 144 145 146 /// vertices are connected in counterclockwise order. 147 VertexContainer mVertices; 148 149 /// we can also store materials with polygons 150 Material *mMaterial; 151 152 /// pointer to the mesh instance this polygon is derived from 153 MeshInstance *mParent; 154 155 /// Rays piercing this polygon 156 RayContainer mPiercingRays; 157 157 158 }; 158 159 … … 170 171 } 171 172 173 } 172 174 173 175 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Polytope.cpp
r372 r860 1 1 #include "Polytope.h" 2 3 using namespace GtpVisibilityPreprocessor { 2 4 3 5 /************************************************ … … 22 24 } 23 25 26 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Polytope.h
r372 r860 3 3 4 4 #include "Containers.h" 5 6 namespace GtpVisibilityPreprocessor { 5 7 6 8 class Hyperplane; … … 45 47 }; 46 48 49 } 50 47 51 #endif // Polytope -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r840 r860 13 13 #include "GlRenderer.h" 14 14 #include "PlyParser.h" 15 16 using namespace GtpVisibilityPreprocessor { 17 15 18 16 19 Preprocessor *preprocessor; … … 605 608 return true; 606 609 } 610 611 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.h
r746 r860 9 9 10 10 #include <QObject> 11 12 namespace GtpVisibilityPreprocessor { 11 13 12 14 class RenderSimulator; … … 186 188 extern Preprocessor *preprocessor; 187 189 190 } 191 188 192 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp
r712 r860 7 7 #include "Preprocessor.h" 8 8 9 10 using namespace GtpVisibilityPreprocessor { 9 11 10 12 … … 56 58 cerr<<"Preprocessor thread destructor...\n"; 57 59 } 60 61 } -
GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.h
r556 r860 3 3 4 4 #include <QThread> 5 6 namespace GtpVisibilityPreprocessor { 5 7 6 8 class Preprocessor; … … 23 25 }; 24 26 27 } 25 28 26 29 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.cpp
r469 r860 1 1 #include <iostream> 2 2 #include "Pvs.h" 3 4 using namespace GtpVisibilityPreprocessor { 3 5 4 6 int … … 7 9 return 0; // TODO 8 10 } 11 12 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
r752 r860 4 4 #include <map> 5 5 #include <vector> 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 class KdNode; … … 422 424 typedef Pvs<Intersectable *> ObjectPvs; 423 425 426 } 424 427 425 428 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Ray.cpp
r644 r860 2 2 #include "Plane3.h" 3 3 #include "VssRay.h" 4 5 using namespace GtpVisibilityPreprocessor { 4 6 5 7 // ========================================================= … … 241 243 Precompute(); 242 244 } 245 246 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Ray.h
r563 r860 6 6 #include "Vector3.h" 7 7 //#include "ViewCellBsp.h" 8 9 namespace GtpVisibilityPreprocessor { 8 10 9 11 // forward declarations … … 332 334 }; 333 335 336 } 337 334 338 #endif 335 339 -
GTP/trunk/Lib/Vis/Preprocessing/src/RayInfo.cpp
r801 r860 3 3 #include "VssRay.h" 4 4 #include "Plane3.h" 5 6 using namespace GtpVisibilityPreprocessor { 5 7 6 8 RayInfo::RayInfo(): mRay(NULL), mMinT(0), … … 167 169 return SqrDistance(ExtrapOrigin(), ExtrapTermination()); 168 170 } 171 172 } -
GTP/trunk/Lib/Vis/Preprocessing/src/RayInfo.h
r437 r860 4 4 #include <vector> 5 5 using namespace std; 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 class VssRay; … … 89 91 }; 90 92 93 94 } 95 91 96 #endif 92 97 -
GTP/trunk/Lib/Vis/Preprocessing/src/Rectangle3.cpp
r223 r860 1 1 #include "Rectangle3.h" 2 3 using namespace GtpVisibilityPreprocessor { 2 4 3 5 … … 37 39 38 40 } 41 42 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Rectangle3.h
r245 r860 4 4 using namespace std; 5 5 #include "Vector3.h" 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 /// rectangle vertices … … 63 65 }; 64 66 67 } 65 68 66 69 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/RenderSimulator.cpp
r728 r860 6 6 #include "VspKdTree.h" 7 7 #include "ViewCellsManager.h" 8 9 10 using namespace GtpVisibilityPreprocessor { 11 8 12 9 13 void SimulationStatistics::Print(ostream &app) const … … 163 167 simStats = mSimulationStatistics; 164 168 } 169 170 } -
GTP/trunk/Lib/Vis/Preprocessing/src/RenderSimulator.h
r574 r860 6 6 #include "Renderer.h" 7 7 8 namespace GtpVisibilityPreprocessor { 8 9 9 10 class SimulationStatistics: public StatisticsBase … … 117 118 }; 118 119 120 } 121 119 122 #endif // RenderSimulator -
GTP/trunk/Lib/Vis/Preprocessing/src/Renderer.cpp
r497 r860 1 1 #include "Renderer.h" 2 3 using namespace GtpVisibilityPreprocessor { 2 4 3 5 … … 20 22 } 21 23 24 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Renderer.h
r497 r860 3 3 4 4 #include "common.h" 5 6 namespace GtpVisibilityPreprocessor { 5 7 6 8 class ViewCellsManager; … … 29 31 }; 30 32 33 } 31 34 32 35 #endif // Renderer -
GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp
r859 r860 13 13 #include "GlRenderer.h" 14 14 15 using namespace GtpVisibilityPreprocessor { 16 17 15 18 static bool useViewSpaceBox = false; 16 19 static bool use2dSampling = false; … … 808 811 } 809 812 813 } -
GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.h
r576 r860 11 11 class RssTreeLeaf; 12 12 13 namespace GtpVisibilityPreprocessor { 13 14 14 15 /** Sampling based visibility preprocessing. The implementation is based on heuristical … … 140 141 141 142 143 } 142 144 143 145 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.cpp
r667 r860 28 28 #include "Preprocessor.h" 29 29 #include "SceneGraph.h" 30 31 32 using namespace GtpVisibilityPreprocessor { 33 30 34 31 35 #define DEBUG_SPLIT_COST 0 … … 2805 2809 st.push(RayTraversalData(mRoots[i], info)); 2806 2810 } 2811 2812 2813 } -
GTP/trunk/Lib/Vis/Preprocessing/src/RssTree.h
r569 r860 27 27 28 28 #include "Containers.h" 29 30 namespace GtpVisibilityPreprocessor { 29 31 30 32 #define USE_KDNODE_VECTORS 1 … … 1079 1081 }; 1080 1082 1083 } 1081 1084 1082 1085 #endif // __LSDS_KDTREE_H__ -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.cpp
r574 r860 9 9 #include "ViewCellsManager.h" 10 10 #include "RenderSimulator.h" 11 12 13 using namespace GtpVisibilityPreprocessor { 14 11 15 12 16 SamplingPreprocessor::SamplingPreprocessor(): mPass(0) … … 447 451 } 448 452 } 453 454 } -
GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.h
r469 r860 7 7 #include "Preprocessor.h" 8 8 #include "VssRay.h" 9 10 namespace GtpVisibilityPreprocessor { 9 11 10 12 class Exporter; … … 95 97 }; 96 98 99 } 100 97 101 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/SceneGraph.cpp
r576 r860 5 5 #include "X3dExporter.h" 6 6 #include "Intersectable.h" 7 8 9 using namespace GtpVisibilityPreprocessor { 7 10 8 11 … … 132 135 mBox = box; 133 136 } 137 138 } -
GTP/trunk/Lib/Vis/Preprocessing/src/SceneGraph.h
r492 r860 8 8 #include "AxisAlignedBox3.h" 9 9 10 namespace GtpVisibilityPreprocessor { 10 11 11 12 /** Basic scene graph node, we are interested only in bounding boxes and topology … … 42 43 43 44 45 } 44 46 45 47 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Statistics.h
r469 r860 4 4 5 5 #include "common.h" 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 // -------------------------------------------------------------- … … 38 40 }; 39 41 42 } 40 43 41 44 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Tetrahedron3.cpp
r544 r860 1 1 #include "Tetrahedron3.h" 2 3 4 using namespace GtpVisibilityPreprocessor { 2 5 3 6 … … 26 29 return true; 27 30 } 31 32 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Tetrahedron3.h
r544 r860 4 4 #include "Triangle3.h" 5 5 #include "Vector3.h" 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 class Tetrahedron3 … … 63 65 }; 64 66 67 } 65 68 66 69 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/Triangle3.cpp
r191 r860 1 1 #include "Triangle3.h" 2 3 using namespace GtpVisibilityPreprocessor { 2 4 3 5 float … … 6 8 return 0.0f; 7 9 } 10 11 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Triangle3.h
r544 r860 3 3 4 4 #include "Vector3.h" 5 6 namespace GtpVisibilityPreprocessor { 5 7 6 8 struct Triangle3 { … … 44 46 }; 45 47 48 } 46 49 47 50 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/UnigraphicsParser.cpp
r752 r860 13 13 #include "Environment.h" 14 14 15 using namespace GtpVisibilityPreprocessor { 15 16 16 17 #define ROTATE_SCENE 0 … … 189 190 } 190 191 191 192 193 194 195 196 197 198 192 } -
GTP/trunk/Lib/Vis/Preprocessing/src/UnigraphicsParser.h
r658 r860 6 6 #include "Parser.h" 7 7 8 namespace GtpVisibilityPreprocessor { 9 8 10 class SceneGraphNode; 9 10 11 11 12 class UnigraphicsParser : public Parser … … 19 20 }; 20 21 22 } 21 23 22 24 -
GTP/trunk/Lib/Vis/Preprocessing/src/Vector3.cpp
r728 r860 2 2 #include "Vector3.h" 3 3 #include "Halton.h" 4 5 using namespace GtpVisibilityPreprocessor { 4 6 5 7 // Given min a vector to minimize and a candidate vector, replace … … 251 253 } 252 254 255 } -
GTP/trunk/Lib/Vis/Preprocessing/src/Vector3.h
r492 r860 7 7 #include "common.h" 8 8 9 9 namespace GtpVisibilityPreprocessor { 10 10 11 11 // Forward-declare some other classes. … … 485 485 486 486 487 487 } 488 488 489 489 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
r844 r860 13 13 #include <stack> 14 14 15 using namespace GtpVisibilityPreprocessor { 15 16 16 17 … … 2211 2212 app << "===== END OF BspTree statistics ==========\n"; 2212 2213 } 2214 2215 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.h
r844 r860 8 8 #include "Material.h" 9 9 //namespace GtpVisibilityPreprocessor { 10 11 namespace GtpVisibilityPreprocessor { 10 12 11 13 struct Triangle3; … … 682 684 }; 683 685 686 } 687 684 688 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.cpp
r840 r860 15 15 #include <stack> 16 16 17 using namespace GtpVisibilityPreprocessor { 17 18 18 19 … … 819 820 // compute bounding box 820 821 if (!forcedBoundingBox) 821 Polygon3::IncludeInBox(*polys, mBox);822 mBox.Include(*polys); 822 823 823 824 //-- store rays … … 1308 1309 1309 1310 // create bounding box of region 1310 Polygon3::IncludeInBox(polys, box);1311 box.Include(polys); 1311 1312 1312 1313 int objectsBack = 0, objectsFront = 0; … … 1351 1352 1352 1353 // create bounding box of region 1353 Polygon3::IncludeInBox(*data.mPolygons, box);1354 box.Include(*data.mPolygons); 1354 1355 1355 1356 const int axis = box.Size().DrivingAxis(); … … 2969 2970 { 2970 2971 box.Initialize(); 2971 Polygon3::IncludeInBox(mPolys, box);2972 box.Include(mPolys); 2972 2973 } 2973 2974 … … 3332 3333 } 3333 3334 } 3335 3336 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellBsp.h
r840 r860 10 10 #include "ViewCell.h" 11 11 12 12 namespace GtpVisibilityPreprocessor { 13 13 14 14 class ViewCell; … … 1074 1074 }; 1075 1075 1076 /** struct storing the view cell intersections. 1077 */ 1076 1078 struct BspRay 1077 1079 { … … 1083 1085 }; 1084 1086 1087 } 1088 1085 1089 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r859 r860 15 15 #include "VssPreprocessor.h" 16 16 #include "RssPreprocessor.h" 17 18 using namespace GtpVisibilityPreprocessor { 19 17 20 18 21 // HACK … … 3523 3526 { 3524 3527 VspKdLeaf *l = dynamic_cast<VspKdViewCell *>(*it)->mLeaf; 3525 mVspKdTree->GetBBox(l).AddBoxToMesh(&m);3528 IncludeBoxInMesh(mVspKdTree->GetBBox(l), m); 3526 3529 } 3527 3530 … … 5018 5021 } 5019 5022 5023 5024 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r859 r860 7 7 #include "ViewCell.h" 8 8 #include "ViewCellBsp.h" 9 10 namespace GtpVisibilityPreprocessor { 9 11 10 12 class ViewCell; … … 356 358 const Plane3 *clipPlane = NULL) const = 0; 357 359 360 /** Brings the view cells into their final state, computes meshes and volume. 361 */ 358 362 virtual void FinalizeViewCells(const bool createMesh); 359 363 … … 530 534 void CreateClipPlane(); 531 535 536 /** Updates pvs of all view cells for statistical evaluation after some more sampling 537 */ 532 538 virtual void UpdatePvsForEvaluation(ViewCell *root, ObjectPvs &pvs) = 0; 533 534 535 539 536 540 … … 972 976 }; 973 977 978 } 979 974 980 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.cpp
r664 r860 30 30 #include "VspKdTree.h" 31 31 #include "ViewCellsManager.h" 32 33 using namespace GtpVisibilityPreprocessor { 34 32 35 33 36 // --------------------------------------------------------------------------- … … 729 732 return true; 730 733 } 734 735 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParser.h
r575 r860 4 4 #include "Parser.h" 5 5 #include "Containers.h" 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 class ViewCellsManager; … … 19 21 }; 20 22 23 } 21 24 22 25 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParserXerces.h
r651 r860 7 7 #include <xercesc/sax/HandlerBase.hpp> 8 8 #include "Mesh.h" 9 10 namespace GtpVisibilityPreprocessor { 9 11 10 12 XERCES_CPP_NAMESPACE_USE … … 171 173 } 172 174 175 } 176 173 177 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/VrmlExporter.cpp
r840 r860 15 15 #include "Beam.h" 16 16 17 using namespace GtpVisibilityPreprocessor { 17 18 18 19 … … 728 729 AxisAlignedBox3 box; 729 730 box = tree.GetBBox(leaf); 730 box.AddBoxToMesh(mesh);731 IncludeBoxInMesh(box, *mesh); 731 732 732 733 if (tree.ValidLeaf(leaf)) … … 858 859 box = tree.GetBBox(leaf); 859 860 Mesh *mesh = new Mesh; 860 box.AddBoxToMesh(mesh);861 IncludeBoxInMesh(box, *mesh); 861 862 862 863 // get 4 corners of the ray directions … … 1314 1315 box = tree.GetShrankedBBox(leaf); 1315 1316 Mesh *mesh = new Mesh; 1316 box.AddBoxToMesh(mesh);1317 IncludeBoxInMesh(box, *mesh); 1317 1318 1318 1319 // get 4 corners of the ray directions … … 1404 1405 CLEAR_CONTAINER(polys); 1405 1406 } 1407 1408 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VrmlExporter.h
r712 r860 12 12 #include "VssRay.h" 13 13 #include "ViewCell.h" 14 15 namespace GtpVisibilityPreprocessor { 14 16 15 17 class SceneGraphNode; … … 145 147 }; 146 148 147 149 } 148 150 149 151 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r837 r860 17 17 #include "ViewCellsManager.h" 18 18 #include "Beam.h" 19 20 using namespace GtpVisibilityPreprocessor { 19 21 20 22 #define USE_FIXEDPOINT_T 0 … … 3860 3862 } 3861 3863 } 3864 3865 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h
r822 r860 25 25 class ViewCellsTree; 26 26 27 28 struct BspRay; 29 27 namespace GtpVisibilityPreprocessor { 30 28 31 29 /** … … 325 323 int CastBeam(Beam &beam); 326 324 327 void CollectViewCells(BspNode *root, 328 bool onlyValid, 329 ViewCellContainer &viewCells, 330 bool onlyUnmailed = false) const; 331 332 325 /** Finds approximate neighbours, i.e., finds correct neighbors 326 in most cases but sometimes more. 327 */ 333 328 int FindApproximateNeighbors(BspNode *n, 334 329 vector<BspLeaf *> &neighbors, … … 404 399 void EvalPriority(VspBspTraversalData &tData) const; 405 400 401 /** Evaluates render cost decrease of next split. 402 */ 406 403 float EvalRenderCostDecrease(const Plane3 &candidatePlane, 407 404 const VspBspTraversalData &data) const; 408 405 406 /** Constructs tree using the split priority queue. 407 */ 409 408 void ConstructWithSplitQueue(const PolygonContainer &polys, RayInfoContainer *rays); 410 409 410 /** Collects view cells in the subtree under root. 411 */ 412 void CollectViewCells(BspNode *root, 413 bool onlyValid, 414 ViewCellContainer &viewCells, 415 bool onlyUnmailed = false) const; 411 416 412 417 /** Returns view cell corresponding to … … 831 836 }; 832 837 833 838 } 834 839 835 840 -
GTP/trunk/Lib/Vis/Preprocessing/src/VspKdTree.cpp
r744 r860 27 27 #include "ViewCellsManager.h" 28 28 #include "ViewCellBsp.h" 29 30 using namespace GtpVisibilityPreprocessor { 29 31 30 32 // Static variables … … 2644 2646 EvalMergeCost(); 2645 2647 } 2648 2649 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VspKdTree.h
r587 r860 39 39 class ViewCellsStatistics; 40 40 41 namespace GtpVisibilityPreprocessor { 41 42 42 43 /** … … 891 892 }; 892 893 894 } 893 895 894 896 #endif // __VSP_KDTREE_H__ -
GTP/trunk/Lib/Vis/Preprocessing/src/VssPreprocessor.cpp
r767 r860 14 14 #include "GlRenderer.h" 15 15 #include "ViewCellBsp.h" 16 17 using namespace GtpVisibilityPreprocessor { 16 18 17 19 bool use2dSampling = false; … … 859 861 } 860 862 861 863 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VssPreprocessor.h
r674 r860 7 7 #include "Preprocessor.h" 8 8 #include "VssRay.h" 9 10 namespace GtpVisibilityPreprocessor { 11 9 12 class VssTree; 10 13 class VssTreeLeaf; 14 11 15 12 16 … … 110 114 }; 111 115 112 116 } 113 117 114 118 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.cpp
r492 r860 1 1 #include "VssRay.h" 2 2 #include "AxisAlignedBox3.h" 3 4 using namespace GtpVisibilityPreprocessor { 3 5 4 6 // Static variables … … 256 258 } 257 259 258 260 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VssRay.h
r556 r860 7 7 #include "Ray.h" 8 8 #include "Containers.h" 9 10 namespace GtpVisibilityPreprocessor { 9 11 10 12 class AxisAlignedBox3; … … 318 320 }; 319 321 320 322 } 321 323 322 324 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/VssTree.cpp
r667 r860 24 24 #include "Intersectable.h" 25 25 #include "Ray.h" 26 27 using namespace GtpVisibilityPreprocessor { 26 28 27 29 #define DEBUG_SPLIT_COST 0 … … 2008 2010 return rays.size(); 2009 2011 } 2012 2013 } -
GTP/trunk/Lib/Vis/Preprocessing/src/VssTree.h
r466 r860 21 21 #include "VssRay.h" 22 22 #include "AxisAlignedBox3.h" 23 23 #include "Statistics.h" 24 #include "Ray.h" 25 26 namespace GtpVisibilityPreprocessor { 24 27 25 28 #define USE_KDNODE_VECTORS 1 … … 28 31 29 32 30 #include "Statistics.h"31 #include "Ray.h"32 33 33 34 // -------------------------------------------------------------- … … 928 929 }; 929 930 931 } 930 932 931 933 #endif // __LSDS_KDTREE_H__ -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dExporter.cpp
r840 r860 15 15 #include "Beam.h" 16 16 17 using namespace GtpVisibilityPreprocessor { 17 18 18 19 … … 710 711 AxisAlignedBox3 box; 711 712 box = tree.GetBBox(leaf); 712 box.AddBoxToMesh(mesh);713 IncludeBoxInMesh(box, *mesh); 713 714 714 715 if (tree.ValidLeaf(leaf)) { … … 813 814 box = tree.GetBBox(leaf); 814 815 Mesh *mesh = new Mesh; 815 box.AddBoxToMesh(mesh);816 IncludeBoxInMesh(box, *mesh); 816 817 817 818 // get 4 corners of the ray directions … … 1244 1245 box = tree.GetShrankedBBox(leaf); 1245 1246 Mesh *mesh = new Mesh; 1246 box.AddBoxToMesh(mesh);1247 IncludeBoxInMesh(box, *mesh); 1247 1248 1248 1249 // get 4 corners of the ray directions … … 1335 1336 CLEAR_CONTAINER(polys); 1336 1337 } 1338 1339 } -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dExporter.h
r535 r860 12 12 #include "VssRay.h" 13 13 #include "ViewCell.h" 14 15 namespace GtpVisibilityPreprocessor { 14 16 15 17 class SceneGraphNode; … … 145 147 }; 146 148 147 149 } 148 150 149 151 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dParser.cpp
r752 r860 29 29 #include "Triangle3.h" 30 30 #include "ViewCellsManager.h" 31 32 using namespace GtpVisibilityPreprocessor { 33 31 34 32 35 // --------------------------------------------------------------------------- … … 986 989 return true; 987 990 } 991 992 } -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dParser.h
r694 r860 4 4 #include "Parser.h" 5 5 #include "Containers.h" 6 7 namespace GtpVisibilityPreprocessor { 6 8 7 9 class ViewCellsManager; … … 21 23 }; 22 24 25 } 23 26 24 27 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/X3dParserXerces.h
r801 r860 13 13 class AttributeList; 14 14 XERCES_CPP_NAMESPACE_END 15 16 namespace GtpVisibilityPreprocessor { 15 17 16 18 class SceneGraphNode; … … 287 289 } 288 290 291 } 292 289 293 #endif -
GTP/trunk/Lib/Vis/Preprocessing/src/common.h
r582 r860 19 19 #include <iostream> 20 20 #include <fstream> 21 21 22 using namespace std; 22 23
Note: See TracChangeset
for help on using the changeset viewer.