source: branches/VUT/DummyModules/Ogre/include/OgreBspHierarchyInterface.h @ 59

Revision 59, 1.8 KB checked in by mattausch, 20 years ago (diff)

completely changed file structure plus software design

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);
29        bool HasGeometry(GtpVisibility::HierarchyNode *node);
30        bool HasGreaterDistance(GtpVisibility::HierarchyNode *node1,
31                                                    GtpVisibility::HierarchyNode *node2);
32       
33        void SetNodeVisible(GtpVisibility::HierarchyNode *node, const bool visible);
34        void SetLastVisited(GtpVisibility::HierarchyNode *node, const int frameId);
35
36        bool IsNodeVisible(GtpVisibility::HierarchyNode *node);
37        int LastVisited(GtpVisibility::HierarchyNode *node);
38
39protected:
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        /** Returns squared distance of center of box with respect to the camera .
46                @param cam current camera
47                @param box axis aligned box
48        */
49        Real GetSquaredViewDepth(const Camera* cam, const AxisAlignedBox* box) const;
50        unsigned int mNumOctreeNodes;
51};
52} // namespace Ogre
53
54#endif // BspHierarchyInterface_H
Note: See TracBrowser for help on using the repository browser.