Open 3D Engine MotionMatching Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EMotionFX::MotionMatching::PoseDataJointVelocities Class Reference

Extends a given pose with joint-relative linear and angular velocities. More...

#include <PoseDataJointVelocities.h>

Inherits PoseData.

Public Member Functions

void Clear ()
 
void LinkToActorInstance (const ActorInstance *actorInstance) override
 
void LinkToActor (const Actor *actor) override
 
void Reset () override
 Zero all linear and angular velocities.
 
void CopyFrom (const PoseData *from) override
 
void Blend (const Pose *destPose, float weight) override
 
void CalculateVelocity (const ActorInstance *actorInstance, AnimGraphPosePool &posePool, Motion *motion, float requestedSampleTime, size_t relativeToJointIndex)
 
void DebugDraw (AzFramework::DebugDisplayRequests &debugDisplay, const AZ::Color &color) const override
 
AZStd::vector< AZ::Vector3 > & GetVelocities ()
 
const AZStd::vector< AZ::Vector3 > & GetVelocities () const
 
const AZ::Vector3 & GetVelocity (size_t jointIndex)
 
AZStd::vector< AZ::Vector3 > & GetAngularVelocities ()
 
const AZStd::vector< AZ::Vector3 > & GetAngularVelocities () const
 
const AZ::Vector3 & GetAngularVelocity (size_t jointIndex)
 
void SetRelativeToJointIndex (size_t relativeToJointIndex)
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Detailed Description

Extends a given pose with joint-relative linear and angular velocities.

Member Function Documentation

◆ CalculateVelocity()

void EMotionFX::MotionMatching::PoseDataJointVelocities::CalculateVelocity ( const ActorInstance *  actorInstance,
AnimGraphPosePool &  posePool,
Motion *  motion,
float  requestedSampleTime,
size_t  relativeToJointIndex 
)

Calculate velocities for all joints in the pose.

Parameters
[in]actorInstanceThe actor instance to use the skeleton and bind pose from.
[in]posePoolCalculating velocities will require to sample the motion across a small window of time. The pose pool is used for storing temporary poses. Note that the pose pool is not thread-safe.
[in]motionThe source motion to use to calculate the velocities.
[in]requestedSampleTimeThe point in time in the motion to calculate the velocities for.
[in]relativeToJointIndexCalculate velocities relative to a given joint transform.

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