ES3D::Modelf Class Reference

#include <Modelf.h>

List of all members.

Public Member Functions

 Modelf ()
virtual ~Modelf ()
ES3Denum initf (ModelCoref &currentModelCore)
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
DynamicBoundingSpherefdynamicBoundingSphere


Detailed Description

3D model


Constructor & Destructor Documentation

ES3D::Modelf::Modelf (  ) 

Constructor

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

Destructor


Member Function Documentation

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.

Parameters:
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
Returns:
true, if a collision did occur

GLvoid ES3D::Modelf::createBoundingSpheref ( GLbyte  level  ) 

Creates the dynamic bounding sphere with its bounding sphere hierarchy.

Parameters:
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.

Returns:
current animation index. -1 if none

GLuint ES3D::Modelf::getElapsedTimef ( GLvoid   ) 

Returns the absolute elapsed time.

Returns:
the elapsed time

ES3Denum ES3D::Modelf::initf ( ModelCoref currentModelCore  ) 

Init the given model with the core model.

Parameters:
currentModelCore the core model
Returns:
error code

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.

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::Modelf::isAnimationRunningf ( GLvoid   ) 

Returns if an animation is current running.

Returns:
true, if the animation is 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.

Parameters:
frame the frame

GLvoid ES3D::Modelf::setElapsedTimef ( GLuint  time  ) 

Sets the elapsed time. Time is clamped between the current animation time.

Parameters:
time the new elapsed time

GLvoid ES3D::Modelf::setNextAnimationf ( GLshort  next,
GLboolean  loop,
GLboolean  wait 
)

Sets the next animation.

Parameters:
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.

Parameters:
time the elapsed time by one frame


Member Data Documentation

DynamicBoundingSpheref* ES3D::Modelf::dynamicBoundingSphere

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.


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