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::MovingAverageVelocityEvaluator 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

Calculate the initial velocities by averaging historic ragdoll poses based on their time deltas. This is using a moving average for non-equally spaced samples where keep the historic poses in the window up to date and store them in a ring buffer. As the samples's time delta vary, the minimum time window for the moving average can be controlled.

Member Function Documentation

◆ CalculateInitialVelocities()

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

This is called when the ragdoll gets activated.

Implements EMotionFX::RagdollVelocityEvaluator.

◆ Update()

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

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