|
#ifndef ANIMATION_NO_INTERPOLATION
#define ANIMATION_NO_INTERPOLATION 0
#define ANIMATION_REALTIME_INTERPOLATION 1
#define ANIMATION_NO_INTERPOLATION_SUPER_FAST 2 faster than but takes more memory
#endif
Use this function to set animation interpolation mode.
This function is only relevant to objects that are using 3D animation such as md2 or anim3d
(see the STATE_3D_animation_ API). By default the STATE engine interpolates
between frames of the current used 3D sequence. Interpolation means that if for example
we have in one frame a monster creature standing and in the very next frame we have the monster
is dismantled into bits and pieces (explosion effect), the engine will be able to create all the frames
in between. This ability of the engine makes it possible to create very smooth 3D animations
with only using some very few frames. Usually you will never want to turn this feature off.
The only reasons for turning 3D interpolation off will be:
- You have too many animated models and it runs too slow -
Parameters:
object_handle: The handle of the object
mode: could be one of these three options
ANIMATION_REALTIME_INTERPOLATION The default. created smooth animation between frames.
ANIMATION_NO_INTERPOLATION Not very useful. Will save some CPU cycles while making the animation look more jerky
ANIMATION_NO_INTERPOLATION_SUPER_FAST CURRENTLY NOT SUPPORTED. When having a lot of 3d animated models you might want to test this mode to gain speed.
Example:
Turn off 3D animation interpolation to gain more speed
DWORD my_object=STATE_object_create_from_file("monster.md2");
STATE_object_set_3D_animation_interpolation_mode(my_object, ANIMATION_NO_INTERPOLATION_SUPER_FAST);
|