Animation channel.
More...
#include <Channel.h>
|
|
typedef std::map< size_t, glm::vec3 > | Locations |
| | Location key frames, maps frame number to location vector.
|
| |
|
typedef std::map< size_t, glm::quat > | Rotations |
| | Rotation key frames, maps frame number to rotation quaternion.
|
| |
|
typedef std::map< size_t, glm::vec3 > | Scales |
| | Scale key frames, maps frame number to scale vector.
|
| |
|
| size_t | timeToFrame (const double &time) const |
| | Converts time in seconds to frame number. More...
|
| |
|
| template<class M > |
| static std::pair< typename M::const_iterator, typename M::const_iterator > | findInterval (const M &map, const typename M::key_type &key) |
| |
Animation channel.
Corresponds to Assimp's aiNodeAnim.
| gpu_coverage::Channel::Channel |
( |
Scene *const |
scene, |
|
|
const aiNodeAnim *const |
channel, |
|
|
const size_t |
id |
|
) |
| |
Constructor.
- Parameters
-
| [in] | scene | Scene that contains this channel. |
| [in] | channel | The Assimp aiNodeAnim for creating this channel. |
| [in] | id | Unique ID of this channel. |
template<class M >
| static std::pair<typename M::const_iterator, typename M::const_iterator> gpu_coverage::Channel::findInterval |
( |
const M & |
map, |
|
|
const typename M::key_type & |
key |
|
) |
| |
|
inlinestaticprotected |
Finds the nearest two key frames in a keyframe map.
- Template Parameters
-
- Parameters
-
| [in] | map | Keyframe map |
| [in] | key | Key |
- Returns
- Pair of iterators to key frames.
| const size_t& gpu_coverage::Channel::getEndFrame |
( |
| ) |
const |
|
inline |
Frame number where this animation channel ends.
- Returns
- End frame.
| const glm::mat4& gpu_coverage::Channel::getLocalTransform |
( |
| ) |
const |
|
inline |
Returns the current local transform.
- Returns
- Local transform.
Call setFrame() first to set the frame and to recalculate the local transform.
| Node* gpu_coverage::Channel::getNode |
( |
| ) |
const |
|
inline |
Returns the scene graph node that this camera is attached to.
- Returns
- The scene graph node.
The node is set in the constructor based on the aiNodeAnim::mNodeName field.
| const size_t& gpu_coverage::Channel::getNumFrames |
( |
| ) |
const |
|
inline |
Duration of this animation channel in frames.
- Returns
- Number of frames.
| const size_t& gpu_coverage::Channel::getStartFrame |
( |
| ) |
const |
|
inline |
Frame number where this animation channel starts.
- Returns
- Start frame.
| void gpu_coverage::Channel::setFrame |
( |
const size_t |
frame | ) |
|
Set the current frame of the animation.
- Parameters
-
| [in] | frame | Frame number of the animation. |
Setting the frame usually changes the local transform that can be retrieved afterwards using getLocalTransform().
| size_t gpu_coverage::Channel::timeToFrame |
( |
const double & |
time | ) |
const |
|
protected |
Converts time in seconds to frame number.
- Parameters
-
- Returns
- Corresponding frame number.
The documentation for this class was generated from the following file: