Changeset 1173 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Timestamp:
- 07/31/06 17:34:56 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdRenderable.h
r1163 r1173 12 12 13 13 #include "OgreKdTree.h" 14 #include "HierarchyInterface.h" 14 15 15 16 namespace Ogre … … 33 34 // put all objects this element holds in the renedering queue 34 35 virtual void queueObjects(Camera* cam, RenderQueue* queue, bool onlyShadowCasters) = 0; 36 37 // place all entities in geometry queue (for CHC) 38 virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList) = 0; 35 39 36 40 // return a bounding box enclosing all objects -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h
r1170 r1173 27 27 #include <stack> 28 28 29 //#include "OgreKdTreeHierarchyInterface.h"30 29 31 30 … … 264 263 */ 265 264 bool isNodeVisible(void) { return mVisible; }; 266 /** Gets this node's parent (NULL if this is the root).267 */268 KdTree::Node *getParent(void) { return mParent; };269 265 /** Frame id when this octree was last rendered. 270 266 @return last rendered frame id … … 275 271 */ 276 272 void setLastRendered(unsigned int frameid) { mLastRendered = frameid; }; 277 278 /* do we need this? */ 279 /** Returns real extent of the octree, i.e., the merged extent of the bounding boxes. 273 /** Gets this node's parent (NULL if this is the root). 274 */ 275 KdTree::Branch *getParent(void) { return mParent; }; 276 /** Returns real extent of the kdtree, i.e., the merged extent of the bounding boxes. 280 277 */ 281 //AxisAlignedBox _getWorldAABB(void) const = 0; 278 AxisAlignedBox _getWorldAABB(void) const { return mWorldAABB; }; 279 /** Updates bound of the real aabb of kdtree 280 */ 281 virtual void _updateBounds() = 0; 282 282 283 283 … … 290 290 // for the CHC hierarchy interface 291 291 /** the real extent of the node. */ 292 //AxisAlignedBox mWorldAABB;293 292 AxisAlignedBox mWorldAABB; 293 294 294 unsigned int mLastRendered; 295 295 unsigned int mLastVisited; … … 323 323 // a branch never has geometry 324 324 virtual bool hasGeometry() const { return false; }; 325 326 // branches do not posses geometry => just merge child aabbs 327 virtual void _updateBounds() 328 { 329 // reset box 330 mWorldAABB.setNull(); 331 332 if (mLeft) 333 mWorldAABB.merge(mLeft->_getWorldAABB()); 334 if (mRight) 335 mWorldAABB.merge(mRight->_getWorldAABB()); 336 337 // update parent recursively 338 if (mParent) 339 mParent->_updateBounds(); 340 } 325 341 326 342 Node * mLeft; … … 347 363 // a leaf has geometry when it has renderables 348 364 virtual bool hasGeometry() const { return !mKdRenderables.empty(); }; 365 366 // update the world aabb based on the contained geometry 367 virtual void _updateBounds(); 349 368 350 369 virtual void remove(KdRenderable * rend) -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneManager.h
r1170 r1173 28 28 public: 29 29 KdTreeSceneManager(const String& name, GtpVisibility::VisibilityManager *vm); 30 //KdTreeSceneManager(const String& name, int maxdepth);31 30 ~KdTreeSceneManager(void); 32 31 … … 34 33 virtual SceneNode* createSceneNode(void); 35 34 virtual SceneNode* createSceneNode(const String& name); 36 void init( int maxdepth );37 void walkTree(KdTree * node, Camera *cam);38 35 39 36 virtual void _findVisibleObjects(Camera *cam, bool onlyShadowCasters); 37 38 virtual void _renderNodes(const KdRenderableList& nodelist, Camera * cam, 39 bool onlyShadowCasters, int leavePassesInQueue); 40 40 41 41 virtual void setShowBoxes(bool showboxes); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneNode.h
r1163 r1173 37 37 virtual void queueObjects(Camera* cam, RenderQueue* queue, bool onlyShadowCasters); 38 38 39 // place all entities in geometry queue (for CHC) 40 virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList); 41 39 42 // return a bounding box enclosing all objects 40 43 virtual AxisAlignedBox getBoundingBox() const;
Note: See TracChangeset
for help on using the changeset viewer.