![]() |
ezEngine Release 25.08
|
Low-level infrastructure to generate animation poses from animation clips and other inputs. More...
#include <AnimPoseGenerator.h>
Public Member Functions | |
void | Reset (const ezSkeletonResource *pSkeleton, ezGameObject *pTarget) |
const ezSkeletonResource * | GetSkeleton () const |
const ezGameObject * | GetTargetObject () const |
ezAnimPoseGeneratorCommandSampleTrack & | AllocCommandSampleTrack (ezUInt32 uiDeterministicID) |
ezAnimPoseGeneratorCommandRestPose & | AllocCommandRestPose () |
ezAnimPoseGeneratorCommandCombinePoses & | AllocCommandCombinePoses () |
ezAnimPoseGeneratorCommandLocalToModelPose & | AllocCommandLocalToModelPose () |
ezAnimPoseGeneratorCommandSampleEventTrack & | AllocCommandSampleEventTrack () |
ezAnimPoseGeneratorCommandAimIK & | AllocCommandAimIK () |
ezAnimPoseGeneratorCommandTwoBoneIK & | AllocCommandTwoBoneIK () |
const ezAnimPoseGeneratorCommand & | GetCommand (ezAnimPoseGeneratorCommandID id) const |
ezAnimPoseGeneratorCommand & | GetCommand (ezAnimPoseGeneratorCommandID id) |
void | UpdatePose (bool bRequestExternalPoseGeneration) |
Calculates the pose, using the final command as reference where to start. | |
ezArrayPtr< ezMat4 > | GetCurrentPose () const |
void | SetFinalCommand (ezAnimPoseGeneratorCommandID cmdId) |
Sets the (currently) final command in the pose generation. | |
ezAnimPoseGeneratorCommandID | GetFinalCommand () const |
Returns the (currently) final command. | |
bool | ShouldSendPoseResultMsg () const |
Whether the caller should send ezMsgAnimationPoseUpdated to its children. | |
Low-level infrastructure to generate animation poses from animation clips and other inputs.
Even though instances of this class should be reused over frames, it is assumed that all commands are recreated every frame, to build a new pose. Some commands take predecessor commands as inputs to combine. If a command turns out not be actually needed, it won't be evaluated.
|
inline |
Returns the (currently) final command.
Can be used to inject further commands after it. Call SetFinalCommand() afterwards.
|
inline |
Sets the (currently) final command in the pose generation.
This will be used to determine which other commands are necessary to calculate.
|
inline |
Whether the caller should send ezMsgAnimationPoseUpdated to its children.
Typically this should be done, to forward the calculated pose to the animated mesh components. However, when some other component takes over control (usually a ragdoll), the pose from this generator isn't the final result and thus should not be forwarded. The other component will take care of this already.
void ezAnimPoseGenerator::UpdatePose | ( | bool | bRequestExternalPoseGeneration | ) |
Calculates the pose, using the final command as reference where to start.
If bRequestExternalPoseGeneration is true, inverse-kinematics (IK) and powered ragdolls are also used.