source: trunk/VUT/Ogre/include/OgreSolidBoundingBox.h @ 117

Revision 117, 1.6 KB checked in by mattausch, 19 years ago (diff)
RevLine 
[92]1#ifndef _SolidBoundingBox_H__
2#define _SolidBoundingBox_H__
3
4#include "OgreSimpleRenderable.h"
5
6namespace Ogre {
7
8/** A renderable of a solid bounding box using a material with no depth write,
9        no colors, and no lighting.
10*/
11class SolidBoundingBox : public SimpleRenderable
12{
13public:
14
15        SolidBoundingBox();
16        ~SolidBoundingBox();
17        /** Sets up the solid box.
18                @param aab the axis aligned bounding box
19        */
20        void SetupBoundingBox(const AxisAlignedBox& aabb);
21       
22        /** Builds the wireframe line list.
23                @param aab the axis aligned bounding box for setting up the vertices
24    */
25        void SetupBoundingBoxVertices(const AxisAlignedBox& aab);
26
27        Real getSquaredViewDepth(const Camera* cam) const;
28
29        Real getBoundingRadius(void) const { return mRadius; }
30
31protected:
32                /**
33                        Sets the material used for occlusion queries.
[117]34                        @remark the material is called "Visibility/QueryMaterial" and
[92]35                        uses no lighting, no depth write, and no colours
36                */
37                void SetOcclusionQueryMaterial();
38        /** Override this method to prevent parent transforms (rotation,translation,scale)
39        */
40                void getWorldTransforms( Matrix4* xform ) const;
41        /** @copydoc Renderable::getWorldOrientation */
42        const Quaternion& getWorldOrientation(void) const;
43        /** @copydoc Renderable::getWorldPosition */
44        const Vector3& getWorldPosition(void) const;
45               
46        /** Builds the wireframe line list.
47        */
48                void setupBoundingBoxVertices(const AxisAlignedBox& aab);
49
50        Real mRadius;
51};
52
53}// namespace Ogre
54
55#endif // SolidBoundingBox
56
57
Note: See TracBrowser for help on using the repository browser.