source: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreKdTreeCamera.h @ 1212

Revision 1212, 1.6 KB checked in by szydlowski, 18 years ago (diff)

added kdtree camera class

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of the GameTools Project
4http://www.gametools.org
5
6Author: Martin Szydlowski
7-----------------------------------------------------------------------------
8*/
9
10#ifndef _OgreKdTreeCamera_H_
11#define _OgreKdTreeCamera_H_
12
13#include <OgreCamera.h>
14
15#define KDCAMPTR_CAST(cam) (static_cast<KdTreeCamera *>(cam))
16
17namespace Ogre
18{
19
20class KdTreeCamera : public Camera
21{
22public:
23        enum NodeVisibility
24        {
25                KDNV_NONE,
26                KDNV_PART,
27                KDNV_FULL
28        };
29
30        //typedef NodeVisibility (KdTreeCamera::*VisFunction)(const AxisAlignedBox& box) const;
31
32        // default constructor
33        KdTreeCamera(const String& name, SceneManager *sm);
34        // default destructor
35        ~KdTreeCamera();
36
37        // chage vis mode
38        void setEnhancedVisMode(bool enhanced);
39        // query vis mode
40        bool getEnhancedVisMode(void);
41
42        // function pointer to the actual getvis function
43        // allows choosing between regular vis (NONE/PART, same es isVisible)
44        // and enhaced vis (NONE/PART/FULL) for early traversal abort
45        //NodeVisibility (KdTreeCamera::*getVisibility)(const AxisAlignedBox& box) const;
46        //VisFunction getVisibility;
47        //NodeVisibility getVisibility(const AxisAlignedBox& box ) const;
48
49        // regular visibility, like isVisible
50        NodeVisibility getVisibilitySimple(const AxisAlignedBox& box ) const;
51        // enhanced visibility
52        NodeVisibility getVisibilityEnhanced(const AxisAlignedBox& box) const;
53protected:
54
55        // flag indicating current vis mode, default is on (true)
56        bool mEnhancedVisMode;
57};
58
59} // namespace Ogre
60
61#endif // _OgreKdTreeCamera_H_
Note: See TracBrowser for help on using the repository browser.