Nudge Physics
A single file, header-only 3D physics library
|
The Animation class. Each animation owns a (kinematic) body index and a range of key frames. More...
#include <nudge.h>
Public Types | |
enum | LoopMode { LM_NO_LOOP , LM_LOOP_NORMAL , LM_LOOP_PING_PONG } |
Public Attributes | |
float | play_time |
float | offset_time |
float | speed |
float | total_time |
Transform | baseT |
uint32_t | key_frame_start |
uint32_t | key_frame_count |
uint32_t | body |
bool | playing |
bool | use_baseT |
enum nudge::KinematicData::Animation::LoopMode | loop_mode |
The Animation class. Each animation owns a (kinematic) body index and a range of key frames.
float nudge::KinematicData::Animation::play_time |
[read] animation current time of play
float nudge::KinematicData::Animation::offset_time |
if set, animation starts after offset_time
float nudge::KinematicData::Animation::speed |
tweakable animation speed (can be negative)
float nudge::KinematicData::Animation::total_time |
total duration of the animation (if negative, value is refreshed before playing it)
Transform nudge::KinematicData::Animation::baseT |
offset transform used if use_baseT is set
uint32_t nudge::KinematicData::Animation::key_frame_start |
start animation key_frame index
uint32_t nudge::KinematicData::Animation::key_frame_count |
num key_frame indices (from key_frame_start)
uint32_t nudge::KinematicData::Animation::body |
index of the kinematic body to be animated
bool nudge::KinematicData::Animation::playing |
true if animation is playing
bool nudge::KinematicData::Animation::use_baseT |
activates the offset transform baseT
enum nudge::KinematicData::Animation::LoopMode nudge::KinematicData::Animation::loop_mode |
animation loop mode