Changeset 2280 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Timestamp:
- 03/22/07 18:24:13 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE
- Files:
-
- 28 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchy.h
r1344 r2280 228 228 229 229 // add contained geometry (Entities) to list 230 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList) = 0;230 virtual void getGeometryList(GeometryVector *geometryList) = 0; 231 231 232 232 // create (when necessary), setup and return wire bounding box representing the node … … 355 355 356 356 // a branch has no geometry, do nothing 357 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList) { }357 virtual void getGeometryList(GeometryVector *geometryList) { } 358 358 359 359 // branches do not posses geometry => just merge child aabbs … … 416 416 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes, bool fullVis = false); 417 417 418 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList);418 virtual void getGeometryList(GeometryVector *geometryList); 419 419 420 420 // update the world aabb based on the contained geometry -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchyInterface.h
r2259 r2280 91 91 */ 92 92 virtual void GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 93 G tpVisibility::GeometryVector *geometryList,93 GeometryVector *geometryList, 94 94 bool includeChildren); 95 95 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvHierarchySceneNode.h
r1320 r2280 35 35 36 36 // place all entities in geometry queue (for CHC) 37 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList);37 virtual void getGeometryList(GeometryVector *geometryList); 38 38 39 39 // return a bounding box enclosing all objects -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreBvhRenderable.h
r1320 r2280 35 35 36 36 // place all entities in geometry queue (for CHC) 37 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList) = 0;37 virtual void getGeometryList(GeometryVector *geometryList) = 0; 38 38 39 39 // return a bounding box enclosing all objects -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdRenderable.h
r1195 r2280 35 35 36 36 // place all entities in geometry queue (for CHC) 37 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList) = 0;37 virtual void getGeometryList(GeometryVector *geometryList) = 0; 38 38 39 39 // return a bounding box enclosing all objects -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h
r1312 r2280 31 31 #include "OgreKdTreeCamera.h" 32 32 #include "HierarchyInterface.h" 33 #include "VisibilityMesh.h" 33 34 34 35 … … 228 229 229 230 // add contained geometry (Entities) to list 230 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList) = 0;231 virtual void getGeometryList(GeometryVector *geometryList) = 0; 231 232 232 233 // create (when necessary), setup and return wire bounding box representing the node … … 351 352 352 353 // a branch has no geometry, do nothing 353 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList) { }354 virtual void getGeometryList(GeometryVector *geometryList) { } 354 355 355 356 // branches do not posses geometry => just merge child aabbs … … 412 413 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes, bool fullVis = false); 413 414 414 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList);415 virtual void getGeometryList(GeometryVector *geometryList); 415 416 416 417 // update the world aabb based on the contained geometry -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeHierarchyInterface.h
r2259 r2280 91 91 */ 92 92 virtual void GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 93 G tpVisibility::GeometryVector *geometryList,93 GeometryVector *geometryList, 94 94 bool includeChildren); 95 95 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneNode.h
r1203 r2280 35 35 36 36 // place all entities in geometry queue (for CHC) 37 virtual void getGeometryList(G tpVisibility::GeometryVector *geometryList);37 virtual void getGeometryList(GeometryVector *geometryList); 38 38 39 39 // return a bounding box enclosing all objects -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h
r2255 r2280 14 14 #include "ViewCellsManager.h" 15 15 #include "VisibilityInfo.h" 16 #include "VisibilityMesh.h" 16 17 17 18 … … 26 27 27 28 28 /** 29 This class extends the terrain scene manager, 30 using occlusion queries for visibility culling. 29 /** This class extends the terrain scene manager, using occlusion queries for 30 visibility culling. 31 31 */ 32 32 class __declspec(dllexport) OcclusionCullingSceneManager: public TerrainSceneManager … … 196 196 const bool nodeVisibility); 197 197 198 void AddVisibleMeshGeometryToQueue(const GtpVisibility::MeshInfoContainer &visibleGeometry,198 void AddVisibleMeshGeometryToQueue(const MeshInfoContainer &visibleGeometry, 199 199 Camera *cam); 200 void AddVisibleNodeGeometryToQueue(const GtpVisibility::NodeInfoContainer &visibleNodes, 200 201 void AddVisibleNodeGeometryToQueue(const NodeInfoContainer &visibleNodes, 201 202 Camera *cam); 202 203 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionQueriesQueryManager.h
r2255 r2280 2 2 #define _OcclusionQueriesQueryManager_H__ 3 3 4 4 5 #include "OgrePlatformQueryManager.h" 6 5 7 6 8 namespace Ogre { 7 9 8 /** 9 Class which implements a query manager for Ogre scene queries using occlusion queries. 10 class OgrePlatformHierarchyInterface; 11 class Viewport; 12 13 /** Class which implements a query manager for Ogre scene queries using occlusion queries. 10 14 */ 11 15 class __declspec(dllexport) OcclusionQueriesQueryManager: public PlatformQueryManager … … 15 19 on different hierarchy types, while reusing the implementation of the query methods. 16 20 */ 17 OcclusionQueriesQueryManager( GtpVisibility::HierarchyInterface *hierarchyInterface,21 OcclusionQueriesQueryManager(PlatformHierarchyInterface *hierarchyInterface, 18 22 Viewport *vp, 19 23 int queryModes, 20 int itemBufferMode); 21 24 int itemBufferMode): 25 PlatformQueryManager(hierarchyInterface, vp, queryModes), 26 mItemBufferMode(itemBufferMode) 27 {} 28 22 29 void ComputeCameraVisibility(const Camera &camera, 23 GtpVisibility::NodeInfoContainer *visibleNodes,24 GtpVisibility::MeshInfoContainer *visibleGeometry,25 GtpVisibility::PatchInfoContainer *visiblePatches,30 NodeInfoContainer *visibleNodes, 31 MeshInfoContainer *visibleGeometry, 32 PatchInfoContainer *visiblePatches, 26 33 const bool relativeVisibility, 27 34 const bool approximateVisibility); 28 35 29 /** 30 Uses the specified point to execute the visibility query in all directions. 31 @sa ComputeCameraVisibility() 36 /** Uses the specified point to execute the visibility query in all directions. 37 @sa ComputeCameraVisibility() 32 38 */ 33 39 void ComputeFromPointVisibility(const Vector3 &point, 34 GtpVisibility::NodeInfoContainer *visibleNodes,35 GtpVisibility::MeshInfoContainer *visibleGeometry,36 GtpVisibility::PatchInfoContainer *visiblePatches,40 NodeInfoContainer *visibleNodes, 41 MeshInfoContainer *visibleGeometry, 42 PatchInfoContainer *visiblePatches, 37 43 const bool relativeVisibility, 38 44 const bool approximateVisibility); … … 43 49 void CollectGeometryVisibility(GtpVisibility::QueryList::iterator &visQueryIt, 44 50 GtpVisibility::QueryList::iterator &projQueryIt, 45 G tpVisibility::GeometryVector *geometryList,46 GtpVisibility::MeshInfoContainer *visibleGeometry,51 GeometryVector *geometryList, 52 MeshInfoContainer *visibleGeometry, 47 53 bool relativeVisibility); 48 54 … … 50 56 GtpVisibility::QueryList::iterator &projQueryIt, 51 57 GtpVisibility::NodeVector *nodeList, 52 GtpVisibility::NodeInfoContainer *visibleNodes,58 NodeInfoContainer *visibleNodes, 53 59 bool relativeVisibility); 54 60 55 61 void CollectRelativeGeometryVisibilityForItemBuffer(GtpVisibility::QueryList::iterator &projQueryIt, 56 GtpVisibility::GeometryVector *geometryList,57 GtpVisibility::MeshInfoContainer *visibleGeometry);62 GeometryVector *geometryList, 63 MeshInfoContainer *visibleGeometry); 58 64 59 void CollectRelativePatchVisibilityForItemBuffer( 60 GtpVisibility::QueryList::iterator &projQueryIt, 61 GtpVisibility::PatchVector *patchList, 62 GtpVisibility::PatchInfoContainer *visiblePatches); 65 void CollectRelativePatchVisibilityForItemBuffer(GtpVisibility::QueryList::iterator &projQueryIt, 66 PatchVector *patchList, 67 PatchInfoContainer *visiblePatches); 63 68 64 69 void CollectPatchVisibility(GtpVisibility::QueryList::iterator &visQueryIt, 65 70 GtpVisibility::QueryList::iterator &projQueryIt, 66 GtpVisibility::PatchVector *patchList,67 GtpVisibility::PatchInfoContainer *visiblePatches,71 PatchVector *patchList, 72 PatchInfoContainer *visiblePatches, 68 73 bool relativeVisibility); 69 74 70 void RemoveDuplicateNodes( GtpVisibility::NodeInfoContainer *visibleNodes);71 void RemoveDuplicateGeometry( GtpVisibility::MeshInfoContainer *visibleMesh);72 void RemoveDuplicatePatches( GtpVisibility::PatchInfoContainer *visiblePatches);75 void RemoveDuplicateNodes(NodeInfoContainer *visibleNodes); 76 void RemoveDuplicateGeometry(MeshInfoContainer *visibleMesh); 77 void RemoveDuplicatePatches(PatchInfoContainer *visiblePatches); 73 78 74 79 /** Returns the patches of the geometry of a given node. … … 77 82 */ 78 83 virtual void GetNodePatchList(GtpVisibility::HierarchyNode *node, 79 GtpVisibility::PatchVector *patchList);84 PatchVector *patchList); 80 85 81 86 int mItemBufferMode; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOctreeHierarchyInterface.h
r2278 r2280 49 49 50 50 void GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 51 G tpVisibility::GeometryVector *geometryList,51 GeometryVector *geometryList, 52 52 bool includeChildren); 53 53 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformHierarchyInterface.h
r938 r2280 6 6 #include <OgreCamera.h> 7 7 #include <OgreRenderSystem.h> 8 9 //#include "OgreSolidHalfBoundingBox.h"10 8 #include "OgreSolidBoundingBox.h" 11 9 #include "HierarchyInterface.h" 12 10 #include "VisibilityInfo.h" 13 11 #include "OgrePlatformOcclusionQuery.h" 12 #include "VisibilityMesh.h" 13 14 14 15 15 16 /** This namespace contains the Ogre dependent classes. … … 114 115 void ResetQueries(); 115 116 117 /** Returns the geometry of a given hierarchy node. 118 @param node the hierarchy node containing the geometry 119 @param geometryList geometry is returned in this list 120 @param includeChildren if the geometry of the children should be taken into account 121 */ 122 virtual void GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 123 GeometryVector *geometryList, 124 bool includeChildren) = 0; 125 116 126 protected: 117 127 /** Renders the given geometry -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgrePlatformQueryManager.h
r2255 r2280 4 4 #include "VisibilityInfo.h" 5 5 #include "QueryManager.h" 6 #include "HierarchyInterface.h" 6 #include "OgrePlatformHierarchyInterface.h" 7 #include "VisibilityMesh.h" 8 7 9 8 10 namespace Ogre { 9 11 10 /** 11 Class which implements the QueryManager for Ogre scene queries. 12 /** Class which implements the QueryManager for Ogre scene queries. 12 13 */ 13 14 class __declspec(dllexport) PlatformQueryManager: public GtpVisibility::QueryManager … … 17 18 on different hierarchy types, while reusing the implementation of the query methods. 18 19 */ 19 PlatformQueryManager( GtpVisibility::HierarchyInterface *hierarchyInterface,20 PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface, 20 21 Viewport *vp, 21 int queryModes); 22 int queryModes) 23 : QueryManager(queryModes), 24 mViewport(vp), 25 mWasInitialised(false), 26 mHierarchyInterface(hierarchyInterface) 27 {} 22 28 23 /** 24 Uses the specified point to execute the visibility query in all directions. 25 @sa ComputeCameraVisibility() 29 /** Uses the specified point to execute the visibility query in all directions. 30 @sa ComputeCameraVisibility() 26 31 */ 27 v oid ComputeFromPointVisibility(const Vector3 &point,28 GtpVisibility::NodeInfoContainer *visibleNodes,29 GtpVisibility::MeshInfoContainer *visibleGeometry,30 GtpVisibility::PatchInfoContainer *visiblePatches,31 const bool relativeVisibility,32 const bool approximateVisibility);32 virtual void ComputeFromPointVisibility(const Vector3 &point, 33 NodeInfoContainer *visibleNodes, 34 MeshInfoContainer *visibleGeometry, 35 PatchInfoContainer *visiblePatches, 36 const bool relativeVisibility, 37 const bool approximateVisibility); 33 38 34 v oid ComputeCameraVisibility(const Camera &camera,35 GtpVisibility::NodeInfoContainer *visibleNodes,36 GtpVisibility::MeshInfoContainer *visibleGeometry,37 GtpVisibility::PatchInfoContainer *visiblePatches,38 const bool relativeVisibility,39 const bool approximateVisibility);39 virtual void ComputeCameraVisibility(const Camera &camera, 40 NodeInfoContainer *visibleNodes, 41 MeshInfoContainer *visibleGeometry, 42 PatchInfoContainer *visiblePatches, 43 const bool relativeVisibility, 44 const bool approximateVisibility); 40 45 41 bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false);46 //virtual bool ShootRay(const Ray &ray, std::vector<Mesh *> *visibleMeshes, bool isGlobalLine = false); 42 47 43 48 /** Sets a viewport for rendering. … … 46 51 47 52 protected: 53 48 54 #ifdef ITEM_BUFFER 49 void CollectItemBufferResults( 50 GtpVisibility::MeshInfoContainer *visibleGeometry, 51 GtpVisibility::PatchInfoContainer *visiblePatches); 55 void CollectItemBufferResults(MeshInfoContainer *visibleGeometry, 56 PatchInfoContainer *visiblePatches); 52 57 53 void InitItemBuffer( GtpVisibility::MeshInfoContainer *visibleGeometry,54 GtpVisibility::PatchInfoContainer *visiblePatches);58 void InitItemBuffer(MeshInfoContainer *visibleGeometry, 59 PatchInfoContainer *visiblePatches); 55 60 #endif // ITEM_BUFFER 56 61 57 62 Viewport *mViewport; 58 59 63 bool mWasInitialised; 64 65 PlatformHierarchyInterface *mHierarchyInterface; 60 66 }; 61 67 -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreSceneNodeHierarchyInterface.h
r2259 r2280 43 43 44 44 void GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 45 GtpVisibility::GeometryVector *geometryList,46 bool includeChildren);45 GeometryVector *geometryList, 46 bool includeChildren); 47 47 48 48 void DetermineFullVisibility(GtpVisibility::HierarchyNode *node) const {} -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/VisibilityMesh.h
r159 r2280 2 2 #define _VisibilityMesh_H__ 3 3 4 //#include <OgreMesh.h> 4 5 5 #include <OgreEntity.h> 6 #include "VisibilityInfo.h" 6 7 7 8 namespace GtpVisibility { … … 11 12 12 13 14 typedef std::vector<GtpVisibility::Mesh *> GeometryVector; 15 typedef std::vector<GtpVisibility::Patch *> PatchVector; 16 17 18 typedef GtpVisibility::VisibilityInfo<GtpVisibility::Patch *> PatchInfo; 19 typedef GtpVisibility::VisibilityInfo<GtpVisibility::Mesh *> MeshInfo; 20 typedef GtpVisibility::VisibilityInfo<GtpVisibility::HierarchyNode *> NodeInfo; 21 22 23 typedef std::vector<PatchInfo> PatchInfoContainer; 24 typedef std::vector<MeshInfo> MeshInfoContainer; 25 typedef std::vector<NodeInfo> NodeInfoContainer; 26 27 13 28 #endif // VisibilityMesh.h -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchy.cpp
r2069 r2280 1713 1713 1714 1714 //------------------------------------------------------------------------- 1715 void BvHierarchy::Leaf::getGeometryList(G tpVisibility::GeometryVector *geometryList)1715 void BvHierarchy::Leaf::getGeometryList(GeometryVector *geometryList) 1716 1716 { 1717 1717 BvhRenderableList::iterator it = mBvhRenderables.begin(); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchyInterface.cpp
r2258 r2280 138 138 139 139 void BvHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 140 G tpVisibility::GeometryVector *geometryList,140 GeometryVector *geometryList, 141 141 bool includeChildren) 142 142 { -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreBvHierarchySceneNode.cpp
r1320 r2280 136 136 } 137 137 138 void BvHierarchySceneNode::getGeometryList(G tpVisibility::GeometryVector *geometryList)138 void BvHierarchySceneNode::getGeometryList(GeometryVector *geometryList) 139 139 { 140 140 SceneNode::ObjectIterator objIt = getAttachedObjectIterator(); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTree.cpp
r2069 r2280 1707 1707 1708 1708 //------------------------------------------------------------------------- 1709 void KdTree::Leaf::getGeometryList(G tpVisibility::GeometryVector *geometryList)1709 void KdTree::Leaf::getGeometryList(GeometryVector *geometryList) 1710 1710 { 1711 1711 KdRenderableList::iterator it = mKdRenderables.begin(); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeHierarchyInterface.cpp
r2066 r2280 136 136 137 137 void KdTreeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 138 G tpVisibility::GeometryVector *geometryList,138 GeometryVector *geometryList, 139 139 bool includeChildren) 140 140 { -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreKdTreeSceneNode.cpp
r1203 r2280 136 136 } 137 137 138 void KdTreeSceneNode::getGeometryList(G tpVisibility::GeometryVector *geometryList)138 void KdTreeSceneNode::getGeometryList(GeometryVector *geometryList) 139 139 { 140 140 SceneNode::ObjectIterator objIt = getAttachedObjectIterator(); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
r2278 r2280 12 12 #include <OgreIteratorWrappers.h> 13 13 #include <OgreHeightmapTerrainPageSource.h> 14 //#include "Containers.h"15 14 #include "ViewCellsManager.h" 16 15 #include <OgreConfigFile.h> 17 16 #include "OgreTypeConverter.h" 18 17 #include "OgreMeshInstance.h" 19 //#include "common.h"20 18 #include "OgreBoundingBoxConverter.h" 21 19 #include <OgreManualObject.h> … … 1160 1158 if (key == "HierarchyInterface") 1161 1159 { 1162 * static_cast< GtpVisibility::HierarchyInterface **>(val) = mHierarchyInterface;1160 * static_cast<PlatformHierarchyInterface **>(val) = mHierarchyInterface; 1163 1161 return true; 1164 1162 } … … 1643 1641 LoadViewCells(filename, mObjects, false, &bconverter); 1644 1642 1645 Ogre::LogManager::getSingleton().logMessage("******** view cells loaded *********");1643 LogManager::getSingleton().logMessage("******** view cells loaded *********"); 1646 1644 1647 1645 // objects are set to invisible initially … … 2027 2025 return; 2028 2026 } 2029 2027 Ogre::LogManager::getSingleton().logMessage("here99"); 2030 2028 Root::getSingleton()._setCurrentSceneManager(this); 2031 2029 mActiveQueuedRenderableVisitor->targetSceneMgr = this; … … 2227 2225 mVisibilityManager->SetQueryManager(queryManager); 2228 2226 2229 GtpVisibility::NodeInfoContainer visibleNodes;2230 GtpVisibility::MeshInfoContainer visibleGeometry;2231 GtpVisibility::PatchInfoContainer visiblePatches;2227 NodeInfoContainer visibleNodes; 2228 MeshInfoContainer visibleGeometry; 2229 PatchInfoContainer visiblePatches; 2232 2230 2233 2231 if (fromPoint) … … 2271 2269 if (!nodeVisibility) 2272 2270 { 2273 GtpVisibility::MeshInfoContainer::iterator geomIt, geomIt_end = visibleGeometry.end();2271 MeshInfoContainer::iterator geomIt, geomIt_end = visibleGeometry.end(); 2274 2272 2275 2273 for (geomIt = visibleGeometry.begin(); geomIt != geomIt_end; ++geomIt) … … 2294 2292 //-- apply queries on node level 2295 2293 2296 GtpVisibility::NodeInfoContainer::iterator nodesIt, nodesIt_end = visibleNodes.end();2294 NodeInfoContainer::iterator nodesIt, nodesIt_end = visibleNodes.end(); 2297 2295 2298 2296 for (nodesIt = visibleNodes.begin(); nodesIt != nodesIt_end; ++ nodesIt) … … 2433 2431 //----------------------------------------------------------------------- 2434 2432 void OcclusionCullingSceneManager::AddVisibleMeshGeometryToQueue( 2435 const GtpVisibility::MeshInfoContainer &visibleGeometry,2433 const MeshInfoContainer &visibleGeometry, 2436 2434 Camera *cam) 2437 2435 { 2438 GtpVisibility::MeshInfoContainer::const_iterator geomIt, geomIt_end = visibleGeometry.end();2436 MeshInfoContainer::const_iterator geomIt, geomIt_end = visibleGeometry.end(); 2439 2437 2440 2438 for (geomIt = visibleGeometry.begin(); geomIt != geomIt_end; ++geomIt) … … 2456 2454 //----------------------------------------------------------------------- 2457 2455 void OcclusionCullingSceneManager::AddVisibleNodeGeometryToQueue( 2458 const GtpVisibility::NodeInfoContainer &visibleNodes,2456 const NodeInfoContainer &visibleNodes, 2459 2457 Camera *cam) 2460 2458 { … … 2462 2460 //-- apply queries on node level 2463 2461 2464 GtpVisibility::NodeInfoContainer::const_iterator nodesIt, nodesIt_end = visibleNodes.end();2462 NodeInfoContainer::const_iterator nodesIt, nodesIt_end = visibleNodes.end(); 2465 2463 2466 2464 for (nodesIt = visibleNodes.begin(); nodesIt != nodesIt_end; ++ nodesIt) … … 2529 2527 mVisibilityManager->SetQueryManager(queryManager); 2530 2528 2531 GtpVisibility::NodeInfoContainer visibleNodes;2532 GtpVisibility::MeshInfoContainer visibleGeometry;2533 GtpVisibility::PatchInfoContainer visiblePatches;2529 NodeInfoContainer visibleNodes; 2530 MeshInfoContainer visibleGeometry; 2531 PatchInfoContainer visiblePatches; 2534 2532 2535 2533 if (mUseFromPointQueries) -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionQueriesQueryManager.cpp
r2255 r2280 1 #include "OgreOcclusionQueriesQueryManager.h"2 1 #include <OgreLogManager.h> 3 2 #include <OgreStringConverter.h> 4 3 #include <vector> 5 4 #include <OgreSubEntity.h> 6 #include "OgrePlatformHierarchyInterface.h" 5 6 #include "OgreOcclusionQueriesQueryManager.h" 7 //#include "OgrePlatformHierarchyInterface.h" 7 8 #include "OgreOcclusionCullingSceneManager.h" 8 9 #include "VisibilityEnvironment.h" … … 13 14 14 15 //----------------------------------------------------------------------- 15 OcclusionQueriesQueryManager::OcclusionQueriesQueryManager(16 GtpVisibility::HierarchyInterface *hierarchyInterface,16 /*OcclusionQueriesQueryManager::OcclusionQueriesQueryManager( 17 PlatformHierarchyInterface *hierarchyInterface, 17 18 Viewport *vp, 18 19 int queryModes, 19 int itemBufferMode) :20 PlatformQueryManager(hierarchyInterface, vp, queryModes),20 int itemBufferMode) 21 :PlatformQueryManager(hierarchyInterface, vp, queryModes), 21 22 mItemBufferMode(itemBufferMode) 22 23 { 23 } 24 }*/ 24 25 //----------------------------------------------------------------------- 25 26 void OcclusionQueriesQueryManager::ComputeCameraVisibility( 26 27 const Camera &camera, 27 GtpVisibility::NodeInfoContainer *visibleNodes,28 GtpVisibility::MeshInfoContainer *visibleGeometry,29 GtpVisibility::PatchInfoContainer *visiblePatches,28 NodeInfoContainer *visibleNodes, 29 MeshInfoContainer *visibleGeometry, 30 PatchInfoContainer *visiblePatches, 30 31 const bool relativeVisibility, 31 32 const bool approximateVisibility) … … 119 120 120 121 // vector for storing entities of meshes 121 G tpVisibility::GeometryVector geometryList;122 GeometryVector geometryList; 122 123 123 124 // store geometry of the hierarchy nodes in a geometry list … … 131 132 132 133 // geometry list iterator 133 G tpVisibility::GeometryVector::iterator geometryIt, geometryIt_end = geometryList.end();134 GeometryVector::iterator geometryIt, geometryIt_end = geometryList.end(); 134 135 135 136 // vector for storing subentities of meshes 136 GtpVisibility::PatchVector patchList;137 PatchVector patchList; 137 138 138 139 // store patchges of the geometries in a patch list … … 145 146 } 146 147 147 GtpVisibility::PatchVector::iterator patchIt, patchIt_end = patchList.end();148 PatchVector::iterator patchIt, patchIt_end = patchList.end(); 148 149 149 150 // to obtain the correct number of projected pixels, depth write must be disabled … … 183 184 const int projPixels = 1; 184 185 185 visibleNodes->push_back( GtpVisibility::NodeInfo(*nodeIt, visPixels, projPixels));186 visibleNodes->push_back(NodeInfo(*nodeIt, visPixels, projPixels)); 186 187 queryList[i].push_back(NULL); 187 188 } … … 207 208 const int projPixels = 1; 208 209 209 visibleGeometry->push_back( GtpVisibility::MeshInfo(*geometryIt, visPixels, projPixels));210 visibleGeometry->push_back(MeshInfo(*geometryIt, visPixels, projPixels)); 210 211 } 211 212 else … … 229 230 const int projPixels = 1; 230 231 231 visiblePatches->push_back( GtpVisibility::PatchInfo(*patchIt, visPixels, projPixels));232 visiblePatches->push_back(PatchInfo(*patchIt, visPixels, projPixels)); 232 233 } 233 234 else … … 304 305 void OcclusionQueriesQueryManager::ComputeFromPointVisibility( 305 306 const Vector3 &point, 306 GtpVisibility::NodeInfoContainer *visibleNodes,307 GtpVisibility::MeshInfoContainer *visibleGeometry,308 GtpVisibility::PatchInfoContainer *visiblePatches,307 NodeInfoContainer *visibleNodes, 308 MeshInfoContainer *visibleGeometry, 309 PatchInfoContainer *visiblePatches, 309 310 const bool relativeVisibility, 310 311 const bool approximateVisibility) … … 336 337 GtpVisibility::QueryList::iterator &projQueryIt, 337 338 GtpVisibility::NodeVector *nodeList, 338 GtpVisibility::NodeInfoContainer *visibleNodes,339 NodeInfoContainer *visibleNodes, 339 340 bool relativeVisibility) 340 341 { … … 368 369 if (visiblePixels > 0) 369 370 { 370 visibleNodes->push_back( 371 GtpVisibility::NodeInfo(*nodeIt, visiblePixels, projectedPixels)); 371 visibleNodes->push_back(NodeInfo(*nodeIt, visiblePixels, projectedPixels)); 372 372 } 373 373 } … … 376 376 void OcclusionQueriesQueryManager::CollectRelativeGeometryVisibilityForItemBuffer( 377 377 GtpVisibility::QueryList::iterator &projQueryIt, 378 G tpVisibility::GeometryVector *geometryList,379 GtpVisibility::MeshInfoContainer *visibleGeometry)380 { 381 G tpVisibility::GeometryVector::iterator geometryIt;378 GeometryVector *geometryList, 379 MeshInfoContainer *visibleGeometry) 380 { 381 GeometryVector::iterator geometryIt; 382 382 383 383 //-- queries for geometry … … 400 400 void OcclusionQueriesQueryManager::CollectRelativePatchVisibilityForItemBuffer( 401 401 GtpVisibility::QueryList::iterator &projQueryIt, 402 GtpVisibility::PatchVector *patchList,403 GtpVisibility::PatchInfoContainer *visiblePatches)404 { 405 GtpVisibility::PatchVector::iterator patchIt;402 PatchVector *patchList, 403 PatchInfoContainer *visiblePatches) 404 { 405 PatchVector::iterator patchIt; 406 406 407 407 //-- queries for geometry … … 425 425 GtpVisibility::QueryList::iterator &visQueryIt, 426 426 GtpVisibility::QueryList::iterator &projQueryIt, 427 G tpVisibility::GeometryVector *geometryList,428 GtpVisibility::MeshInfoContainer *visibleGeometry,427 GeometryVector *geometryList, 428 MeshInfoContainer *visibleGeometry, 429 429 bool relativeVisibility) 430 430 { 431 G tpVisibility::GeometryVector::iterator geometryIt;431 GeometryVector::iterator geometryIt; 432 432 433 433 //-- queries for geometry … … 451 451 if (visiblePixels > 0) 452 452 { 453 visibleGeometry->push_back(GtpVisibility::MeshInfo(*geometryIt, visiblePixels, 454 projectedPixels)); 453 visibleGeometry->push_back(MeshInfo(*geometryIt, visiblePixels, projectedPixels)); 455 454 } 456 455 } … … 460 459 GtpVisibility::QueryList::iterator &visQueryIt, 461 460 GtpVisibility::QueryList::iterator &projQueryIt, 462 GtpVisibility::PatchVector *patchList,463 GtpVisibility::PatchInfoContainer *visiblePatches,461 PatchVector *patchList, 462 PatchInfoContainer *visiblePatches, 464 463 bool relativeVisibility) 465 464 { 466 GtpVisibility::PatchVector::iterator patchIt;465 PatchVector::iterator patchIt; 467 466 468 467 //-- queries for patch … … 486 485 if (visiblePixels > 0) 487 486 { 488 visiblePatches->push_back( GtpVisibility::PatchInfo(*patchIt, visiblePixels,489 projectedPixels));487 visiblePatches->push_back( 488 PatchInfo(*patchIt, visiblePixels, projectedPixels)); 490 489 } 491 490 } … … 493 492 //----------------------------------------------------------------------- 494 493 void OcclusionQueriesQueryManager::RemoveDuplicateNodes( 495 GtpVisibility::NodeInfoContainer *visibleNodes)494 NodeInfoContainer *visibleNodes) 496 495 { 497 496 sort(visibleNodes->begin(), visibleNodes->end()); 498 497 499 GtpVisibility::NodeInfoContainer::iterator visibleNodesIt,498 NodeInfoContainer::iterator visibleNodesIt, 500 499 visibleNodesIt_end = visibleNodes->end(); 501 500 502 GtpVisibility::NodeInfo *nodeInfo = NULL;501 NodeInfo *nodeInfo = NULL; 503 502 504 503 for (visibleNodesIt = visibleNodes->begin(); visibleNodesIt != visibleNodesIt_end; … … 521 520 //----------------------------------------------------------------------- 522 521 void OcclusionQueriesQueryManager::RemoveDuplicateGeometry( 523 GtpVisibility::MeshInfoContainer *visibleGeometry)522 MeshInfoContainer *visibleGeometry) 524 523 { 525 524 sort(visibleGeometry->begin(), visibleGeometry->end()); 526 525 527 GtpVisibility::MeshInfoContainer::iterator visibleGeomIt,526 MeshInfoContainer::iterator visibleGeomIt, 528 527 visibleGeomIt_end = visibleGeometry->end(); 529 528 530 GtpVisibility::MeshInfo *geomInfo = NULL;529 MeshInfo *geomInfo = NULL; 531 530 532 531 for (visibleGeomIt = visibleGeometry->begin(); visibleGeomIt != visibleGeomIt_end; … … 549 548 //----------------------------------------------------------------------- 550 549 void OcclusionQueriesQueryManager::RemoveDuplicatePatches( 551 GtpVisibility::PatchInfoContainer *visiblePatches)550 PatchInfoContainer *visiblePatches) 552 551 { 553 552 sort(visiblePatches->begin(), visiblePatches->end()); 554 553 555 GtpVisibility::PatchInfoContainer::iterator visiblePatchIt,554 PatchInfoContainer::iterator visiblePatchIt, 556 555 visiblePatchIt_end = visiblePatches->end(); 557 556 558 GtpVisibility::PatchInfo *patchInfo = NULL;557 PatchInfo *patchInfo = NULL; 559 558 560 559 for (visiblePatchIt = visiblePatches->begin(); visiblePatchIt != visiblePatchIt_end; … … 577 576 //----------------------------------------------------------------------- 578 577 void OcclusionQueriesQueryManager::GetNodePatchList(GtpVisibility::HierarchyNode *node, 579 GtpVisibility::PatchVector *patchList)580 { 581 G tpVisibility::GeometryVector geomList;578 PatchVector *patchList) 579 { 580 GeometryVector geomList; 582 581 mHierarchyInterface->GetNodeGeometryList(node, &geomList, false); 583 582 584 583 // geometry list iterator 585 G tpVisibility::GeometryVector::iterator geomIt, geomIt_end = geomList.end();584 GeometryVector::iterator geomIt, geomIt_end = geomList.end(); 586 585 587 586 for (geomIt = geomList.begin(); geomIt != geomIt_end; ++geomIt) -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOctreeHierarchyInterface.cpp
r2278 r2280 189 189 int y = (i & 2) / 2; 190 190 int z = i & 1; 191 191 Ogre::LogManager::getSingleton().logMessage("y"); 192 192 //std::stringstream d; d << "x " << x << " y " << y << " z " << z; 193 193 //LogManager::getSingleton().logMessage(d.str()); … … 304 304 //----------------------------------------------------------------------- 305 305 void OctreeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 306 G tpVisibility::GeometryVector *geometryList,306 GeometryVector *geometryList, 307 307 bool includeChildren) 308 308 { -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgrePlatformQueryManager.cpp
r2255 r2280 8 8 #include "OgrePlatformHierarchyInterface.h" 9 9 10 11 10 12 namespace Ogre { 11 13 12 14 //----------------------------------------------------------------------- 13 PlatformQueryManager::PlatformQueryManager(GtpVisibility::HierarchyInterface *hierarchyInterface, 15 /* 16 PlatformQueryManager::PlatformQueryManager(PlatformHierarchyInterface *hierarchyInterface, 14 17 Viewport *vp, 15 18 int queryModes): 16 QueryManager(hierarchyInterface, queryModes), 19 //QueryManager(hierarchyInterface, queryModes), 20 QueryManager(queryModes), 17 21 mViewport(vp), 18 mWasInitialised(false) 19 { 20 } 21 //----------------------------------------------------------------------- 22 bool PlatformQueryManager::ShootRay(const Ray &ray, 22 mWasInitialised(false), 23 mHierarchyInterface(hierarchyInterface) 24 { 25 }*/ 26 //----------------------------------------------------------------------- 27 /*bool PlatformQueryManager::ShootRay(const Ray &ray, 23 28 std::vector<Mesh *> *visibleMeshes, 24 29 bool isGlobalLine) … … 26 31 // run OGRE ray shooting query 27 32 return false; 28 } 33 }*/ 29 34 //----------------------------------------------------------------------- 30 35 void PlatformQueryManager::ComputeFromPointVisibility( 31 const Vector3 &point,32 GtpVisibility::NodeInfoContainer *visibleNodes,33 GtpVisibility::MeshInfoContainer *visibleGeometry,34 GtpVisibility::PatchInfoContainer *visiblePatches,35 const bool relativeVisibility,36 const bool approximateVisibility)36 const Vector3 &point, 37 NodeInfoContainer *visibleNodes, 38 MeshInfoContainer *visibleGeometry, 39 PatchInfoContainer *visiblePatches, 40 const bool relativeVisibility, 41 const bool approximateVisibility) 37 42 { 38 43 SceneManager *sm = … … 105 110 void PlatformQueryManager::ComputeCameraVisibility( 106 111 const Camera &camera, 107 GtpVisibility::NodeInfoContainer *visibleNodes,108 GtpVisibility::MeshInfoContainer *visibleGeometry,109 GtpVisibility::PatchInfoContainer *visiblePatches,112 NodeInfoContainer *visibleNodes, 113 MeshInfoContainer *visibleGeometry, 114 PatchInfoContainer *visiblePatches, 110 115 const bool relativeVisibility, 111 116 const bool approximateVisibility) … … 162 167 //----------------------------------------------------------------------- 163 168 void PlatformQueryManager::CollectItemBufferResults( 164 GtpVisibility::MeshInfoContainer *visibleGeometry,165 GtpVisibility::PatchInfoContainer *visiblePatches)169 MeshInfoContainer *visibleGeometry, 170 PatchInfoContainer *visiblePatches) 166 171 { 167 172 int dimx = 0; … … 205 210 //----------------------------------------------------------------------- 206 211 void PlatformQueryManager::InitItemBuffer( 207 GtpVisibility::MeshInfoContainer *visibleGeometry,208 GtpVisibility::PatchInfoContainer *visiblePatches)212 MeshInfoContainer *visibleGeometry, 213 PatchInfoContainer *visiblePatches) 209 214 { 210 215 if (mWasInitialised) -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneContentGenerator.cpp
r2278 r2280 54 54 const Quaternion &orientation, const String& objName) 55 55 { 56 char name[ 25];56 char name[300]; 57 57 58 58 sprintf(name, "%s Entity%d", objName.c_str(), GetObjectCount()); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSceneNodeHierarchyInterface.cpp
r370 r2280 137 137 //----------------------------------------------------------------------- 138 138 void SceneNodeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node, 139 GtpVisibility::GeometryVector *geometryList,140 bool includeChildren)139 GeometryVector *geometryList, 140 bool includeChildren) 141 141 { 142 142 SceneNode::ObjectIterator objIt = -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp
r1320 r2280 29 29 #include <OgreRoot.h> 30 30 #include <OgreLogManager.h> 31 #include <fstream> 31 32 32 33 #include "OgreBvHierarchySceneManager.h" 33 34 #include "VisibilityManager.h" 34 35 #include "VisibilityEnvironment.h" 35 36 #include "CullingManager.h" 37 38 36 39 GtpVisibility::VisibilityEnvironment *visEnv; 37 40 GtpVisibility::VisibilityManager *visManager; -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/Plugin_VisibilitySceneManager.vcproj
r2278 r2280 282 282 <Configuration 283 283 Name="Release Internal|Win32" 284 OutputDirectory=" Release"285 IntermediateDirectory=" Release"284 OutputDirectory="..\lib\Release" 285 IntermediateDirectory="..\obj\Release" 286 286 ConfigurationType="2" 287 287 CharacterSet="2" … … 293 293 InlineFunctionExpansion="2" 294 294 EnableIntrinsicFunctions="TRUE" 295 ImproveFloatingPointConsistency=" TRUE"295 ImproveFloatingPointConsistency="FALSE" 296 296 FavorSizeOrSpeed="1" 297 297 OmitFramePointers="TRUE" … … 300 300 OptimizeForWindowsApplication="TRUE" 301 301 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;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\include;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\include" 302 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GTP_VISIBILITY_MODIFIED_OGRE; PLUGIN_KD_TERRAIN_EXPORTS"302 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE;PLUGIN_KD_TERRAIN_EXPORTS" 303 303 StringPooling="TRUE" 304 304 RuntimeLibrary="2" … … 322 322 AdditionalLibraryDirectories=""$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\Release";"$(OGRE_PATH)\OgreMain\lib\Release";"$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib";..\..\GtpVisibility\lib\Release;..\..\lib\Release;..\lib\Release;"$(OGRE_PATH)\Dependencies\lib\Release";..\..\..\Preprocessing\lib\Release;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;..\..\..\Preprocessing\src\GL;"$(CG_LIB_PATH)";..\..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\Lib\Vis\Preprocessing\MultiLevelRayTracing\RTWorld\Release;..\..\..\..\..\Lib\Vis\Preprocessing\MultiLevelRayTracing\RTScene\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\Release;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\ObjReader\lib\Release" 323 323 ModuleDefinitionFile="..\misc\OgreVisibilitySceneManager.def" 324 GenerateDebugInformation=" TRUE"324 GenerateDebugInformation="FALSE" 325 325 SubSystem="2" 326 326 OptimizeReferences="2" … … 635 635 RelativePath="..\include\OgreVisibilityOptionsManager.h"> 636 636 </File> 637 <File 638 RelativePath="..\include\VisibilityMesh.h"> 639 </File> 637 640 </Filter> 638 641 <Filter
Note: See TracChangeset
for help on using the changeset viewer.