![]() |
ezEngine Release 26.3
|
#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) |
| ezArrayPtr< ezMat4 > | GetCurrentPose () const |
| void | SetFinalCommand (ezAnimPoseGeneratorCommandID cmdId) |
| ezAnimPoseGeneratorCommandID | GetFinalCommand () const |
| bool | ShouldSendPoseResultMsg () const |
Low-level infrastructure to generate animation poses using a command-based DAG (directed acyclic graph).
The pose generator uses a command pattern to build a dependency graph for pose generation. Commands are allocated and connected to form a DAG where each command can have zero or more input commands. This architecture provides two key benefits:
These command types are currently available:
Commands operate on two types of pose data:
Typical flow:
The generator is reused across frames for efficiency (caches sampling contexts), but commands are recreated each frame to build a new pose.
|
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.