#ifndef _SolidBoundingBox_H__ #define _SolidBoundingBox_H__ #include "OgreSimpleRenderable.h" namespace Ogre { /** A renderable of a solid bounding box using a material with no depth write, no colors, and no lighting. */ class __declspec(dllexport) SolidBoundingBox : public SimpleRenderable { public: SolidBoundingBox(); ~SolidBoundingBox(); /** Sets up the solid box. @param aab the axis aligned bounding box */ void SetupBoundingBox(const AxisAlignedBox& aabb); /** Builds the wireframe line list. @param aab the axis aligned bounding box for setting up the vertices */ void SetupBoundingBoxVertices(const AxisAlignedBox& aab); Real getSquaredViewDepth(const Camera* cam) const; Real getBoundingRadius(void) const { return mRadius; } protected: /** Sets the material used for occlusion queries. @remark the material is called "Visibility/QueryMaterial" and uses no lighting, no depth write, and no colours */ void SetOcclusionQueryMaterial(); /** Override this method to prevent parent transforms (rotation,translation,scale) */ void getWorldTransforms( Matrix4* xform ) const; /** @copydoc Renderable::getWorldOrientation */ const Quaternion& getWorldOrientation(void) const; /** @copydoc Renderable::getWorldPosition */ const Vector3& getWorldPosition(void) const; /** Builds the wireframe line list. */ void setupBoundingBoxVertices(const AxisAlignedBox& aab); Real mRadius; }; }// namespace Ogre #endif // SolidBoundingBox