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 AnimatedMeshComponent * | refFactory (Entity *parent) |
Will be used to instanciate objects of this class. | |
static AnimatedMeshComponent * | refFactory (Entity *parent, const std::string &fileName, const vector3df &rotation, const vector3df &scale) |
Will be used to instanciate objects of this class. |
Definition at line 26 of file AnimatedMeshComponent.h.
AnimatedMeshComponent::AnimatedMeshComponent | ( | Entity * | parent | ) |
Constructor (default).
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.
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.
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. |
Definition at line 62 of file AnimatedMeshComponent.cpp.
AnimatedMeshComponent::~AnimatedMeshComponent | ( | ) |
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.
Definition at line 100 of file AnimatedMeshComponent.cpp.
s32 AnimatedMeshComponent::getEndFrame | ( | ) | const |
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.
Definition at line 124 of file AnimatedMeshComponent.cpp.
IShadowVolumeSceneNode * AnimatedMeshComponent::getShadowVolumeSceneNode | ( | ) |
Gets the IShadowVolumeSceneNode associated with this component.
Definition at line 130 of file AnimatedMeshComponent.cpp.
s32 AnimatedMeshComponent::getStartFrame | ( | ) | const |
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.
Definition at line 92 of file AnimatedMeshComponent.cpp.
AnimatedMeshComponent * AnimatedMeshComponent::refFactory | ( | Entity * | parent | ) | [static] |
Will be used to instanciate objects of this class.
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.
speed | Frames per second played. |
Definition at line 142 of file AnimatedMeshComponent.cpp.
void AnimatedMeshComponent::setCurrentFrame | ( | f32 | frame | ) |
Sets the current frame number.
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.
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.
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.
anim | An MD2 animation type, which should be played. (see: Irrlicht API documentation) |
Definition at line 172 of file AnimatedMeshComponent.cpp.
void AnimatedMeshComponent::setMD2Animation | ( | const std::string & | animationName | ) |
Starts a MD2 animation.
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.
mesh | Pointer to the loaded animated mesh to be displayed. |
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.
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. |
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.
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.
time | Transition time in seconds. |
Definition at line 215 of file AnimatedMeshComponent.cpp.