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 &scale=vector3df(1.0f, 1.0f, 1.0f))
 Constructor.
 AnimatedMeshComponent (Entity *parent, IAnimatedMesh *mesh, 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.
void setMesh (IAnimatedMesh *mesh)
 Sets a new mesh to display.
void setShadowVolumeMesh (const std::string &fileName)
 Sets the mesh of the IShadowVolumeSceneNode attached to this component.
void setShadowVolumeMesh (IMesh *mesh)
 Sets the mesh of the IShadowVolumeSceneNode attached to this component.
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.
void onMesh (void *p)
 Responds to changes of the mesh attached to this component.
void onShadowVolumeMesh (void *p)
 Responds to changes of the mesh attached to the shadow volume scene node of this component.

Static Public Member Functions

static bool parseXML (IXMLReader *file, Entity *entity)
 Parses for a AnimatedMeshComponent.


Detailed Description

Component wrapper of Irrlicht's IAnimatedMeshSceneNode.

XML:

 <AnimatedMeshComponent>
    <!-- Properties -->
 </AnimatedMeshComponent>

Definition at line 33 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 &  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.
scale Initial scale of the mesh.

Definition at line 30 of file AnimatedMeshComponent.cpp.

AnimatedMeshComponent::AnimatedMeshComponent ( Entity parent,
IAnimatedMesh *  mesh,
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.
scale Initial scale of the mesh.
Note:
Not available in AngelScript.

Definition at line 39 of file AnimatedMeshComponent.cpp.

AnimatedMeshComponent::~AnimatedMeshComponent (  ) 

Deconstructor.

Definition at line 48 of file AnimatedMeshComponent.cpp.


Member Function Documentation

void AnimatedMeshComponent::animate (  ) 

Animates the mesh based upon the current frame.

Definition at line 80 of file AnimatedMeshComponent.cpp.

IAnimatedMeshSceneNode * AnimatedMeshComponent::getAnimatedMeshSceneNode (  ) 

Returns a direct pointer to the IAnimatedMeshSceneNode.

Note:
Not available in AngelScript.

Definition at line 74 of file AnimatedMeshComponent.cpp.

s32 AnimatedMeshComponent::getEndFrame (  )  const

Returns the current end frame number.

Definition at line 86 of file AnimatedMeshComponent.cpp.

f32 AnimatedMeshComponent::getFrame (  )  const

Returns the current displayed frame number.

Definition at line 92 of file AnimatedMeshComponent.cpp.

IMesh * AnimatedMeshComponent::getMesh (  ) 

Returns the current mesh.

Note:
Not available in AngelScript.

Definition at line 98 of file AnimatedMeshComponent.cpp.

IShadowVolumeSceneNode * AnimatedMeshComponent::getShadowVolumeSceneNode (  ) 

Gets the IShadowVolumeSceneNode associated with this component.

Note:
Not available in AngelScript.

Definition at line 104 of file AnimatedMeshComponent.cpp.

s32 AnimatedMeshComponent::getStartFrame (  )  const

Returns the current start frame number.

Definition at line 110 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::onMesh ( void *  p  ) 

Responds to changes of the mesh attached to this component.

Note:
For internal use only!

Definition at line 282 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::onShadowVolumeMesh ( void *  p  ) 

Responds to changes of the mesh attached to the shadow volume scene node of this component.

Note:
For internal use only!

Definition at line 292 of file AnimatedMeshComponent.cpp.

bool AnimatedMeshComponent::parseXML ( IXMLReader *  file,
Entity entity 
) [static]

Parses for a AnimatedMeshComponent.

Note:
For internal use only!

Reimplemented from SceneComponent.

Definition at line 302 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setAnimationSpeed ( f32  speed  ) 

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

XML:

     <animationSpeed value="" />

Parameters:
speed Frames per second played.

Definition at line 116 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setCurrentFrame ( f32  frame  ) 

Sets the current frame number.

XML:

     <currentFrame value="" />

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

Definition at line 122 of file AnimatedMeshComponent.cpp.

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

Sets the frame numbers between which the animation is looped.

XML:

     <frameLoop start="" end="" />

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

Definition at line 128 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setLoopMode ( bool  value  ) 

Sets looping mode which is on by default.

XML:

     <loopMode value="" />

Parameters:
value The value of this option.

Definition at line 134 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 146 of file AnimatedMeshComponent.cpp.

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

Starts a MD2 animation.

XML:

     <MD2Animation value="" />

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

Definition at line 140 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 184 of file AnimatedMeshComponent.cpp.

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

Loads and sets a new mesh to display.

XML:

     <mesh fileName="" />

fileName Filename of the mesh to load.

Definition at line 152 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setShadowVolumeMesh ( IMesh *  mesh  ) 

Sets the mesh of the IShadowVolumeSceneNode attached to this component.

Parameters:
mesh Pointer to the loaded mesh to be used.
Note:
You must first call setShadowVolumeSceneNode!

Definition at line 236 of file AnimatedMeshComponent.cpp.

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

Sets the mesh of the IShadowVolumeSceneNode attached to this component.

Parameters:
fileName Filename of the mesh to load.
Note:
You must first call setShadowVolumeSceneNode!

Definition at line 200 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 266 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.

XML:

     <shadowVolumeMeshSceneNode fileName="" zfailmethod="" infinity="" />

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 252 of file AnimatedMeshComponent.cpp.

void AnimatedMeshComponent::setTransitionTime ( f32  time  ) 

Sets the transition time in seconds.

XML:

     <transitionTime value="" />

Parameters:
time Transition time in seconds.

Definition at line 276 of file AnimatedMeshComponent.cpp.


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

Generated on Fri Aug 21 23:55:11 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8