Open 3D Engine EMotionFX 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::RunningAverageVelocityEvaluator Class Reference

#include <RagdollVelocityEvaluators.h>

Inherits EMotionFX::RagdollVelocityEvaluator.

Public Member Functions

void Update (const Physics::RagdollState &lastRagdollPose, const Physics::RagdollState &currentRagdollPose, float timeDelta) override
 
void CalculateInitialVelocities (Physics::RagdollState &outRagdollPose) override
 This is called when the ragdoll gets activated.
 
- Public Member Functions inherited from EMotionFX::RagdollVelocityEvaluator
virtual void CalculateVelocities (Physics::RagdollState &outRagdollPose, const Physics::RagdollState &lastRagdollPose, const Physics::RagdollState &currentRagdollPose, float timeDelta)
 Calculate the linear and angular velocities for all nodes in the ragdoll based on the last, the current poses and the time delta.
 
virtual void Update (const Physics::RagdollState &lastRagdollPose, const Physics::RagdollState &currentRagdollPose, float timeDelta)=0
 
virtual void CalculateInitialVelocities (Physics::RagdollState &outRagdollPose)=0
 This is called when the ragdoll gets activated.
 

Detailed Description

The running average velocity evaluator calculates the velocity based on the last and current pose each frame and equally weights it with the running average. This result is a smaller memory footprint as there is no need to store the pose history but also ignores the time deltas and exponentially smoothed out older velocities.

Member Function Documentation

◆ CalculateInitialVelocities()

void EMotionFX::RunningAverageVelocityEvaluator::CalculateInitialVelocities ( Physics::RagdollState &  outRagdollPose)
overridevirtual

This is called when the ragdoll gets activated.

Implements EMotionFX::RagdollVelocityEvaluator.

◆ Update()

void EMotionFX::RunningAverageVelocityEvaluator::Update ( const Physics::RagdollState &  lastRagdollPose,
const Physics::RagdollState &  currentRagdollPose,
float  timeDelta 
)
overridevirtual

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