Public Member Functions

sp::scene::BoundingVolume Class Reference

#include <spBoundingVolume.hpp>

List of all members.

Public Member Functions

 BoundingVolume ()
 BoundingVolume (const BoundingVolume &Other)
 ~BoundingVolume ()
bool checkFrustumCulling (const scene::ViewFrustum &Frustum, const dim::matrix4f &Transformation) const
void setType (const EBoundingVolumes Type)
EBoundingVolumes getType () const
void setBox (const dim::aabbox3df &BoundBox)
const dim::aabbox3dfgetBox () const
void setRadius (const f32 Radius)
 Sets the bounding-sphere radius if the bounding type is BOUNDING_SPHERE.
f32 getRadius () const

Constructor & Destructor Documentation

sp::scene::BoundingVolume::BoundingVolume (  ) 
sp::scene::BoundingVolume::BoundingVolume ( const BoundingVolume Other  ) 
sp::scene::BoundingVolume::~BoundingVolume (  ) 

Member Function Documentation

bool sp::scene::BoundingVolume::checkFrustumCulling ( const scene::ViewFrustum Frustum,
const dim::matrix4f Transformation 
) const

Proceeds frustum-culling for more optimization. This function is used in the mesh's "render" function.

Parameters:
Frustum,: ViewFrustum of the active camera. Camera objects can be activated by the SceneManager using "SceneManager::setActiveCamera".
Transformation,: Frustum's matrix transformation. Use the object's global transformation.
Returns:
True if the object is inside the frustum otherwise false.
const dim::aabbox3df& sp::scene::BoundingVolume::getBox (  )  const [inline]
f32 sp::scene::BoundingVolume::getRadius (  )  const [inline]
EBoundingVolumes sp::scene::BoundingVolume::getType (  )  const [inline]
void sp::scene::BoundingVolume::setBox ( const dim::aabbox3df BoundBox  )  [inline]

Sets the bounding box if the bounding type is BOUNDING_BOX.

Parameters:
BoundBox,: Axis-aligned-bounding-box which is to used for frustum-culling.
void sp::scene::BoundingVolume::setRadius ( const f32  Radius  )  [inline]

Sets the bounding-sphere radius if the bounding type is BOUNDING_SPHERE.

void sp::scene::BoundingVolume::setType ( const EBoundingVolumes  Type  )  [inline]

Sets the type of bounding box. This is used for frustum-culling only for Entity object. Use BOUNDING_NONE to disable frustum culling. Mostly used are bounding boxes. But bounding spheres are faster because of less calculation steps.

Parameters:
Type,: Type of the bounding volume.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines