![]() |
Xors3d Engine
|
Functions | |
BBDECL void BBCALL | xAnimate (Entity *entity, int mode=1, float speed=1.0f, int sequence=0, float translate=0.0f, const char *rootBone="") |
Animates an entity. | |
BBDECL int BBCALL | xAnimating (Entity *entity, const char *rootBone="") |
Returns true if the specified entity is currently animating. | |
BBDECL float BBCALL | xAnimLength (Entity *entity, const char *rootBone="") |
Returns the length of the specified entity's current animation sequence. | |
BBDECL int BBCALL | xAnimSeq (Entity *entity, const char *rootBone="") |
Returns the specified entity's current animation sequence. | |
BBDECL float BBCALL | xAnimSpeed (Entity *entity, const char *rootBone="") |
Returns the specified entity's current animation speed. | |
BBDECL float BBCALL | xAnimTime (Entity *entity, const char *rootBone="") |
Returns the current animation time of an entity. | |
BBDECL int BBCALL | xExtractAnimSeq (Entity *entity, int firstFrame, int lastFrame, int sequence=0) |
Extracts part of specified sequence to a new one and returns its index. | |
BBDECL int BBCALL | xLoadAnimSeq (Entity *entity, const char *path) |
Appends an animation sequence from a file to an entity. Returns the animation sequence number added. | |
BBDECL void BBCALL | xSetAnimFrame (Entity *entity, float frame, int sequence, const char *rootBone="") |
Sets entity's animation frame. | |
BBDECL void BBCALL | xSetAnimSpeed (Entity *entity, float speed, const char *rootBone="") |
Sets entity's animation speed. | |
BBDECL void BBCALL | xSetAnimTime (Entity *entity, float time, int sequence, const char *rootBone="") |
Sets entity's animation time. |
BBDECL int BBCALL 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 |
BBDECL int BBCALL 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 |
BBDECL void BBCALL 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 |
BBDECL float BBCALL 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 |
BBDECL int BBCALL 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 |
BBDECL float BBCALL 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 |
BBDECL void BBCALL 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. |
BBDECL int BBCALL 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 |
BBDECL float BBCALL 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 |
BBDECL void BBCALL 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 |
BBDECL void BBCALL 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 |