![]() |
Xors3d Engine
|
Functions | |
void | xAnimate (Entity *entity, int mode=1, float speed=1.0f, int sequence=0, float translate=0.0f, const char *rootBone="") |
Animates an entity. | |
int | xAnimating (Entity *entity, const char *rootBone="") |
Returns true if the specified entity is currently animating. | |
float | xAnimLength (Entity *entity, const char *rootBone="") |
Returns the length of the specified entity's current animation sequence. | |
int | xAnimSeq (Entity *entity, const char *rootBone="") |
Returns the specified entity's current animation sequence. | |
float | xAnimSpeed (Entity *entity, const char *rootBone="") |
Returns the specified entity's current animation speed. | |
float | xAnimTime (Entity *entity, const char *rootBone="") |
Returns the current animation time of an entity. | |
int | xExtractAnimSeq (Entity *entity, int firstFrame, int lastFrame, int sequence=0) |
Extracts part of specified sequence to a new one and returns its index. | |
int | xLoadAnimSeq (Entity *entity, const char *path) |
Appends an animation sequence from a file to an entity. Returns the animation sequence number added. | |
void | xSetAnimFrame (Entity *entity, float frame, int sequence, const char *rootBone="") |
Sets entity's animation frame. | |
void | xSetAnimSpeed (Entity *entity, float speed, const char *rootBone="") |
Sets entity's animation speed. | |
void | xSetAnimTime (Entity *entity, float time, int sequence, const char *rootBone="") |
Sets entity's animation time. |
int xExtractAnimSeq | ( | Entity * | entity, |
int | firstFrame, | ||
int | lastFrame, | ||
int | sequence = 0 |
||
) |
Extracts part of specified sequence to a new one and returns its index.
B3D format supports only one sequence per file. You can arrange all animations into one in editor and then extact them in Xors3D
entity | Entity handle |
firstFrame | First frame of anim sequence to extract |
lastFrame | Last frame of anim sequence to extract |
sequence | Animation sequence to extract from |
int xLoadAnimSeq | ( | Entity * | entity, |
const char * | path | ||
) |
Appends an animation sequence from a file to an entity. Returns the animation sequence number added.
entity | Entity handle |
path | Filename of animated 3D object |
void xSetAnimSpeed | ( | Entity * | entity, |
float | speed, | ||
const char * | rootBone = "" |
||
) |
Sets entity's animation speed.
entity | Entity handle |
speed | New animation speed |
rootBone | Root bone. See xAnimate() for more infromation |
float xAnimSpeed | ( | Entity * | entity, |
const char * | rootBone = "" |
||
) |
Returns the specified entity's current animation speed.
This function must be used only with real skinned mesh, or it will return wrong values
entity | Entity handle |
rootBone | Root bone name in animation track. See xAnimate() for more infromation |
int xAnimating | ( | Entity * | entity, |
const char * | rootBone = "" |
||
) |
Returns true if the specified entity is currently animating.
This function must be used only with real skinned mesh, or it will return wrong values
entity | Entity handle |
rootBone | Root bone name in animation track. See xAnimate() for more infromation |
float xAnimTime | ( | Entity * | entity, |
const char * | rootBone = "" |
||
) |
Returns the current animation time of an entity.
This function must be used only with real skinned mesh, or it will return wrong values
entity | Entity handle |
rootBone | Name of root bone in animation track. See xAnimate() for more infromation |
void xAnimate | ( | Entity * | entity, |
int | mode = 1 , |
||
float | speed = 1.0f , |
||
int | sequence = 0 , |
||
float | translate = 0.0f , |
||
const char * | rootBone = "" |
||
) |
Animates an entity.
entity | Entity handle |
mode | Animating mode. See 'Animation playback types' for more information |
speed | Animation speed. A negative speed will play the animation backwards |
sequence | Initially, an entity loaded with xLoadAnimMesh() will have a single animation sequence. More sequences can be added using either xLoadAnimSeq() or xAddAnimSeq(). Animation sequences are numbered 0, 1, 2, etc |
translate | A value of 0 will cause an instant 'leap' to the first frame, while values greater than 0 will cause a smooth transition |
rootBone | Root bone in hierarhy, from that animation will be applied. In Blitz3D you may find bone by FindChild() command and animate it. In Xors3D you must simply pass its name in xAnimate() command. For hierarhy a new animation track will be created, so then you will need to get its info (like time, speed, etc) you must also pass a name of its root bone for correct results. |
int xAnimSeq | ( | Entity * | entity, |
const char * | rootBone = "" |
||
) |
Returns the specified entity's current animation sequence.
This function must be used only with real skinned mesh, or it will return wrong values
entity | Entity handle |
rootBone | Root bone name in animation track. See xAnimate() for more infromation |
float xAnimLength | ( | Entity * | entity, |
const char * | rootBone = "" |
||
) |
Returns the length of the specified entity's current animation sequence.
This function must be used only with real skinned mesh, or it will return wrong values
entity | Entity handle |
rootBone | Root bone name in animation track. See xAnimate() for more infromation |
void xSetAnimTime | ( | Entity * | entity, |
float | time, | ||
int | sequence, | ||
const char * | rootBone = "" |
||
) |
Sets entity's animation time.
entity | Entity handle |
time | New animation time |
sequence | Animation sequence number |
rootBone | Root bone. See xAnimate() for more infromation |
void xSetAnimFrame | ( | Entity * | entity, |
float | frame, | ||
int | sequence, | ||
const char * | rootBone = "" |
||
) |
Sets entity's animation frame.
This work similarly with xSetAnimTime(), but operate with frames
entity | Entity handle |
frame | New animation frame |
sequence | Animation sequence number |
rootBone | Root bone. See xAnimate() for more infromation |