Changeset 1250 for GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Timestamp:
- 08/21/06 17:05:45 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTree.h
r1220 r1250 213 213 virtual bool isEmpty() const = 0; 214 214 virtual bool hasGeometry() const = 0; 215 216 virtual void mergeLeaves(std::set<Leaf *>& leaves) = 0; 215 217 216 218 // Gets this node's parent (NULL if this is the root). … … 223 225 // add contained objects to render queue 224 226 virtual void queueVisibleObjects(unsigned long currentFrame, 225 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes ) = 0;227 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes, bool fullVis = false) = 0; 226 228 227 229 // add contained geometry (Entities) to list … … 326 328 virtual bool hasGeometry() const { return false; }; 327 329 330 virtual void mergeLeaves(std::set<Leaf *>& leaves) 331 { 332 for (std::set<Leaf *>::iterator it = mLeaves.begin(); it != mLeaves.end(); it++) 333 leaves.insert(*it); 334 } 335 328 336 // a branch should have at least one child 329 337 virtual KdTree::Node * getLeftChild() const { return mLeft; }; … … 331 339 332 340 virtual void queueVisibleObjects(unsigned long currentFrame, 333 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes )341 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes, bool fullVis = false) 334 342 { 335 343 if (showBoxes) 336 344 if (mLevel == mOwner->getHiLiteLevel() || mOwner->getShowAllBoxes()) 337 345 queue->addRenderable(getWireBoundingBox()); 346 347 if (fullVis) 348 for (std::set<Leaf *>::iterator it = mLeaves.begin(); it != mLeaves.end(); it ++) 349 (*it)->queueVisibleObjects(currentFrame, cam, queue, onlyShadowCasters, showBoxes, fullVis); 338 350 } 339 351 … … 347 359 mWorldAABB.setNull(); 348 360 361 // merge box & leaves 349 362 if (mLeft) 363 { 350 364 mWorldAABB.merge(mLeft->mWorldAABB); 365 mLeft->mergeLeaves(mLeaves); 366 } 351 367 if (mRight) 368 { 352 369 mWorldAABB.merge(mRight->mWorldAABB); 370 mRight->mergeLeaves(mLeaves); 371 } 353 372 354 373 // update parent recursively … … 361 380 Plane * mSplitPlane; 362 381 PlaneEvent::Side mPlaneSide; 382 protected: 383 std::set<Leaf *> mLeaves; 363 384 }; 364 385 … … 373 394 374 395 // a leaf is a leaf, dammit 375 virtual bool isLeaf() const { return true; } ;396 virtual bool isLeaf() const { return true; } 376 397 377 398 // a leaf is empty when it does not posses renderables 378 virtual bool isEmpty() const { return mKdRenderables.empty(); } ;399 virtual bool isEmpty() const { return mKdRenderables.empty(); } 379 400 380 401 // a leaf has geometry when it has renderables 381 virtual bool hasGeometry() const { return !mKdRenderables.empty(); }; 402 virtual bool hasGeometry() const { return !mKdRenderables.empty(); } 403 404 // a leaf adds itself to the leaf set 405 virtual void mergeLeaves(std::set<Leaf *>& leaves) { leaves.insert(this); } 382 406 383 407 // a leaf never has children … … 386 410 387 411 virtual void queueVisibleObjects(unsigned long currentFrame, 388 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes );412 Camera* cam, RenderQueue* queue, bool onlyShadowCasters, bool showBoxes, bool fullVis = false); 389 413 390 414 virtual void getGeometryList(GtpVisibility::GeometryVector *geometryList); -
GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeCamera.h
r1212 r1250 51 51 // enhanced visibility 52 52 NodeVisibility getVisibilityEnhanced(const AxisAlignedBox& box) const; 53 54 // DEBUG 55 //mutable unsigned int mNumVisQueries; 53 56 protected: 54 57
Note: See TracChangeset
for help on using the changeset viewer.