Nudge Physics
A single file, header-only 3D physics library
Loading...
Searching...
No Matches
Kinematic Animation Functions

Kinematic animations can be used to move kinematic bodies around automatically; they are designed to be set directly in the KinematicData struct, so here are just some handy functions to enlarge the animation capacity. More...

Functions

void nudge::kinematic_data_reserve_key_frames (KinematicData *kd, size_t new_size)
 Reserves additional space for KinematicData key frames.
 
void nudge::kinematic_data_reserve_animations (KinematicData *kd, size_t new_size)
 Reserves additional space for KinematicData animations.
 

Detailed Description

Kinematic animations can be used to move kinematic bodies around automatically; they are designed to be set directly in the KinematicData struct, so here are just some handy functions to enlarge the animation capacity.

Function Documentation

◆ kinematic_data_reserve_key_frames()

void nudge::kinematic_data_reserve_key_frames ( KinematicData kd,
size_t  new_size 
)

Reserves additional space for KinematicData key frames.

Parameters
kdKinematicData instance (typically c->kinematic_data)
new_sizethe new size required for the whole key frames (after the call the new capacity could be bigger)
Note
The effect of this function is only the modification of the key frames capacity

◆ kinematic_data_reserve_animations()

void nudge::kinematic_data_reserve_animations ( KinematicData kd,
size_t  new_size 
)

Reserves additional space for KinematicData animations.

Parameters
kdKinematicData instance (typically c->kinematic_data)
new_sizethe new size required for the whole animation array (after the call the new capacity could be bigger)
Note
The effect of this function is only the modification of the animation capacity