- Timestamp:
- 04/29/05 18:32:50 (20 years ago)
- Location:
- trunk/VUT
- Files:
-
- 3 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibility/include/PreprocessingManager.h
r67 r71 11 11 namespace GtpVisibility { 12 12 13 14 15 16 17 18 13 /** 14 This class defines an interface to the external visibility preprocessor. 15 It allows to export the static part of the scene to a file in the XML format 16 understood by the preprocessor. By default all the exported meshes are considered 17 as scene occluders, whereas occludees are formed by their bounding boxes, 18 and bounding boxes of the scene hierarchy. 19 19 20 21 22 23 24 20 This class also allows to import the preprocessed data with PVS 21 information for the viewcells (note that the viewcells are either generated 22 automatically by the preprocessor or loaded from a polyhedral definition stored 23 in a file (see documentation for the Preprocessor class). 24 */ 25 25 26 27 28 26 class PreprocessingManager 27 { 28 public: 29 29 30 /** 31 Constructor taking a HierarchyInterface as argument. 32 The HierarchyInterface makes the PreprocessingManager independent from the actual 33 scene representation as long as it supports a required set of methods. 34 */ 35 PreprocessingManager( HierarchyInterface *hierarchyInterface ); 30 /** Constructor taking a HierarchyInterface as argument. 31 The HierarchyInterface makes the PreprocessingManager independent from the actual 32 scene representation as long as it supports a required set of methods. 33 */ 34 PreprocessingManager(HierarchyInterface *hierarchyInterface); 36 35 37 36 38 37 /** 39 Destructor which deletes all data describing static scene visibility.38 Destructor which deletes all data describing static scene visibility. 40 39 */ 41 40 virtual ~PreprocessingManager(); 42 41 43 /** 44 Export the scene for visibility preprocessing. Exports the hierarchyInterface including 45 its bounding boxes + mesh data. Note that the bounding boxes can be used as occludees 46 by the extrenal preprocessor. The viewcell data will either be supplied directly to the 47 visibility preprocessing standalone module. 42 /** Export the scene for visibility preprocessing. Exports the hierarchyInterface including 43 its bounding boxes + mesh data. Note that the bounding boxes can be used as occludees 44 by the extrenal preprocessor. The viewcell data will either be supplied directly to the 45 visibility preprocessing standalone module. 48 46 49 @param filename name of the file to export.50 @return true if the export was succesful.47 @param filename name of the file to export. 48 @return true if the export was succesful. 51 49 */ 52 virtual bool ExportScene(const string filename 53 ) = 0; 50 virtual bool ExportScene(const string filename) = 0; 54 51 55 /** 56 Load preprocessed visibility information. The loaded data is matched with the current 57 scene graph. The topology of the current scene graph has to match with the loaded data. 58 There is also geometrical check of the bounding boxes. Once loading is succesful the 59 PreprocessingManager establishes links from its internal visibility representation 60 to the scene graph: no change of this part of the scene graph is allowed; this would 61 violate the static scene assumption! 52 /** Load preprocessed visibility information. The loaded data is matched with the current 53 scene graph. The topology of the current scene graph has to match with the loaded data. 54 There is also geometrical check of the bounding boxes. Once loading is succesful the 55 PreprocessingManager establishes links from its internal visibility representation 56 to the scene graph: no change of this part of the scene graph is allowed; this would 57 violate the static scene assumption! 62 58 63 @param filename name of the file to load.64 @return true if the loading was succesful.59 @param filename name of the file to load. 60 @return true if the loading was succesful. 65 61 */ 66 virtual bool LoadPreprocessedData(const string filename 67 ) = 0; 62 virtual bool LoadPreprocessedData(const string filename) = 0; 68 63 69 64 /** -
trunk/VUT/GtpVisibility/include/QueryManager.h
r65 r71 19 19 output of the visibility preprocessor. 20 20 */ 21 22 23 21 class QueryManager 22 { 23 public: 24 24 /** Constructor taking a hierarchy interface as an argument. This allows to operate 25 25 onm different hierarchy types, while reusing the implementation of the query methods. … … 74 74 75 75 @return true if there is any intersection. 76 76 */ 77 77 virtual bool 78 78 ShootRay(const Ray &ray, … … 81 81 ); 82 82 83 83 /** Sets the scene traverser. 84 84 @remark the scene traverser depends on the type of hierarchyInterface the scene consists of. 85 86 85 */ 86 void SetSceneTraverser(HierarchyInterface *hierarchyInterface ); 87 87 88 88 protected: -
trunk/VUT/GtpVisibility/include/VisibilityEnvironment.h
r59 r71 20 20 }; 21 21 } // namespace GtpVisibility 22 23 /** @}*/ // end of group Visibility 24 22 25 #endif // VisibilityEnvironment_H -
trunk/VUT/GtpVisibility/include/VisibilityInfo.h
r65 r71 9 9 namespace GtpVisibility { 10 10 11 /** Class storing the visibility information of a scene node. 12 */ 13 class NodeInfo { 14 public: 15 NodeInfo(HierarchyNode *node, 16 const float v): 17 mNode(node), mVisibility(v) {} 11 /** Class storing the visibility information of a scene node. 12 */ 13 class NodeInfo 14 { 15 public: 16 NodeInfo(HierarchyNode *node,const float v): mNode(node), mVisibility(v) {} 18 17 19 18 protected: 20 19 /** pointer to the scene node */ 21 20 HierarchyNode *mNode; … … 24 23 total number of ratsterized pixels */ 25 24 float mVisibility; 26 25 }; 27 26 27 /** Class storing the visibility information of a mesh. 28 */ 29 class MeshInfo 30 { 31 public: 32 MeshInfo(Mesh *mesh, const float v): mMesh(mesh), mVisibility(v) {} 33 34 protected: 35 /** Pointer to the mesh. 36 */ 37 Mesh *mMesh; 38 /** Node visibility can either be a number of visible pixels or relative 39 number of visible pixels (if the hardware queries will provide the 40 total number of ratsterized pixels. 41 */ 42 float mVisibility; 43 }; 28 44 29 /** Class storing the visibility information of a mesh. 30 */ 31 class MeshInfo { 32 public: 33 MeshInfo(Mesh *mesh, 34 const float v): 35 mMesh(mesh), mVisibility(v) {} 36 37 protected: 38 /** pointer to the scene node */ 39 Mesh *mMesh; 40 /** node visibility can either be a number of visible pixels or relative 41 number of visible pixels (if the hardware queries will provide the 42 total number of ratsterized pixels */ 43 float mVisibility; 44 }; 45 46 // this define shall be replaced by template typedef 45 //TODO: this define shall be replaced by template typedef 47 46 #define InfoContainer std::vector 48 47 }; -
trunk/VUT/GtpVisibility/include/VisibilityManager.h
r65 r71 1 #ifndef _ Manager_H__2 #define _ Manager_H__1 #ifndef _VisibilityManager_H__ 2 #define _VisibilityManager_H__ 3 3 4 4 #include "CullingManager.h" 5 5 #include "VisibilityEnvironment.h" 6 7 6 8 7 /** This namespace includes all classes which are created by the VUT (Vienna University … … 10 9 and are not directly derived from an Ogre class. 11 10 */ 12 13 11 namespace GtpVisibility { 14 12 … … 52 50 }; 53 51 } // namespace GtpVisibility 52 54 53 #endif // VisibilityManager -
trunk/VUT/GtpVisibility/include/VisibilityMesh.h
r65 r71 9 9 10 10 11 12 #endif 11 #endif // VisibilityMesh.h -
trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj
r64 r71 20 20 Name="VCCLCompilerTool" 21 21 Optimization="0" 22 AdditionalIncludeDirectories=" ..\include"22 AdditionalIncludeDirectories=""$(OGRE_PATH)/OgreMain/include";..\include" 23 23 PreprocessorDefinitions="WIN32;_DEBUG;_LIB" 24 24 MinimalRebuild="TRUE" … … 106 106 </File> 107 107 <File 108 RelativePath="..\src\DummyPreprocessingManager.cpp"> 109 </File> 110 <File 111 RelativePath="..\src\DummyQueryManager.cpp"> 112 </File> 113 <File 108 114 RelativePath="..\src\FrustumCullingManager.cpp"> 109 115 </File> 110 116 <File 111 117 RelativePath="..\src\HierarchyInterface.cpp"> 118 </File> 119 <File 120 RelativePath="..\src\PreprocessingManager.cpp"> 121 </File> 122 <File 123 RelativePath="..\src\QueryManager.cpp"> 112 124 </File> 113 125 <File … … 161 173 RelativePath="..\include\VisibilityManager.h"> 162 174 </File> 175 <File 176 RelativePath="..\include\VisibilityMesh.h"> 177 </File> 163 178 </Filter> 164 179 </Files> -
trunk/VUT/GtpVisibility/src/PreprocessingManager.cpp
r65 r71 3 3 namespace GtpVisibility { 4 4 5 6 bool 7 PreprocessingManager::GetPVS( 8 const Vector3 ¢er, 9 const float radius, 10 InfoContainer<NodeInfo> *visibleNodes, 11 InfoContainer<MeshInfo> *visibleMeshes ) 12 { 5 PreprocessingManager::PreprocessingManager(HierarchyInterface *hierarchyInterface) 6 { 7 } 8 9 PreprocessingManager::~PreprocessingManager() 10 { 11 } 12 13 bool PreprocessingManager::GetPVS(const Vector3 ¢er, 14 const float radius, 15 InfoContainer<NodeInfo> *visibleNodes, 16 InfoContainer<MeshInfo> *visibleMeshes) 17 { 13 18 vector<int> viewCellIds; 14 if (LocateViewCellIds(center, radius, &viewCellIds)) { 15 for (vector<int>::iterator ci = viewCellIds.begin(); 16 ci != viewCellIds.end(); 17 ci++) { 18 AddViewCellPVS(*ci, 19 visibleNodes, 20 visibleMeshes ); 21 // remove duplicates of the PVS entries if any? 22 } 23 return true; 19 if (LocateViewCellIds(center, radius, &viewCellIds)) 20 { 21 for (vector<int>::iterator ci = viewCellIds.begin(); ci != viewCellIds.end(); ci++) 22 { 23 AddViewCellPVS(*ci, visibleNodes, visibleMeshes ); 24 // remove duplicates of the PVS entries if any? 25 } 26 return true; 24 27 } 25 28 return false; -
trunk/VUT/GtpVisibility/src/QueryManager.cpp
r65 r71 3 3 4 4 namespace GtpVisibility { 5 6 QueryManager::QueryManager(HierarchyInterface *hierarchyInterface) 7 { 8 } 9 10 bool QueryManager::ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine) 11 { 12 // run OGRE ray shooting query 13 return false; 14 } 5 15 6 bool 7 QueryManager::ShootRay(const Ray &ray, 8 std::vector<Mesh *> *visibleMeshes, 9 bool isGlobalLine 10 ) 11 { 12 // run OGRE ray shooting query 13 14 15 return false; 16 } 17 18 19 }; 16 } // namespace GtpVisibility -
trunk/VUT/Ogre/include/OgrePlatformHierarchyInterface.h
r59 r71 11 11 #include "OgrePlatformOcclusionQuery.h" 12 12 13 /** This namespace contains the Ogre dependent classes. 14 */ 13 15 namespace Ogre { 14 16 … … 16 18 @remark also provides methods for using occlusion queries on the hierarchy nodes 17 19 */ 18 19 20 class PlatformHierarchyInterface: public GtpVisibility::HierarchyInterface 20 21 { -
trunk/VUT/doc/DummyModules/doxyfile_gtp_dummy
r70 r71 26 26 INLINE_INHERITED_MEMB = NO 27 27 FULL_PATH_NAMES = YES 28 STRIP_FROM_PATH = " /cygdrive/d/gametools/gametools/trunk/VUT/"28 STRIP_FROM_PATH = "d:/gametools/trunk/VUT/" 29 29 STRIP_FROM_INC_PATH = 30 30 SHORT_NAMES = NO -
trunk/VUT/doc/DummyModules/overview.tex
r70 r71 3 3 4 4 5 The visibility work 5 The visibility workpackage aims to develop methods for making use of 6 6 restricted visibility in large scenes. The major goal of these methods 7 is to avoid wasting of the computational power on currently invisible8 parts of the scene. To address this goal we develop new methods for 9 online visibility culling and offline visibility preprocessing. The10 online visibility culling is either used to render only visible part 11 of the scene or to provide queries which determine visible part of the12 scene in runtime. Visibility preprocessing provides partitioning of the 13 view space into view cellsand for each view cell it calculates a7 is to avoid wasting computational power on currently invisible parts 8 of the scene. To address this goal, we develop new methods for online 9 visibility culling and offline visibility preprocessing. The online 10 visibility culling is either used to render only visible part of the 11 scene or to provide queries which determine visible parts of the scene 12 in runtime. Visibility preprocessing provides partitioning of the view 13 space into view cells, and for each view cell it calculates a 14 14 potentially visible set. 15 15 … … 17 17 \section{Module Class Hierarchy} 18 18 19 The visibility work package consistof a module which is integrated19 The visibility workpackage consists of a module which is integrated 20 20 into the game engine and an external module which deals with 21 21 preprocessing. One of the goals of the design of the module class 22 22 hierarchy has been easy portability of the developed methods to other 23 23 game engines. The resulting class structure clearly separates the 24 actual engine 24 actual engine-dependent parts from the game engine independent 25 25 algorithmic parts. We have used name spaces to separate the engine 26 26 dependent parts (name space Ogre) from the engine independent parts 27 (name space GtpVisibility). The external visibility preprocessing module28 defines its own name space (GtpVisibilityPreprocessor).27 (name space GtpVisibility). The external visibility preprocessing 28 module defines its own name space (GtpVisibilityPreprocessor). 29 29 30 30 An overview of the important classes of the visibility work package and … … 43 43 The diagram shows that the module integrated into the engine consists 44 44 of three main parts (CullingManager, QueryManager, 45 PreprocessingManager) which are encapsulated in a helper class45 PreprocessingManager), which are encapsulated in a helper class 46 46 (Visibility Manager). The helper class then deals with the 47 initialization of the contained parts and allows aneasy communication47 initialization of the contained parts and allows easy communication 48 48 between them. 49 49 50 50 \section{Visibility Culling} 51 51 52 Visibility culling seamlessly integrates into the rendering 53 loop and eliminates most invisible objects from being send to the 54 pipeline.Visibility culling is implemented by instances of the CullingManager52 Visibility culling seamlessly integrates into the rendering loop and 53 eliminates most invisible objects from being sent to the pipeline. 54 Visibility culling is implemented by instances of the CullingManager 55 55 class. We will provide several implementations which can be easily 56 56 switched at runtime and so the best technique for the particular scene … … 78 78 the PreprocessingManager and used inside the engine. 79 79 80 Apart from the scene definition file the preprocessor will be able80 Apart from the scene definition file, the preprocessor will be able 81 81 to import the view cell definition. In this case it will assume the 82 view cells have to be described as meshes satisfying set of83 requirements. Alternatively the module can generate view cells by82 view cells have to be described as meshes satisfying a set of 83 requirements. Alternatively, the module can generate view cells by 84 84 automatic view space partitioning. 85 85 86 86 87 87 %{\textbullet}\tab\textbf{Construction module for tree multiresolution models.} 88 -
trunk/VUT/scripts/GtpVisibility.sln
r63 r71 24 24 EndProject 25 25 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GtpVisibility", "..\GtpVisibility\scripts\GtpVisibility.vcproj", "{101A7691-74F3-48B4-96A3-CF35578F5900}" 26 ProjectSection(ProjectDependencies) = postProject 27 EndProjectSection 28 EndProject 29 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Preprocessor", "..\GtpVisibilityPreprocessor\scripts\Preprocessor.vcproj", "{101A7691-74F3-48B4-96A3-CF35578F5900}" 26 30 ProjectSection(ProjectDependencies) = postProject 27 31 EndProjectSection … … 53 57 {101A7691-74F3-48B4-96A3-CF35578F5900}.Release.ActiveCfg = Release|Win32 54 58 {101A7691-74F3-48B4-96A3-CF35578F5900}.Release.Build.0 = Release|Win32 59 {101A7691-74F3-48B4-96A3-CF35578F5900}.Debug.ActiveCfg = Debug|Win32 60 {101A7691-74F3-48B4-96A3-CF35578F5900}.Debug.Build.0 = Debug|Win32 61 {101A7691-74F3-48B4-96A3-CF35578F5900}.Release.ActiveCfg = Release|Win32 62 {101A7691-74F3-48B4-96A3-CF35578F5900}.Release.Build.0 = Release|Win32 55 63 EndGlobalSection 56 64 GlobalSection(ExtensibilityGlobals) = postSolution
Note: See TracChangeset
for help on using the changeset viewer.