#include <DynamicBoundingSpherex.h>
Inheritance diagram for ES3D::DynamicBoundingSpherex:
Public Member Functions | |
DynamicBoundingSpherex (Modelx *model, GLbyte level) | |
virtual | ~DynamicBoundingSpherex () |
virtual FixedPointx | getRadiusx (GLvoid) |
GLboolean | collidesBoundingSpherex (GLbyte *search, GLubyte searchSize, GLbyte *hitJoint, DynamicBoundingSpherex *other, GLbyte *searchOther, GLubyte searchSizeOther, GLbyte *hitJointOther, GLboolean exact, GLbyte stopAtLevel) |
GLboolean | intersectsBoundingSpherex (GLbyte *search, GLubyte searchSize, GLbyte *hitJoint, FixedPointx hitPoint[3], FixedPointx start[3], FixedPointx point[3], GLboolean exact, GLbyte stopAtLevel) |
Public Attributes | |
GLboolean | updateRadius |
Protected Member Functions | |
virtual GLboolean | collidesx (BoundingSpherex *const other, GLboolean exact, GLbyte currentLevel, GLbyte stopAtLevel) |
virtual GLboolean | intersectsx (FixedPointx hitPoint[3], FixedPointx start[3], FixedPointx point[3], GLboolean exact, GLbyte currentLevel, GLbyte stopAtLevel) |
ES3D::DynamicBoundingSpherex::DynamicBoundingSpherex | ( | Modelx * | 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::DynamicBoundingSpherex::~DynamicBoundingSpherex | ( | ) | [virtual] |
Destructor
GLboolean ES3D::DynamicBoundingSpherex::collidesBoundingSpherex | ( | GLbyte * | search, | |
GLubyte | searchSize, | |||
GLbyte * | hitJoint, | |||
DynamicBoundingSpherex * | 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::DynamicBoundingSpherex::collidesx | ( | BoundingSpherex *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::BoundingSpherex.
virtual FixedPointx ES3D::DynamicBoundingSpherex::getRadiusx | ( | GLvoid | ) | [inline, virtual] |
Returns the radius of the dynamic bounding sphere. By default, recalculation is off.
GLboolean ES3D::DynamicBoundingSpherex::intersectsBoundingSpherex | ( | GLbyte * | search, | |
GLubyte | searchSize, | |||
GLbyte * | hitJoint, | |||
FixedPointx | hitPoint[3], | |||
FixedPointx | start[3], | |||
FixedPointx | 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::DynamicBoundingSpherex::intersectsx | ( | FixedPointx | hitPoint[3], | |
FixedPointx | start[3], | |||
FixedPointx | 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::BoundingSpherex.
Flag, if the radius should be updated.