[59] | 1 | #ifndef _BspHierarchyInterface_H__
|
---|
| 2 | #define _BspHierarchyInterface_H__
|
---|
| 3 |
|
---|
| 4 | #include "OgrePlatformHierarchyInterface.h"
|
---|
| 5 |
|
---|
| 6 | namespace Ogre {
|
---|
| 7 | /**
|
---|
| 8 | This class implements the hierarchy interface for the Ogre bsp hierarchy.
|
---|
| 9 | */
|
---|
| 10 | class BspHierarchyInterface : public PlatformHierarchyInterface
|
---|
| 11 | {
|
---|
| 12 | public:
|
---|
| 13 | BspHierarchyInterface(SceneManager *sm, RenderSystem *rsys);
|
---|
| 14 |
|
---|
| 15 | /** Gets the given option for the scene traverser.
|
---|
| 16 | @remarks
|
---|
| 17 | See setOption
|
---|
| 18 | */
|
---|
| 19 | //bool getOption( const String &, void * );
|
---|
| 20 | //bool getOptionKeys( StringVector &refKeys );
|
---|
[345] | 21 | void PullUpVisibility(GtpVisibility::HierarchyNode *node) const;
|
---|
[59] | 22 | /** Traverses given node.
|
---|
| 23 | @param node current node
|
---|
[155] | 24 | @remark pushes children on the distance queue
|
---|
[59] | 25 | */
|
---|
[158] | 26 | void TraverseNode(GtpVisibility::HierarchyNode *node);
|
---|
[59] | 27 | void RenderNode(GtpVisibility::HierarchyNode *node);
|
---|
[74] | 28 | bool IsLeaf(GtpVisibility::HierarchyNode *node) const;
|
---|
| 29 | bool HasGeometry(GtpVisibility::HierarchyNode *node) const;
|
---|
[87] | 30 | float GetSquaredDistance(GtpVisibility::HierarchyNode *node) const;
|
---|
[59] | 31 |
|
---|
[345] | 32 | void SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible) const;
|
---|
[74] | 33 | void SetLastVisited(GtpVisibility::HierarchyNode *node,
|
---|
[345] | 34 | const unsigned int frameId) const;
|
---|
[59] | 35 |
|
---|
[74] | 36 | bool IsNodeVisible(GtpVisibility::HierarchyNode *node) const;
|
---|
| 37 | unsigned int LastVisited(GtpVisibility::HierarchyNode *node) const;
|
---|
[59] | 38 |
|
---|
| 39 | protected:
|
---|
| 40 | /** Returns pointer to the bounding box of the node.
|
---|
| 41 | @param node current hierarchy node
|
---|
| 42 | @returns bounding box of current node
|
---|
| 43 | */
|
---|
| 44 | AxisAlignedBox *GetBoundingBox(GtpVisibility::HierarchyNode *node);
|
---|
| 45 | };
|
---|
| 46 | } // namespace Ogre
|
---|
| 47 |
|
---|
| 48 | #endif // BspHierarchyInterface_H |
---|