source: branches/VUT/v2.0/Ogre/include/OgreSolidBoundingBox.h @ 156

Revision 156, 1.5 KB checked in by mattausch, 19 years ago (diff)
Line 
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 __declspec(dllexport) 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.
34                @remark the material is called "Visibility/QueryMaterial" and
35                uses no lighting, no depth write, and no colours
36        */
37        void SetOcclusionQueryMaterial();
38
39        /** Override this method to prevent parent transforms (rotation,translation,scale)
40    */
41        void getWorldTransforms( Matrix4* xform ) const;
42    /** @copydoc Renderable::getWorldOrientation */
43    const Quaternion& getWorldOrientation(void) const;
44    /** @copydoc Renderable::getWorldPosition */
45    const Vector3& getWorldPosition(void) const;
46               
47    /** Builds the wireframe line list.
48    */
49        void setupBoundingBoxVertices(const AxisAlignedBox& aab);
50
51    Real mRadius;
52};
53
54}// namespace Ogre
55
56#endif // SolidBoundingBox
57
58
Note: See TracBrowser for help on using the repository browser.