|
Nudge Physics
A single file, header-only 3D physics library
|
The KinematicData is composed by two arrays: an array of global key frames and an array of animations. Each animation owns a (kinematic) body index and a range of key frames. More...
#include <nudge.h>
Classes | |
| struct | Animation |
| The Animation class. Each animation owns a (kinematic) body index and a range of key frames. More... | |
Public Types | |
| enum | TimeMode { TM_NORMAL =0 , TM_ACCELERATE , TM_DECELERATE } |
| TimeMode enum is an optional experimental flag. More... | |
Public Attributes | |
| Transform * | key_frame_transforms |
| enum nudge::KinematicData::TimeMode * | key_frame_modes |
| uint32_t | key_frame_capacity |
| uint32_t | key_frame_count |
| struct nudge::KinematicData::Animation * | animations |
| uint32_t | animations_capacity |
| uint32_t | animations_count |
The KinematicData is composed by two arrays: an array of global key frames and an array of animations. Each animation owns a (kinematic) body index and a range of key frames.
| Transform* nudge::KinematicData::key_frame_transforms |
array of size key_frame_count of Transform structs, where each element has the Transform::time field set (it represents the seconds to get from the previous frame to that frame when the animation speed is 1.0f)
| enum nudge::KinematicData::TimeMode* nudge::KinematicData::key_frame_modes |
array of size key_frame_count of TimeMode enums (experimental, it can probably be completely ignored in most cases) [TODO: remove?]
| uint32_t nudge::KinematicData::key_frame_capacity |
the number of key frames the arrays can contain (use kinematic_data_reserve_key_frames(...) to increase it)
| uint32_t nudge::KinematicData::key_frame_count |
the number of inserted key frames
| struct nudge::KinematicData::Animation* nudge::KinematicData::animations |
array of size animations_count of Animation structs; by default entries in this array are persistent, i.e. not deleted or reordered by nudge (but this behavior can be changed using the definition NUDGE_DELETE_KINEMATIC_ANIMATIONS_REFERENCING_REMOVED_BODIES)
| uint32_t nudge::KinematicData::animations_capacity |
the number of animations the array can contain (use kinematic_data_reserve_animations(...) to increase it)
| uint32_t nudge::KinematicData::animations_count |
the number of inserted animations