source: trunk/VUT/Ogre/include/OgreBspHierarchyInterface.h @ 74

Revision 74, 1.9 KB checked in by mattausch, 20 years ago (diff)

added support for release mode

Line 
1#ifndef _BspHierarchyInterface_H__
2#define _BspHierarchyInterface_H__
3
4#include "OgrePlatformHierarchyInterface.h"
5
6namespace Ogre {
7/**
8        This class implements the hierarchy interface for the Ogre bsp hierarchy.
9*/
10class BspHierarchyInterface : public PlatformHierarchyInterface
11{
12public:
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 );
21        void PullUpVisibility(GtpVisibility::HierarchyNode *node);
22        /** Traverses given node.
23                @param node current node
24                @remark pushes children on distance queue
25        */
26        void TraverseNode(GtpVisibility::HierarchyNode *node);
27        void RenderNode(GtpVisibility::HierarchyNode *node);
28        bool IsLeaf(GtpVisibility::HierarchyNode *node) const;
29        bool HasGeometry(GtpVisibility::HierarchyNode *node) const;
30        bool HasGreaterDistance(GtpVisibility::HierarchyNode *node1,
31                                                    GtpVisibility::HierarchyNode *node2) const;
32       
33        void SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible);
34        void SetLastVisited(GtpVisibility::HierarchyNode *node,
35                                                const unsigned int frameId);
36
37        bool IsNodeVisible(GtpVisibility::HierarchyNode *node) const;
38        unsigned int LastVisited(GtpVisibility::HierarchyNode *node) const;
39
40protected:
41        /** Returns pointer to the bounding box of the node.
42                @param node current hierarchy node
43                @returns bounding box of current node
44        */
45        AxisAlignedBox *GetBoundingBox(GtpVisibility::HierarchyNode *node);
46        /** Returns squared distance of center of box with respect to the camera .
47                @param cam current camera
48                @param box axis aligned box
49        */
50        Real GetSquaredViewDepth(const Camera* cam, const AxisAlignedBox* box) const;
51        unsigned int mNumOctreeNodes;
52};
53} // namespace Ogre
54
55#endif // BspHierarchyInterface_H
Note: See TracBrowser for help on using the repository browser.