DarkBASIC Professional Help File

DX11:ANIMATION

Animations are a means of deforming your 3D meshes using bones / joints (limbs) and used for things such as getting characters to walk, run, jump, fall over, etc.
The animation system uses skinning, that is the actual vertex data of the meshes will be altered based on the orientations of the joint limbs of the object
that is being animated. For this reason all instances will animate in an identical fashion. A future upgrade may provide a way to get around this, but until such
time it is recommended to clone animated objects instead of instancing them (clones have individual meshes). By transforming the limbs that correspond to joints in
a model you can blend your own influences with animation data imported from the object file to achieve things such as making your characters head look at his target, etc.
Animations can also be played back on all, a few or a single joint node. This means that you can blend together several animations for different parts of your objects, such as
having a troll's legs running while his upper body swings a club.

    DX11 GET ANIMATION FROM OBJECT : Return Dword = DX11 GET ANIMATION FROM OBJECT(obj, animId)

    DX11 GET OBJECT ANIMATION COUNT : Return Dword = DX11 GET OBJECT ANIMATION COUNT(obj)

    DX11 OBJECT HAS ANIMATIONS : Return Boolean = DX11 OBJECT HAS ANIMATIONS(obj)

    DX11 EXTRACT ANIMATION : Return Dword = DX11 EXTRACT ANIMATION(anim, startFrame, lastFrame, name)

    DX11 CLONE ANIMATION : Return Dword = DX11 CLONE ANIMATION(sourceAnim)

    DX11 DELETE ANIMATION : DX11 DELETE ANIMATION anim

    DX11 ANIMATION EXISTS : Return Boolean = DX11 ANIMATION EXISTS(animation)

    DX11 IS ANIMATION PLAYING : Return Boolean = DX11 IS ANIMATION PLAYING(anim)

    DX11 IS ANIMATION LOOPING : Return Boolean = DX11 IS ANIMATION LOOPING(anim)

    DX11 IS ANIMATION REVERSED : Return Boolean = DX11 IS ANIMATION REVERSED(anim)

    DX11 REVERSE ANIMATION : DX11 REVERSE ANIMATION anim, [reverse]

    DX11 SET ANIMATION FRAMES PER SECOND : DX11 SET ANIMATION FRAMES PER SECOND anim, fps

    DX11 GET ANIMATION FRAMES PER SECOND : Return Float = DX11 GET ANIMATION FRAMES PER SECOND(anim)

    DX11 GET ANIMATION NAME : Return String = DX11 GET ANIMATION NAME(anim)

    DX11 GET ANIMATION FRAME COUNT : Return Dword = DX11 GET ANIMATION FRAME COUNT(anim)

    DX11 SET ANIMATION FRAME : DX11 SET ANIMATION FRAME anim, frame

    DX11 GET ANIMATION FRAME : Return Dword = DX11 GET ANIMATION FRAME(anim)

    DX11 SET OBJECT ANIMATION : DX11 SET OBJECT ANIMATION obj, anim, loop, [transitionTime], [limb], [ignoreChildren]

    DX11 PLAY OBJECT ANIMATION : DX11 PLAY OBJECT ANIMATION obj, loop, [limb], [ignoreChildren], [firstFrame], [lastFrame], [initialFrame]

    DX11 STOP OBJECT ANIMATION : DX11 STOP OBJECT ANIMATION obj, [limb], [ignoreChildren]

    DX11 RESUME OBJECT ANIMATION : DX11 RESUME OBJECT ANIMATION obj, [limb], [ignoreChildren]