#include <Modelf.h>
Public Member Functions | |
Modelf () | |
virtual | ~Modelf () |
ES3Denum | initf (ModelCoref ¤tModelCore) |
GLvoid | updatef (GLuint time) |
GLvoid | renderf (GLvoid) const |
GLvoid | createDefaultAnimationf (GLvoid) |
GLshort | getCurrentAnimationf (GLvoid) |
GLvoid | setNextAnimationf (GLshort next, GLboolean loop, GLboolean wait) |
GLboolean | isAnimationRunningf (GLvoid) |
GLuint | getElapsedTimef (GLvoid) |
GLvoid | setElapsedTimef (GLuint time) |
GLvoid | setElapsedTimeByFramef (GLuint frame) |
GLvoid | resetf (GLvoid) |
GLvoid | createBoundingSpheref (GLbyte level) |
GLboolean | collidesBoundingSpheref (GLbyte *search, GLubyte searchSize, GLbyte *hitJoint, Modelf &model, GLbyte *searchModel, GLubyte searchSizeModel, GLbyte *hitJointModel, 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 | |
GLfloat | position [3] |
GLfloat | orientation [3] |
GLfloat | scale [3] |
GLboolean | useQuaternion |
DynamicBoundingSpheref * | dynamicBoundingSphere |
ES3D::Modelf::Modelf | ( | ) |
Constructor
ES3D::Modelf::~Modelf | ( | ) | [virtual] |
Destructor
GLboolean ES3D::Modelf::collidesBoundingSpheref | ( | GLbyte * | search, | |
GLubyte | searchSize, | |||
GLbyte * | hitJoint, | |||
Modelf & | model, | |||
GLbyte * | searchModel, | |||
GLubyte | searchSizeModel, | |||
GLbyte * | hitJointModel, | |||
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 hoint is stored here | |
model | the model to check against | |
searchModel | array of joints which should be considered in this search from the other model | |
searchSizeModel | size of this array | |
hitJointModel | if a collision occurs, the hit hoint of the other model 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 |
GLvoid ES3D::Modelf::createBoundingSpheref | ( | GLbyte | level | ) |
Creates the dynamic bounding sphere with its bounding sphere hierarchy.
level | deepness of the hierarchy tree |
GLvoid ES3D::Modelf::createDefaultAnimationf | ( | GLvoid | ) |
Creates the default animation if one exists.
GLshort ES3D::Modelf::getCurrentAnimationf | ( | GLvoid | ) |
Returns the current animation.
GLuint ES3D::Modelf::getElapsedTimef | ( | GLvoid | ) |
Returns the absolute elapsed time.
ES3Denum ES3D::Modelf::initf | ( | ModelCoref & | currentModelCore | ) |
Init the given model with the core model.
currentModelCore | the core model |
GLboolean ES3D::Modelf::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::Modelf::isAnimationRunningf | ( | GLvoid | ) |
Returns if an animation is current running.
GLvoid ES3D::Modelf::renderf | ( | GLvoid | ) | const |
Renders the given model.
GLvoid ES3D::Modelf::resetf | ( | GLvoid | ) |
Resets and cleans up the model.
GLvoid ES3D::Modelf::setElapsedTimeByFramef | ( | GLuint | frame | ) |
Sets the elapsed time by frame.
frame | the frame |
GLvoid ES3D::Modelf::setElapsedTimef | ( | GLuint | time | ) |
Sets the elapsed time. Time is clamped between the current animation time.
time | the new elapsed time |
GLvoid ES3D::Modelf::setNextAnimationf | ( | GLshort | next, | |
GLboolean | loop, | |||
GLboolean | wait | |||
) |
Sets the next animation.
next | index of the next animation | |
loop | flag, if animation should be looped | |
wait | flag, if next animation should wait until current animation is finished |
GLvoid ES3D::Modelf::updatef | ( | GLuint | time | ) |
Updates the given model by time.
time | the elapsed time by one frame |
The dynamic bounding sphere of tis model.
GLfloat ES3D::Modelf::orientation[3] |
Orientation of the model in world space.
GLfloat ES3D::Modelf::position[3] |
Position of the model in world space.
GLfloat ES3D::Modelf::scale[3] |
Scaling of the model.
GLboolean ES3D::Modelf::useQuaternion |
Flag, if quaternions should be used. By default on.