Antkeeper
0.0.1
|
Single channel in a keyframe animation. More...
#include <animation-channel.hpp>
Public Types | |
typedef std::tuple< float, T > | keyframe |
Keyframe consisting of a time and a value. More... | |
Public Member Functions | |
animation_channel (int id) | |
Creates an animation channel. More... | |
animation_channel () | |
Creates an animation channel. More... | |
animation_channel (const animation_channel &other) | |
Creates an animation channel. More... | |
animation_channel & | operator= (const animation_channel &other) |
Assigns the contents of another channel to this channel. More... | |
void | insert_keyframe (const keyframe &k) |
Adds a keyframe to the animation. More... | |
void | remove_keyframes (float start, float end) |
Removes all keyframes on [start, end) . More... | |
void | remove_keyframes () |
Removes all keyframes from the animation. More... | |
std::array< const keyframe *, 2 > | find_keyframes (float position) const |
Finds the keyframes to the left and right of position . More... | |
std::list< keyframe > | find_keyframes (float start, float end) const |
Finds all the keyframes on [start, end) . More... | |
int | get_id () const |
Returns the ID of the animation channel. More... | |
float | get_duration () const |
Returns the duration of the animation channel. More... | |
Single channel in a keyframe animation.
Definition at line 33 of file animation-channel.hpp.
typedef std::tuple<float, T> animation_channel< T >::keyframe |
Keyframe consisting of a time and a value.
Definition at line 37 of file animation-channel.hpp.
|
explicit |
Creates an animation channel.
id | ID of the channel. |
Definition at line 110 of file animation-channel.hpp.
animation_channel< T >::animation_channel |
Creates an animation channel.
Definition at line 116 of file animation-channel.hpp.
animation_channel< T >::animation_channel | ( | const animation_channel< T > & | other | ) |
Creates an animation channel.
Definition at line 121 of file animation-channel.hpp.
std::array< const typename animation_channel< T >::keyframe *, 2 > animation_channel< T >::find_keyframes | ( | float | position | ) | const |
Finds the keyframes to the left and right of position
.
position | Position in time. |
position
. Definition at line 155 of file animation-channel.hpp.
std::list< typename animation_channel< T >::keyframe > animation_channel< T >::find_keyframes | ( | float | start, |
float | end | ||
) | const |
Finds all the keyframes on [start, end)
.
start | Starting position in time (inclusive). |
end | Ending position in time (non-inclusive). |
[start, end)
. Definition at line 172 of file animation-channel.hpp.
float animation_channel< T >::get_duration |
Returns the duration of the animation channel.
Definition at line 193 of file animation-channel.hpp.
|
inline |
Returns the ID of the animation channel.
Definition at line 187 of file animation-channel.hpp.
void animation_channel< T >::insert_keyframe | ( | const keyframe & | k | ) |
Adds a keyframe to the animation.
k | Keyframe to add. |
Definition at line 135 of file animation-channel.hpp.
animation_channel< T > & animation_channel< T >::operator= | ( | const animation_channel< T > & | other | ) |
Assigns the contents of another channel to this channel.
Definition at line 127 of file animation-channel.hpp.
void animation_channel< T >::remove_keyframes |
Removes all keyframes from the animation.
Definition at line 149 of file animation-channel.hpp.
void animation_channel< T >::remove_keyframes | ( | float | start, |
float | end | ||
) |
Removes all keyframes on [start, end)
.
start | Starting position in time (inclusive). |
end | Ending position in time (non-inclusive). |
Definition at line 141 of file animation-channel.hpp.