Antkeeper  0.0.1
Public Member Functions | List of all members
animation_pose Class Reference

Animatable skeleton pose. More...

#include <animation-pose.hpp>

Inheritance diagram for animation_pose:
pose

Public Member Functions

 animation_pose (const skeleton &skeleton)
 Constructs an animation pose. More...
 
 animation_pose () noexcept=default
 Constructs an empty animation pose. More...
 
void update (bone_index_type first_index, std::size_t bone_count) override
 Updates a subset of the pose after one or more relative transforms have been changed. More...
 
void reset ()
 Resets the animation pose to the skeleton's rest pose. More...
 
const std::vector< bone_matrix_type > & get_matrix_palette () const noexcept
 Returns the skinning matrix palette of the animation pose. More...
 
void update ()
 Updates the pose after one or more relative transforms have been changed. More...
 
virtual void update (bone_index_type first_index, std::size_t bone_count)
 Updates a subset of the pose after one or more relative transforms have been changed. More...
 
- Public Member Functions inherited from pose
 pose (const skeleton &skeleton)
 Constructs a pose. More...
 
constexpr pose () noexcept=default
 Constructs an empty pose. More...
 
void update ()
 Updates the pose after one or more relative transforms have been changed. More...
 
void set_relative_transform (bone_index_type index, const bone_transform_type &transform)
 Sets the relative transform describing a bone pose. More...
 
void set_relative_translation (bone_index_type index, const bone_transform_type::vector_type &translation)
 Sets the relative translation of a bone pose. More...
 
void set_relative_rotation (bone_index_type index, const bone_transform_type::quaternion_type &rotation)
 Sets the relative rotation of a bone pose. More...
 
void set_relative_scale (bone_index_type index, const bone_transform_type::vector_type &scale)
 Sets the relative scale of a bone pose. More...
 
const skeletonget_skeleton () const noexcept
 Returns the skeleton with which the pose is associated. More...
 
const bone_transform_typeget_relative_transform (bone_index_type index) const
 Returns the relative transform describing a bone pose. More...
 
const bone_transform_typeget_absolute_transform (bone_index_type index) const
 Returns the absolute transform describing a bone pose. More...
 

Additional Inherited Members

- Protected Attributes inherited from pose
const skeletonm_skeleton {nullptr}
 Skeleton with which the pose is associated. More...
 
std::vector< bone_transform_typem_relative_transforms
 Relative ransforms for each bone in a skeleton. More...
 
std::vector< bone_transform_typem_absolute_transforms
 Absolute transforms for each bone in a skeleton. More...
 

Detailed Description

Animatable skeleton pose.

Definition at line 29 of file animation-pose.hpp.

Constructor & Destructor Documentation

◆ animation_pose() [1/2]

animation_pose::animation_pose ( const skeleton skeleton)
explicit

Constructs an animation pose.

Parameters
skeletonSkeleton with which to associate the animation pose.

Definition at line 25 of file animation-pose.cpp.

◆ animation_pose() [2/2]

animation_pose::animation_pose ( )
defaultnoexcept

Constructs an empty animation pose.

Member Function Documentation

◆ get_matrix_palette()

const std::vector<bone_matrix_type>& animation_pose::get_matrix_palette ( ) const
inlinenoexcept

Returns the skinning matrix palette of the animation pose.

Definition at line 53 of file animation-pose.hpp.

◆ reset()

void animation_pose::reset ( )

Resets the animation pose to the skeleton's rest pose.

Definition at line 55 of file animation-pose.cpp.

◆ update() [1/3]

void pose::update

Updates the pose after one or more relative transforms have been changed.

Definition at line 47 of file pose.cpp.

◆ update() [2/3]

void pose::update

Updates a subset of the pose after one or more relative transforms have been changed.

Parameters
first_indexIndex of the first bone in the chain to update.
bone_countNumber of bones in the chain to update.
Warning
It's the caller's responsibility to ensure that any ancestors of the bone chain are up to date before the call, and any descendants are updated after the call.

Definition at line 57 of file pose.cpp.

◆ update() [3/3]

void animation_pose::update ( bone_index_type  first_index,
std::size_t  bone_count 
)
overridevirtual

Updates a subset of the pose after one or more relative transforms have been changed.

Parameters
first_indexIndex of the first bone in the chain to update.
bone_countNumber of bones in the chain to update.
Warning
It's the caller's responsibility to ensure that any ancestors of the bone chain are up to date before the call, and any descendants are updated after the call.

Reimplemented from pose.

Definition at line 32 of file animation-pose.cpp.


The documentation for this class was generated from the following files: