AnimatedMeshComponent Class Reference

Component wrapper of Irrlicht's IAnimatedMeshSceneNode. More...

Inheritance diagram for AnimatedMeshComponent:

Inheritance graph
[legend]
Collaboration diagram for AnimatedMeshComponent:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AnimatedMeshComponent (Entity *parent)
 Constructor (default).
 AnimatedMeshComponent (Entity *parent, const std::string &fileName, const vector3df &rotation=vector3df(0, 0, 0), const vector3df &scale=vector3df(1.0f, 1.0f, 1.0f))
 Constructor.
 AnimatedMeshComponent (Entity *parent, IAnimatedMesh *mesh, const vector3df &rotation=vector3df(0, 0, 0), const vector3df &scale=vector3df(1.0f, 1.0f, 1.0f))
 Constructor.
 ~AnimatedMeshComponent ()
 Deconstructor.
IAnimatedMeshSceneNode * getAnimatedMeshSceneNode ()
 Returns a direct pointer to the IAnimatedMeshSceneNode.
void animate ()
 Animates the mesh based upon the current frame.
s32 getEndFrame () const
 Returns the current end frame number.
f32 getFrame () const
 Returns the current displayed frame number.
IMesh * getMesh ()
 Returns the current mesh.
IShadowVolumeSceneNode * getShadowVolumeSceneNode ()
 Gets the IShadowVolumeSceneNode associated with this component.
s32 getStartFrame () const
 Returns the current start frame number.
void setAnimationSpeed (f32 speed)
 Sets the speed (in frames/s) with which the animation is played.
void setCurrentFrame (f32 frame)
 Sets the current frame number.
void setFrameLoop (s32 start, s32 end)
 Sets the frame numbers between which the animation is looped.
void setLoopMode (bool value)
 Sets looping mode which is on by default.
void setMD2Animation (const std::string &animationName)
 Starts a MD2 animation.
void setMD2Animation (EMD2_ANIMATION_TYPE anim)
 Starts a MD2 animation.
void setMesh (const std::string &fileName)
 Loads and sets a new mesh to display. fileName Filename of the mesh to load.
void setMesh (IAnimatedMesh *mesh)
 Sets a new mesh to display.
void setShadowVolumeSceneNode (const std::string &fileName, bool zfailmethod=true, f32 infinity=10000.0f)
 Loads and sets a new IShadowVolumeSceneNode to the component.
void setShadowVolumeSceneNode (IMesh *mesh, bool zfailmethod=true, f32 infinity=10000.0f)
 Adds a new IShadowVolumeSceneNode to the component.
void setTransitionTime (f32 time)
 Sets the transition time in seconds.

Static Public Member Functions

static AnimatedMeshComponentrefFactory (Entity *parent)
 Will be used to instanciate objects of this class.
static AnimatedMeshComponentrefFactory (Entity *parent, const std::string &fileName, const vector3df &rotation, const vector3df &scale)
 Will be used to instanciate objects of this class.


Detailed Description

Component wrapper of Irrlicht's IAnimatedMeshSceneNode.

Definition at line 26 of file AnimatedMeshComponent.h.


Constructor & Destructor Documentation

AnimatedMeshComponent::AnimatedMeshComponent ( Entity parent  ) 

Constructor (default).

Parameters:
parent The parent entity to which the component should be added.

Definition at line 23 of file AnimatedMeshComponent.cpp.

AnimatedMeshComponent::AnimatedMeshComponent ( Entity parent,
const std::string &  fileName,
const vector3df &  rotation = vector3df(0, 0, 0),
const vector3df &  scale = vector3df(1.0f, 1.0f, 1.0f) 
)

Constructor.

Parameters:
parent The parent entity to which the component should be added.
fileName Filename of the mesh to load.
rotation Initial rotation of the mesh.
scale Initial scale of the mesh.

Definition at line 42 of file AnimatedMeshComponent.cpp.

AnimatedMeshComponent::AnimatedMeshComponent ( Entity parent,
IAnimatedMesh *  mesh,
const vector3df &  rotation = vector3df(0, 0, 0),
const vector3df &  scale = vector3df(1.0f, 1.0f, 1.0f) 
)

Constructor.

Parameters:
parent The parent entity to which the component should be added.
mesh Pointer to the loaded animated mesh to be displayed.
rotation Initial rotation of the mesh.
scale Initial scale of the mesh.
Note:
Not available in AngelScript.

Definition at line 62 of file AnimatedMeshComponent.cpp.

AnimatedMeshComponent::~AnimatedMeshComponent (  ) 

Deconstructor.

Definition at line 79 of file AnimatedMeshComponent.cpp.


Member Function Documentation

