#include <DynamicBoundingSpheref.h>
Inheritance diagram for ES3D::DynamicBoundingSpheref:
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) |
ES3D::DynamicBoundingSpheref::DynamicBoundingSpheref | ( | Modelf * | model, | |
GLbyte | level | |||
) |
Constructor
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
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.
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 |
GLboolean ES3D::DynamicBoundingSpheref::collidesf | ( | BoundingSpheref *const | other, | |
GLboolean | exact, | |||
GLbyte | currentLevel, | |||
GLbyte | stopAtLevel | |||
) | [protected, virtual] |
Method for checking intersection.
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 |
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.
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.
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 |
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.
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 |
Reimplemented from ES3D::BoundingSpheref.
Flag, if the radius should be updated.