ES3D::Modelx Class Reference

#include <Modelx.h>

List of all members.

Public Member Functions

 Modelx ()
virtual ~Modelx ()
ES3Denum initx (ModelCorex &currentModelCore)
GLvoid updatex (GLuint time)
GLvoid renderx (GLvoid) const
GLvoid createDefaultAnimationx (GLvoid)
GLshort getCurrentAnimationx (GLvoid)
GLvoid setNextAnimationx (GLshort next, GLboolean loop, GLboolean wait)
GLboolean isAnimationRunningx (GLvoid)
GLuint getElapsedTimex (GLvoid)
GLvoid setElapsedTimex (GLuint time)
GLvoid setElapsedTimeByFramex (GLuint frame)
GLvoid resetx (GLvoid)
GLvoid createBoundingSpherex (GLbyte level)
GLboolean collidesBoundingSpherex (GLbyte *search, GLubyte searchSize, GLbyte *hitJoint, Modelx &model, GLbyte *searchModel, GLubyte searchSizeModel, GLbyte *hitJointModel, 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

FixedPointx position [3]
FixedPointx orientation [3]
FixedPointx scale [3]
GLboolean useQuaternion
DynamicBoundingSpherexdynamicBoundingSphere


Detailed Description

3D model


Constructor & Destructor Documentation

ES3D::Modelx::Modelx (  ) 

Constructor

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

Destructor


Member Function Documentation

GLboolean ES3D::Modelx::collidesBoundingSpherex ( GLbyte *  search,
GLubyte  searchSize,
GLbyte *  hitJoint,
Modelx 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::Modelx::createBoundingSpherex ( GLbyte  level  ) 

Creates the dynamic bounding sphere with its bounding sphere hierarchy.

Parameters:
level deepness of the hierarchy tree

GLvoid ES3D::Modelx::createDefaultAnimationx ( GLvoid   ) 

Creates the default animation if one exists.

GLshort ES3D::Modelx::getCurrentAnimationx ( GLvoid   ) 

Returns the current animation.

Returns:
current animation index. -1 if none

GLuint ES3D::Modelx::getElapsedTimex ( GLvoid   ) 

Returns the absolute elapsed time.

Returns:
the elapsed time

ES3Denum ES3D::Modelx::initx ( ModelCorex currentModelCore  ) 

Init the given model with the core model.

Parameters:
currentModelCore the core model
Returns:
error code

GLboolean ES3D::Modelx::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.

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::Modelx::isAnimationRunningx ( GLvoid   ) 

Returns if an animation is current running.

Returns:
true, if the animation is running

GLvoid ES3D::Modelx::renderx ( GLvoid   )  const

Renders the given model.

GLvoid ES3D::Modelx::resetx ( GLvoid   ) 

Resets and cleans up the model.

GLvoid ES3D::Modelx::setElapsedTimeByFramex ( GLuint  frame  ) 

Sets the elapsed time by frame.

Parameters:
frame the frame

GLvoid ES3D::Modelx::setElapsedTimex ( GLuint  time  ) 

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

Parameters:
time the new elapsed time

GLvoid ES3D::Modelx::setNextAnimationx ( 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::Modelx::updatex ( GLuint  time  ) 

Updates the given model by time.

Parameters:
time the elapsed time by one frame


Member Data Documentation

DynamicBoundingSpherex* ES3D::Modelx::dynamicBoundingSphere

The dynamic bounding sphere of tis model.

FixedPointx ES3D::Modelx::orientation[3]

Orientation of the model in world space.

FixedPointx ES3D::Modelx::position[3]

Position of the model in world space.

FixedPointx ES3D::Modelx::scale[3]

Scaling of the model.

GLboolean ES3D::Modelx::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