Changeset 1187 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Timestamp:
- 08/08/06 18:25:06 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h
r1183 r1187 207 207 virtual bool isEmpty() const = 0; 208 208 virtual bool hasGeometry() const = 0; 209 210 virtual void queueVisibleObjects(unsigned long currentFrame, 211 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes) = 0; 209 212 210 213 // consider using typesafe callback functions … … 288 291 int mLevel; 289 292 AxisAlignedBox mAABB; 290 protected:291 WireBoundingBox * mWBB;292 293 293 294 // for the CHC hierarchy interface 294 295 /** the real extent of the node. */ 295 296 AxisAlignedBox mWorldAABB; 297 protected: 298 WireBoundingBox * mWBB; 296 299 297 300 unsigned int mLastRendered; … … 327 330 virtual bool hasGeometry() const { return false; }; 328 331 332 virtual void queueVisibleObjects(unsigned long currentFrame, 333 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes) 334 { 335 if (showBoxes) 336 { 337 WireBoundingBox * wbb = getWireBoundingBox(); 338 if (wbb) 339 queue->addRenderable(wbb); 340 } 341 } 342 329 343 // branches do not posses geometry => just merge child aabbs 330 344 virtual void _updateBounds(bool recurse = true) … … 334 348 335 349 if (mLeft) 336 mWorldAABB.merge(mLeft-> _getWorldAABB());350 mWorldAABB.merge(mLeft->mWorldAABB); 337 351 if (mRight) 338 mWorldAABB.merge(mRight-> _getWorldAABB());352 mWorldAABB.merge(mRight->mWorldAABB); 339 353 340 354 // update parent recursively … … 367 381 virtual bool hasGeometry() const { return !mKdRenderables.empty(); }; 368 382 383 virtual void queueVisibleObjects(unsigned long currentFrame, 384 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes); 385 369 386 // update the world aabb based on the contained geometry 370 387 virtual void _updateBounds(bool recurse = true); … … 430 447 typedef KdTree::Branch * BranchPtr; 431 448 typedef KdTree::Leaf * LeafPtr; 449 450 typedef std::list<NodePtr> NodeList; 432 451 typedef std::set<LeafPtr> LeafSet; 433 452 … … 484 503 485 504 // test visibility of objects and add to render queue 486 void queueVisibleObjects(Camera* cam, RenderQueue* queue, bool onlyShadowCasters, 487 RenderMethod renderMethod, bool showBoxes = false); 505 void queueVisibleObjects(Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes = false); 488 506 489 507 // self-explanatory ... -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneManager.h
r1185 r1187 16 16 #include "OgreKdTree.h" 17 17 18 #define KDTREE_MAX_DEPTH 2018 #define KDTREE_MAX_DEPTH 12 19 19 20 20 namespace Ogre … … 134 134 /** Render a list of scenenodes 135 135 */ 136 virtual void _renderNodes(const KdRenderableList& nodelist, Camera * cam, 136 //virtual void _renderNodes(const KdRenderableList& nodelist, Camera * cam, 137 // bool onlyShadowCasters, int leavePassesInQueue); 138 virtual void _renderNode(KdTree::NodePtr node, Camera * cam, 137 139 bool onlyShadowCasters, int leavePassesInQueue); 138 140 … … 227 229 228 230 // remember visited scene nodes for viz 229 KdRenderableList mVisibleNodes; 231 //KdRenderableList mVisibleNodes; 232 KdTree::NodeList mVisibleNodes; 230 233 231 234 /************************************************************************/ -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeSceneNode.h
r1173 r1187 43 43 virtual AxisAlignedBox getBoundingBox() const; 44 44 45 // custom render op, show bounding box instead of axes 46 //virtual void getRenderOperation(RenderOperation& op); 47 45 48 //virtual void _findVisibleObjects(Camera* cam, RenderQueue* queue, 46 49 // bool includeChildren = true, bool displayNodes = false, bool onlyShadowCasters = false);
Note: See TracChangeset
for help on using the changeset viewer.