void AnimatedMeshComponent::animate (  ) 

Animates the mesh based upon the current frame.

Definition at line 106 of file AnimatedMeshComponent.cpp.

IAnimatedMeshSceneNode * AnimatedMeshComponent::getAnimatedMeshSceneNode (  ) 

Returns a direct pointer to the IAnimatedMeshSceneNode.

Note:
Not available in AngelScript.

Definition at line 100 of file AnimatedMeshComponent.cpp.

s32 AnimatedMeshComponent::getEndFrame (  )  const

Returns the current end frame number.

Definition at line 112 of file AnimatedMeshComponent.cpp.

f32 AnimatedMeshComponent::getFrame (  )  const

Returns the current displayed frame number.

Definition at line 118 of file AnimatedMeshComponent.cpp.

IMesh * AnimatedMeshComponent::getMesh (  ) 

Returns the current mesh.

Note:
Not available in AngelScript.

Definition at line 124 of file AnimatedMeshComponent.cpp.

IShadowVolumeSceneNode * AnimatedMeshComponent::getShadowVolumeSceneNode (  ) 

Gets the IShadowVolumeSceneNode associated with this component.

Note:
Not available in AngelScript.

Definition at line 130 of file AnimatedMeshComponent.cpp.

s32 AnimatedMeshComponent::getStartFrame (  )  const

Returns the current start frame number.

Definition at line 136 of file AnimatedMeshComponent.cpp.

AnimatedMeshComponent * AnimatedMeshComponent::refFactory ( Entity parent,
const std::string &  fileName,
const vector3df &  rotation,
const vector3df &  scale 
) [static]

Will be used to instanciate objects of this class.

Note:
For internal use only!

Definition at line 92 of file AnimatedMeshComponent.cpp.

AnimatedMeshComponent * AnimatedMeshComponent::refFactory ( Entity parent  )  [static]

Will be used to instanciate objects of this class.

Note:
For internal use only!

Reimplemented from SceneComponent.

Definition at line 86 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setAnimationSpeed ( f32  speed  ) 

Sets the speed (in frames/s) with which the animation is played.

Parameters:
speed Frames per second played.

Definition at line 142 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setCurrentFrame ( f32  frame  ) 

Sets the current frame number.

Parameters:
frame Number of the frame to let the animation be started from.

Definition at line 148 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setFrameLoop ( s32  start,
s32  end 
)

Sets the frame numbers between which the animation is looped.

Parameters:
start Start frame number of the loop.
end End frame number of the loop.

Definition at line 154 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setLoopMode ( bool  value  ) 

Sets looping mode which is on by default.

Parameters:
value The value of this option.

Definition at line 160 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setMD2Animation ( EMD2_ANIMATION_TYPE  anim  ) 

Starts a MD2 animation.

Parameters:
anim An MD2 animation type, which should be played. (see: Irrlicht API documentation)
Note:
Not available in AngelScript.

Definition at line 172 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setMD2Animation ( const std::string &  animationName  ) 

Starts a MD2 animation.

Parameters:
animationName Name of the animation which should be played.

Definition at line 166 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setMesh ( IAnimatedMesh *  mesh  ) 

Sets a new mesh to display.

Parameters:
mesh Pointer to the loaded animated mesh to be displayed.
Note:
Not available in AngelScript.

Definition at line 186 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setMesh ( const std::string &  fileName  ) 

Loads and sets a new mesh to display. fileName Filename of the mesh to load.

Definition at line 178 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setShadowVolumeSceneNode ( IMesh *  mesh,
bool  zfailmethod = true,
f32  infinity = 10000.0f 
)

Adds a new IShadowVolumeSceneNode to the component.

Parameters:
mesh Pointer to the loaded mesh to be used.
zfailmethod If set to true, the shadow will use the zfail method, if not, zpass is used.
infinity Value used by the shadow volume algorithm to scale the shadow volume.
Note:
Not available in AngelScript.

Definition at line 205 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setShadowVolumeSceneNode ( const std::string &  fileName,
bool  zfailmethod = true,
f32  infinity = 10000.0f 
)

Loads and sets a new IShadowVolumeSceneNode to the component.

Parameters:
fileName Filename of the mesh to load.
zfailmethod If set to true, the shadow will use the zfail method, if not, zpass is used.
infinity Value used by the shadow volume algorithm to scale the shadow volume.

Definition at line 192 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setTransitionTime ( f32  time  ) 

Sets the transition time in seconds.

Parameters:
time Transition time in seconds.

Definition at line 215 of file AnimatedMeshComponent.cpp.


The documentation for this class was generated from the following files:

Generated on Wed Jun 10 22:26:25 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8