Changeset 2280 for GTP/trunk/Lib/Vis/OnlineCullingCHC/include
- Timestamp:
- 03/22/07 18:24:13 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/include
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/CullingManager.h
r2278 r2280 2 2 #define _CullingManager_H__ 3 3 4 #include <iostream> 5 #include <fstream> 4 6 #include "HierarchyInterface.h" 7 5 8 6 9 … … 8 11 9 12 /** This abstract class implements an interface for a specific culling 10 algorithm. The algorithm is either used to render a scene 11 or to make a visibility query. 13 algorithm. The algorithm is either used to render a scene or to make a visibility query. 12 14 */ 13 15 class CullingManager … … 54 56 void SetVisualizeCulledNodes(bool visualizeCulledNodes); 55 57 58 56 59 protected: 57 60 … … 63 66 HierarchyInterface *mHierarchyInterface; 64 67 bool mVisualizeCulledNodes; 68 65 69 }; 70 66 71 } // namespace GtpVisibility 67 72 #endif // CullingManager -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyPreprocessingManager.h
r2278 r2280 42 42 Returns false if no viewcell was found. 43 43 */ 44 virtual bool LocateViewCellIds(const Vector3 ¢er,45 const float radius,46 vector<int> *viewCellIds47 48 44 /*virtual bool LocateViewCellIds(const Vector3 ¢er, 45 const float radius, 46 vector<int> *viewCellIds 47 ); 48 */ 49 49 50 50 /** … … 52 52 a union with visibleNodes and visibleMeshes. Returns the number of added entries. 53 53 */ 54 virtual int AddViewCellPVS(const int cellID,55 56 54 //virtual int AddViewCellPVS(const int cellID, 55 // NodeInfoContainer *visibleNodes, 56 // MeshInfoContainer *visibleMeshes); 57 57 58 58 }; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/DummyQueryManager.h
r2255 r2280 19 19 QueryManager(hierarchyInterface, 0) {} 20 20 21 /** 22 @sa QueryManager::ComputeCameraVisibility() 23 */ 21 /** @sa QueryManager::ComputeCameraVisibility() 22 */ 24 23 virtual void ComputeCameraVisibility(const Camera &camera, 25 24 NodeInfoContainer *visibleNodes, … … 29 28 const bool approximateVisibility); 30 29 31 /** 32 @sa QueryManager::ComputeFromPointVisibility() 30 /** @sa QueryManager::ComputeFromPointVisibility() 33 31 */ 34 32 virtual void ComputeFromPointVisibility(const Vector3 &point, -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/HierarchyInterface.h
r2259 r2280 3 3 4 4 #include "DistanceQueue.h" 5 #include "VisibilityMesh.h"5 //#include "VisibilityMesh.h" 6 6 #include <stack> 7 7 … … 11 11 12 12 typedef std::vector<HierarchyNode *> NodeVector; 13 typedef std::vector<GtpVisibility::Mesh *> GeometryVector; 14 typedef std::vector<GtpVisibility::Patch *> PatchVector; 13 //typedef std::vector<GtpVisibility::Mesh *> GeometryVector; 14 //typedef std::vector<GtpVisibility::Patch *> PatchVector; 15 15 16 typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair; 16 17 typedef std::pair<HierarchyNode *, bool> PendingQuery; … … 139 140 */ 140 141 141 /** Returns the geometry of a given hierarchy node.142 @param node the hierarchy node containing the geometry143 @param geometryList geometry is returned in this list144 @param includeChildren if the geometry of the children should be taken into account145 */146 virtual void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,147 GeometryVector *geometryList,148 bool includeChildren) = 0;149 150 142 151 143 /** This is an optimization when issuing the occlusion test. -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/PreprocessingManager.h
r316 r2280 7 7 #include "HierarchyInterface.h" 8 8 #include "VisibilityInfo.h" 9 #include "VisibilityVector3.h"9 //#include "VisibilityVector3.h" 10 10 11 11 namespace GtpVisibility { … … 80 80 added to the container. Returns true if the corresponding PVS exists. 81 81 */ 82 virtual bool GetPVS(const Vector3 &point,82 /* virtual bool GetPVS(const Vector3 &point, 83 83 const float radius, 84 84 NodeInfoContainer *visibleNodes, 85 85 MeshInfoContainer *visibleMeshes); 86 86 */ 87 87 88 88 … … 115 115 Returns false if no viewcell was found. 116 116 */ 117 virtual bool LocateViewCellIds(const Vector3 ¢er,117 /* virtual bool LocateViewCellIds(const Vector3 ¢er, 118 118 const float radius, 119 119 vector<int> *viewCellIds 120 120 ) = 0; 121 121 */ 122 122 /** 123 123 Add a PVS of the given viewcell to the already evaluated PVS by computing 124 124 a union with visibleNodes and visibleMeshes. Returns the number of added entries. 125 125 */ 126 virtual int AddViewCellPVS(const int cellID,126 /* virtual int AddViewCellPVS(const int cellID, 127 127 NodeInfoContainer *visibleNodes, 128 128 MeshInfoContainer *visibleMeshes ) = 0; 129 129 */ 130 130 HierarchyInterface *mSceneTraverser; 131 131 }; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/QueryManager.h
r2255 r2280 5 5 6 6 #include "VisibilityInfo.h" 7 #include "VisibilityVector3.h"8 #include "VisibilityCamera.h"9 #include "VisibilityRay.h" 7 //#include "VisibilityCamera.h" 8 //#include "VisibilityRay.h" 9 10 10 11 11 namespace GtpVisibility { 12 12 13 13 14 typedef std::vector<OcclusionQuery *> QueryList; 14 15 … … 25 26 public: 26 27 /** Constructor taking a hierarchy interface as an argument. This allows to operate 27 on different hierarchy types, while reusing the implementation of the query methods.28 on different hierarchy types, while reusing the implementation of the query methods. 28 29 */ 29 QueryManager(HierarchyInterface *hierarchyInterface, int queryModes); 30 31 /** 32 Computes restricted visibility from point by using an explicit camera to execute 33 the visibility query. 34 @param camera The camera to be used 30 //QueryManager(HierarchyInterface *hierarchyInterface, int queryModes); 31 QueryManager(int queryModes); 35 32 36 @param visibleNodes Pointer to the container where visible nodes should be added. 37 This set is formed of visible leafs or fully visible interior nodes.38 If NULL no visible nodes are not evaluated.33 /** Computes restricted visibility from point by using an explicit camera to execute 34 the visibility query. 35 @param camera The camera to be used 39 36 40 @param visibleGeometry Pointer to the container where visible meshes should be added. 41 If NULL no visible meshes are not evaluated. 37 @param visibleNodes Pointer to the container where visible nodes should be added. 38 This set is formed of visible leafs or fully visible interior nodes. 39 If NULL no visible nodes are not evaluated. 42 40 43 @param visiblePatches Pointer to the container where visible patches should be added.44 If NULL no visible meshes are not evaluated.41 @param visibleGeometry Pointer to the container where visible meshes should be added. 42 If NULL no visible meshes are not evaluated. 45 43 46 @param relativeVisibility If true the visibility member for 47 NodeInfo and MeshInfo represent relative visibility; i.e. the number of visible 48 pixels divided by the the number of projected pixels. 44 @param visiblePatches Pointer to the container where visible patches should be added. 45 If NULL no visible meshes are not evaluated. 49 46 50 @return true if the corresponding PVS exists. 47 @param relativeVisibility If true the visibility member for 48 NodeInfo and MeshInfo represent relative visibility; i.e. the number of visible 49 pixels divided by the the number of projected pixels. 50 51 @return true if the corresponding PVS exists. 51 52 */ 52 virtual void 53 ComputeCameraVisibility(const Camera &camera, 54 NodeInfoContainer *visibleNodes, 55 MeshInfoContainer *visibleGeometry, 56 PatchInfoContainer *visiblePatches, 57 const bool relativeVisibility, 58 const bool approximateVisibility 59 ) = 0; 60 53 /*virtual void ComputeCameraVisibility(const Camera &camera, 54 NodeInfoContainer *visibleNodes, 55 MeshInfoContainer *visibleGeometry, 56 PatchInfoContainer *visiblePatches, 57 const bool relativeVisibility, 58 const bool approximateVisibility) = 0; 59 */ 61 60 /** 62 61 Uses the specified point to execute the visibility query in all directions. 63 62 @sa ComputeCameraVisibility() 64 63 */ 65 virtual void64 /*virtual void 66 65 ComputeFromPointVisibility(const Vector3 &point, 67 NodeInfoContainer *visibleNodes, 68 MeshInfoContainer *visibleGeometry, 69 PatchInfoContainer *visiblePatches, 70 const bool relativeVisibility, 71 const bool approximateVisibility 72 ) = 0; 73 66 NodeInfoContainer *visibleNodes, 67 MeshInfoContainer *visibleGeometry, 68 PatchInfoContainer *visiblePatches, 69 const bool relativeVisibility, 70 const bool approximateVisibility) = 0; 71 */ 74 72 /** 75 73 Ray shooting interface: finds an intersection with objects in the scene. 76 74 77 75 @param ray The given input ray (assuming the ray direction is normalized) 78 79 76 @param visibleMeshes List of meshes intersecting the ray 80 81 77 @param isGlobalLine If false only first intersection with opaque object is returned. 82 78 Otherwise all intersections of the ray with the scene are found. 83 79 84 80 @return true if there is any intersection. 85 81 */ 86 virtual bool 87 ShootRay(const Ray &ray, 88 std::vector<Mesh *> *visibleMeshes, 89 bool isGlobalLine = false 90 ); 91 82 /*virtual bool ShootRay(const Ray &ray, 83 std::vector<Mesh *> *visibleMeshes, 84 bool isGlobalLine = false); 85 */ 92 86 /** Sets the hierarchy interface. 93 87 @remark the traversal depends on the type of hierarchyInterface the scene consists of. … … 101 95 protected: 102 96 103 HierarchyInterface *mHierarchyInterface;97 //HierarchyInterface *mHierarchyInterface; 104 98 int mQueryModes; 105 99 }; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityInfo.h
r318 r2280 4 4 #include <vector> 5 5 6 #include "VisibilityMesh.h"6 //#include "VisibilityMesh.h" 7 7 #include "HierarchyInterface.h" 8 8 … … 132 132 } 133 133 134 typedef VisibilityInfo<Patch *> PatchInfo;135 typedef VisibilityInfo<Mesh *> MeshInfo;136 typedef VisibilityInfo<HierarchyNode *> NodeInfo;137 138 139 134 template<class T> 140 135 struct InfoContainer … … 143 138 }; 144 139 145 typedef std::vector<PatchInfo> PatchInfoContainer;146 typedef std::vector<MeshInfo> MeshInfoContainer;147 typedef std::vector<NodeInfo> NodeInfoContainer;148 140 149 141 } // namespace GtpVisibility -
GTP/trunk/Lib/Vis/OnlineCullingCHC/include/VisibilityManager.h
r2278 r2280 68 68 VisibilityEnvironment *GetVisibilityEnvironment(); 69 69 70 70 71 protected: 71 72
Note: See TracChangeset
for help on using the changeset viewer.