UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMotionVectorSimulation Class Reference

#include <MotionVectorSimulation.h>

+ Inheritance diagram for FMotionVectorSimulation:

Public Member Functions

ENGINE_API bool GetPreviousTransform (UObject *Object, FTransform *OutTransform) const
 
ENGINE_API TOptional< FTransformGetPreviousTransform (UObject *Object) const
 
ENGINE_API void SetPreviousTransform (UObject *Object, const FTransform &SimulatedPreviousTransform)
 
ENGINE_API void ClearPreviousTransform (UObject *Component)
 
virtual SIZE_T GetAllocatedSize () const override
 
- Public Member Functions inherited from FTickableGameObject
 UE_NONCOPYABLE (FTickableGameObject)
 
ENGINE_API FTickableGameObject (ETickableTickType StartingTickType=ETickableTickType::NewObject)
 
virtual ENGINE_API ~FTickableGameObject ()
 
virtual bool IsTickableWhenPaused () const
 
virtual UWorldGetTickableGameObjectWorld () const
 
ENGINE_API void SetTickableTickType (ETickableTickType NewTickType)
 
- Public Member Functions inherited from FTickableObjectBase
virtual ETickableTickType GetTickableTickType () const
 
virtual bool IsAllowedToTick () const
 
- Public Member Functions inherited from FUObjectArray::FUObjectDeleteListener
virtual ~FUObjectDeleteListener ()
 
virtual void NotifyUObjectDeleted (const class UObjectBase *Object, int32 Index)=0
 

Static Public Member Functions

static ENGINE_API FMotionVectorSimulationGet ()
 
static ENGINE_API bool IsEnabled ()
 
- Static Public Member Functions inherited from FTickableGameObject
static ENGINE_API void TickObjects (UWorld *World, ELevelTick LevelTickType, bool bIsPaused, float DeltaSeconds)
 

Additional Inherited Members

- Static Protected Member Functions inherited from FTickableObjectBase
static ENGINE_API void SimpleTickObjects (FTickableStatics &Statics, TFunctionRef< void(FTickableObjectBase *)> TickFunc)
 

Detailed Description

Singleton class used for optionally overriding previous transforms for motion vector computation. This predominantly used by Sequencer on camera cut frames to forcibly inform the renderer of simulated trajectories for primitive components and cameras. Transforms are stored in an unintrusive sparse map per-component to avoid paying a memory cost for all components. Simulated transforms are only valid for the frame that they were added, and are removed on a subsequent tick.

Member Function Documentation

◆ ClearPreviousTransform()

void FMotionVectorSimulation::ClearPreviousTransform ( UObject Component)

Clear the simulated previous transform for the specified component

Parameters
ObjectThe Object to clear the previous transform for

◆ Get()

FMotionVectorSimulation & FMotionVectorSimulation::Get ( )
static

Access the singleton instance for motion vector simulation

Returns
the singleton instance

◆ GetAllocatedSize()

virtual SIZE_T FMotionVectorSimulation::GetAllocatedSize ( ) const
inlineoverridevirtual

Returns the size of heap memory allocated internally by this listener

Reimplemented from FUObjectArray::FUObjectDeleteListener.

◆ GetPreviousTransform() [1/2]

TOptional< FTransform > FMotionVectorSimulation::GetPreviousTransform ( UObject Object) const

Check if the specified uboject has a simulated transform and return the result as an optional transform.

Note
: Previous simulated transforms are only valid for the frame on which they were added, and are removed on the next frame
Parameters
ObjectThe object to retrieve a previous transform for
Returns
An optional transform that is set if the specified component has a previous simulated transform, otherwise an empty optional.

◆ GetPreviousTransform() [2/2]

bool FMotionVectorSimulation::GetPreviousTransform ( UObject Object,
FTransform OutTransform 
) const

Check if the specified scene component has a simulated transform, setting the specified transform if so.

Note
: Previous simulated transforms are only valid for the frame on which they were added, and are removed on the next frame
Parameters
ObjectThe Object to retrieve a previous transform for
OutTransformA valid (non-null) pointer to a transform to receive the simulated transform if possible.
Returns
True if OutTransform was overwritten with a valid transform, false otherwise.

◆ IsEnabled()

bool FMotionVectorSimulation::IsEnabled ( )
static

Check whether motion vector simulation is enabled. When disabled, no transforms will be returned.

Returns
Whether motion vector simulation is currently enabled or not.

◆ SetPreviousTransform()

void FMotionVectorSimulation::SetPreviousTransform ( UObject Object,
const FTransform SimulatedPreviousTransform 
)

Assign a simulated previous frame transform for the specified object. Overwrites any existing simulated transform.

Note
: Previous simulated transforms are only valid for the frame on which they were added, and are removed on the next frame
Parameters
ObjectThe Object to assign the previous transform to
SimulatedPreviousTransformThe simulated transform that this component had on the last frame

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