|
RavEngine
|
#include <AnimatorComponent.hpp>
Classes | |
| struct | Node |
Public Member Functions | |
| void | InsertNode (anim_id_t id, const Node &node) |
| void | DeleteNode (anim_id_t id) |
| Node & | GetNode (const anim_id_t id) |
| bool | IsEmpty () const |
| void | Clear () |
| bool | Sample (float t, float start, float speed, bool looping, ozz::vector< ozz::math::SoaTransform > &, ozz::animation::SamplingJob::Context &cache, const ozz::animation::Skeleton *skeleton) const override |
| constexpr void | SetBlendPos (const clamped_vec2 &newPos) |
Static Public Attributes | |
| static constexpr uint16_t | kmax_nodes = 64 |
Blend trees enable blending by arranging graphable nodes in a 2D plane with a movable control point. Influence is defined as the distance from the node to the control point.
|
inline |
Remove all nodes from the tree
|
inline |
Remove a node given an ID
| id | the id to remove |
Get a node reference to make modifications to it
| id | the ID to get a node for |
| if | no node exists at id |
Insert a node into the tree at the id. If a node already exists at that ID, it is replaced.
| id | the identifier for the node. Recommended to create an enum to use here. |
| node | the node to insert into the tree. |
|
inline |
|
override |
Sample the animation curves in this tree
| t | the time to sample |
| output | the vector to write the output transforms to |
| cache | a sampling cache, modified when used |
|
inlineconstexpr |
Move the control point
| newPos | the position of the control point |