ES3D::DynamicBoundingSpheref Class Reference

#include <DynamicBoundingSpheref.h>

Inheritance diagram for ES3D::DynamicBoundingSpheref:

ES3D::BoundingSpheref List of all members.

Public Member Functions

 DynamicBoundingSpheref (Modelf *model, GLbyte level)
virtual ~DynamicBoundingSpheref ()
virtual GLfloat getRadiusf (GLvoid)
GLboolean collidesBoundingSpheref (GLbyte *search, GLubyte searchSize, GLbyte *hitJoint, DynamicBoundingSpheref *other, GLbyte *searchOther, GLubyte searchSizeOther, GLbyte *hitJointOther, GLboolean exact, GLbyte stopAtLevel)
GLboolean intersectsBoundingSpheref (GLbyte *search, GLubyte searchSize, GLbyte *hitJoint, GLfloat hitPoint[3], GLfloat start[3], GLfloat point[3], GLboolean exact, GLbyte stopAtLevel)

Public Attributes

GLboolean updateRadius

Protected Member Functions

virtual GLboolean collidesf (BoundingSpheref *const other, GLboolean exact, GLbyte currentLevel, GLbyte stopAtLevel)
virtual GLboolean intersectsf (GLfloat hitPoint[3], GLfloat start[3], GLfloat point[3], GLboolean exact, GLbyte currentLevel, GLbyte stopAtLevel)

Detailed Description

Dynamic bounding sphere, which can resize during runtime.


Constructor & Destructor Documentation

ES3D::DynamicBoundingSpheref::DynamicBoundingSpheref ( Modelf model,
GLbyte  level 
)

Constructor

Parameters:
model the model from where to create the dynamic bounding sphere.
level the level how deep the sphere hierarchy should be

ES3D::DynamicBoundingSpheref::~DynamicBoundingSpheref (  )  [virtual]

Destructor


Member Function Documentation

GLboolean ES3D::DynamicBoundingSpheref::collidesBoundingSpheref ( GLbyte *  search,
GLubyte  searchSize,
GLbyte *  hitJoint,
DynamicBoundingSpheref other,
GLbyte *  searchOther,
GLubyte  searchSizeOther,
GLbyte *  hitJointOther,
GLboolean  exact,
GLbyte  stopAtLevel 
)

Intersection method using bounding spheres between this and another model.

Parameters:
search array of joints which should be considered in this search
searchSize size of this array
hitJoint if a collision occurs, the hit joint is stored here
other the sphere to check against
searchOther array of joints which should be considered in this search from the other sphere
searchSizeOther size of this array
hitJointOther if a collision occurs, the hit hoint of the other sphere is stored here
exact flag, if intersection should be exact (triangle-triangle) or not (sphere-sphere)
stopAtLevel level of the hierarchy to stop the search, if -1 one all spheres are considered; ignored, when exact is true, -2 only the dynamic bounding sphere is considered
Returns:
true, if a collision did occur

GLboolean ES3D::DynamicBoundingSpheref::collidesf ( BoundingSpheref *const   other,
GLboolean  exact,
GLbyte  currentLevel,
GLbyte  stopAtLevel 
) [protected, virtual]

Method for checking intersection.

Parameters:
other the other sphere to check against
exact flag, if the collision should occur exact
currentLevel the level the algorithm is currently searching
stopAtLevel the level where to stop, -1 if until a primitive is found, if exact is GL_TRUE, this is ignored
Returns:
GL_TRUE if collided

Reimplemented from ES3D::BoundingSpheref.

virtual GLfloat ES3D::DynamicBoundingSpheref::getRadiusf ( GLvoid   )  [inline, virtual]

Returns the radius of the dynamic bounding sphere. By default, recalculation is off.

Returns:
the radius

GLboolean ES3D::DynamicBoundingSpheref::intersectsBoundingSpheref ( GLbyte *  search,
GLubyte  searchSize,
GLbyte *  hitJoint,
GLfloat  hitPoint[3],
GLfloat  start[3],
GLfloat  point[3],
GLboolean  exact,
GLbyte  stopAtLevel 
)

Intersection of a ray with a model.

Parameters:
search array of joints which should be considered in this search
searchSize size of this array
hitJoint if a collision occurs, the hit joint is stored here
hitPoint if a collision occurs, the hit point is stored here
start the origin of the ray
point any point of the ray
exact flag, if intersection should be exact (triangle-triangle) or not (sphere-sphere)
stopAtLevel level of the hierarchy to stop the search, if -1 one all spheres are considered; ignored, when exact is true, -2 only the dynamic bounding sphere is considered
Returns:
true, if a intersection did occur

GLboolean ES3D::DynamicBoundingSpheref::intersectsf ( GLfloat  hitPoint[3],
GLfloat  start[3],
GLfloat  point[3],
GLboolean  exact,
GLbyte  currentLevel,
GLbyte  stopAtLevel 
) [protected, virtual]

Method for checking ray intersection.

Parameters:
hitPoint if a collision occurs, the hit point is stored here
start the origin of the ray
point any point of the ray
exact flag, if the intersection should occur exact
currentLevel the level the algorithm is currently searching
stopAtLevel the level where to stop, -1 if until a primitive is found, if exact is GL_TRUE, this is ignored
Returns:
GL_TRUE if collided

Reimplemented from ES3D::BoundingSpheref.


Member Data Documentation

GLboolean ES3D::DynamicBoundingSpheref::updateRadius

Flag, if the radius should be updated.


The documentation for this class was generated from the following files:
Generated on Sat May 10 16:30:55 2008 for ES 3D Game SDK Documentation by  doxygen 1.4.7