IAnimationOperatorQueue

IAnimationOperatorQueueabstract

#include

Inherits IAnimationPoseModifier.

Public Types

enum EOp {
eOp_Override, eOp_OverrideRelative, eOp_OverrideWorld, eOp_Additive,
eOp_AdditiveRelative
}

Public Member Functions

CRYINTERFACE_DECLARE_GUID (IAnimationOperatorQueue, "686a56d5-215d-44dd-a166-ccf13327d8a2"_cry_guid)
virtual void PushPosition (uint32 jointIndex, EOp eOp, const Vec3 &value)=0
virtual void PushOrientation (uint32 jointIndex, EOp eOp, const Quat &value)=0
virtual void PushStoreRelative (uint32 jointIndex, QuatT &output)=0
virtual void PushStoreAbsolute (uint32 jointIndex, QuatT &output)=0
virtual void PushStoreWorld (uint32 jointIndex, QuatT &output)=0
virtual void PushComputeAbsolute ()=0
virtual void Clear ()=0
- Public Member Functions inherited from IAnimationPoseModifier
CRYINTERFACE_DECLARE_GUID (IAnimationPoseModifier, "22fe4775-5e42-447f-bab6-274ed39af449"_cry_guid)
virtual bool Prepare (const SAnimationPoseModifierParams &params)=0
Command Buffer. Pose data will not be available at this stage.
virtual bool Execute (const SAnimationPoseModifierParams &params)=0
virtual void Synchronize ()=0
virtual void GetMemoryUsage (ICrySizer *pSizer) const =0

Detailed Description

Animation pose modifier that allows for overriding the orientation of individual joints

#include 

// Example of using operator queues to offset the positioning of one specific joint in a character
void OffsetJointPosition(ICharacterInstance& character)
{
    // Start by creating an instance of the operator queue
    // Note that this can be cached, and should not be re-created each frame
    std::shared_ptr pOperatorQueue;
    CryCreateClassInstanceForInterface(cryiidof(), pOperatorQueue);

    // For the sake of this example we will assume that our character's skeleton has a joint titled "Bip01 L Hand"
    const char* szJointName = "Bip01 L Hand";
    // Look up the identifier of the joint we want to manipulate
    // This id can be cached, to spare the run-time lookup
    const int jointId = character.GetIDefaultSkeleton().GetJointIDByName(szJointName);

    // Start per-frame actions, should be executed in an update loop
    // Offset the joint upwards by 0.1m
    pOperatorQueue->PushPosition(jointId, IAnimationOperatorQueue::eOp_Additive, Vec3(0, 0, 0.1f));
    // Now push the operator queue into the character for processing next frame
    character.GetISkeletonAnim()->PushPoseModifier(0, pOperatorQueue);
}