Navigation
API > API/Runtime > API/Runtime/Chaos
| Name | FRewindData |
| Type | class |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/RewindData.h |
| Include Path | #include "RewindData.h" |
Syntax
class FRewindData
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FRewindData
(
FPBDRigidsSolver* InSolver, |
RewindData.h | ||
FRewindData
(
FPBDRigidsSolver* InSolver, |
RewindData.h |
Structs
| Name | Remarks |
|---|---|
| FDirtyParticleErrorInfo | |
| FFrameManagerInfo | |
| TDirtyObjectInfo |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FDirtyJointInfo | TDirtyObjectInfo< FJointStateBase, FPBDJointConstraintHandle > | RewindData.h | |
| FDirtyParticleInfo | TDirtyObjectInfo< FGeometryParticleStateBase, FGeometryParticleHandle > | RewindData.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| RewindDataResize | FOnRewindDataResizeInternal | RewindData.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllowResizingFromTickTrate | bool | RewindData.h | ||
| BlockResimFrame | int32 | Used to block rewinding past a physics change we currently don't handle. | RewindData.h | |
| bNeedsSave | bool | RewindData.h | ||
| bRewindDataOptimization | bool | RewindData.h | ||
| CurFrame | int32 | RewindData.h | ||
| DataIdxOffset | int32 | RewindData.h | ||
| DirtyJoints | TDirtyObjects< FDirtyJointInfo > | RewindData.h | ||
| DirtyParticleErrors | TDirtyObjects< FDirtyParticleErrorInfo > | RewindData.h | ||
| DirtyParticlePreResimState | TDirtyObjects< FParticleSimpleState > | RewindData.h | ||
| DirtyParticles | TDirtyObjects< FDirtyParticleInfo > | RewindData.h | ||
| DynamicHandlesUpdateHolder | TArray< FPBDRigidParticleHandle * > | Dynamic particle handles to be set in bulk | RewindData.h | |
| FramesSaved | int32 | RewindData.h | ||
| FrozenParticles | TArray< TPair< Chaos::FPhysicsProxyHandle, EObjectStateType > > | Used to keep track of objects we "freeze" during resim (by making them kinematic and marking them FrozenDuringResim) and their object state prior to the freezing so it can be set back to its original value | RewindData.h | |
| InitializedDeltaTime | Chaos::FReal | RewindData.h | ||
| InputHistories | TArray< TWeakPtr< FBaseRewindHistory > > | RewindData.h | ||
| InputParticleHistories | TMap< Chaos::FGeometryParticleHandle *, TWeakPtr< FBaseRewindHistory > > | RewindData.h | ||
| IslandValidationIslandParticles | TArray< const FGeometryParticleHandle * > | RewindData.h | ||
| IslandValidationIslands | TArray< const Private::FPBDIsland * > | Properties for EResimFrameValidation::IslandValidation logic. | RewindData.h | |
| KinematicHandlesUpdateHolder | TArray< FPBDRigidParticleHandle * > | Kinematic particle handles to be set in bulk | RewindData.h | |
| LatestFrame | int32 | RewindData.h | ||
| LatestTargetFrame | int32 | RewindData.h | ||
| Managers | TCircularBuffer< FFrameManagerInfo > | RewindData.h | ||
| NumPredictedFramesAverage | float | Average number of predicted frames, overall estimated value | RewindData.h | |
| ParticlesToForceResimAsFollower | TSet< const FGeometryParticleHandle * > | RewindData.h | ||
| PropertiesPool | FDirtyPropertiesPool | RewindData.h | ||
| ResimBubbles | TArray< Chaos::FAABB3 > | Resim bubbles start as the swept AABBs of particles needing resim, and grow to encompass nearby kinematic and dynamic particles involved in the resim Their formation happens in FindParticlesOverlappingResimBubbles() | RewindData.h | |
| ResimClampedFrames | int32 | RewindData.h | ||
| ResimCooldownUntilFrame | int32 | RewindData.h | ||
| ResimFrame | int32 | RewindData.h | ||
| ResimPerformanceCooldownCycleCounter | uint64 | RewindData.h | ||
| ResimStartCycleCounter | uint64 | Used to measure how long a resim takes in realtime and then wait that much before allowing to trigger a new resim. | RewindData.h | |
| SleepingHandlesUpdateHolder | TArray< FPBDRigidParticleHandle * > | Sleeping particle handles to be set in bulk | RewindData.h | |
| Solver | FPBDRigidsSolver * | RewindData.h | ||
| StateHistories | TArray< TWeakPtr< FBaseRewindHistory > > | RewindData.h | ||
| StateParticleHistories | TMap< Chaos::FGeometryParticleHandle *, TWeakPtr< FBaseRewindHistory > > | RewindData.h | ||
| StaticHandlesUpdateHolder | TArray< FPBDRigidParticleHandle * > | Static particle handles to be set in bulk | RewindData.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AccumulateErrorIfNecessary
(
FGeometryParticleHandle& Obj, |
|||
void AddInputHistory
(
const TSharedPtr< FBaseRewindHistory >& InputHistory |
Add input history to the rewind data for future use while resimulating | RewindData.h | |
void AddInputHistory
(
const TSharedPtr< FBaseRewindHistory >& InputHistory, |
Add input history for particle to the rewind data | RewindData.h | |
void AddStateHistory
(
const TSharedPtr< FBaseRewindHistory >& StateHistory |
Add state history to the rewind data for future use while rewinding | RewindData.h | |
void AddStateHistory
(
const TSharedPtr< FBaseRewindHistory >& StateHistory, |
Add state history for particle to the rewind data | RewindData.h | |
void AdvanceFrame
(
FReal DeltaTime, |
Called just before physics is solved | RewindData.h | |
void ApplyInputs
(
const int32 ApplyFrame, |
Apply inputs for specified frame from rewind data | RewindData.h | |
void BlockResim() |
This blocks any future resimulation to rewind back past the frame this is called on | RewindData.h | |
void BufferPhysicsResults
(
TMap< const IPhysicsProxyBase*, struct FDirtyRigidParticleReplicationErrorData >& DirtyRigidEr... |
Move post-resim error correction data from RewindData to FPullPhysicsData for marshaling to GT where it can be used in render interpolation | RewindData.h | |
int32 Capacity() |
RewindData.h | ||
void ClearPhaseAndFuture
(
FGeometryParticleHandle& Handle, |
Clear all the simulation history after Frame | RewindData.h | |
const int32 CompareTargetsToLastFrame() |
Check if we have received targets already for the last frame simulated, if so compare those with the result of the simulation and if they desync return the frame value to request a rewind for to correct the desync NOTE: This only happens when the client has desynced and is behind the server, so we receive server states for frames not yet simulated | RewindData.h | |
int32 CurrentFrame() |
RewindData.h | ||
void DisableInHistoryFromFrame
(
IPhysicsProxyBase* PhysicsProxy, |
RewindData.h | ||
void DumpHistory_Internal
(
const int32 FramePrintOffset, |
RewindData.h | ||
void EndResim() |
Called at the end of resim | RewindData.h | |
void ExtendHistoryWithFrame
(
const int32 Frame |
Extend the current history size to be sure to include the given frame | RewindData.h | |
void ExtractHistoryState
(
FGeometryParticleHandle& Handle, |
Extract some history information before cleaning/pushing state | RewindData.h | |
int32 FindValidResimFrame
(
const int32 RequestedFrame |
Find the first previous valid frame having received physics target from the server | RewindData.h | |
void FinishFrame() |
RewindData.h | ||
void ForceResimAsFollower
(
FGeometryParticleHandle* Handle, |
RewindData.h | ||
const int32 GetBlockedResimFrame() |
Get the latest frame resim has been blocked from rewinding past | RewindData.h | |
IResimCacheBase * GetCurrentStepResimCache() |
RewindData.h | ||
FReal GetDeltaTimeForFrame
(
int32 Frame |
RewindData.h | ||
int32 GetEarliestFrame_Internal() |
RewindData.h | ||
int32 GetFramesSaved() |
RewindData.h | ||
int32 GetLatestFrame() |
RewindData.h | ||
int32 GetLatestReceivedTargetStateFrame
(
FGeometryParticleHandle& Handle |
RewindData.h | ||
int32 GetNumDirtyParticles() |
Number of particles that we're currently storing history for. | RewindData.h | |
FJointState GetPastJointStateAtFrame
(
const FPBDJointConstraintHandle& Handle, |
Query the state of joints from the past. Can only be used when not already resimming | RewindData.h | |
FGeometryParticleState GetPastStateAtFrame
(
const FGeometryParticleHandle& Handle, |
Query the state of particles from the past. Can only be used when not already resimming | RewindData.h | |
void GetPreResimState
(
Chaos::FGeometryParticleHandle* GeometryParticle, |
Get cached pre resimulation state for particle, if there is one | RewindData.h | |
const int32 GetResimFrame() |
Get and set the frame we resimulate from | RewindData.h | |
const FPBDRigidsSolver * GetSolver() |
Return the rewind data solver | RewindData.h | |
bool GetUseCollisionResimCache () |
Check if a resim cache based on IResimCacheBase (FEvolutionResimCache by default) is being used. | RewindData.h | |
void Init
(
FPBDRigidsSolver* InSolver, |
RewindData.h | ||
void Init
(
FPBDRigidsSolver* InSolver, |
RewindData.h | ||
bool IsFinalResim() |
RewindData.h | ||
bool IsFrameWithinRewindHistory
(
int32 Frame |
Check if a frame number is within the currently allowed rewind span | RewindData.h | |
bool IsResim() |
RewindData.h | ||
const bool IsResimCooldown() |
RewindData.h | ||
void MarkDirtyFromPT
(
FGeometryParticleHandle& Handle |
Call this to mark specific particle as dirty and cache its current data, expected to be called at the start of OnPreSimulate_Internal, it caches data in FFrameAndPhase::PostPushData | RewindData.h | |
void MarkDirtyJointFromPT
(
FPBDJointConstraintHandle& Handle |
Call this to mark specific joint as dirty and cache its current data, expected to be called at the start of OnPreSimulate_Internal, it caches data in FFrameAndPhase::PostPushData | RewindData.h | |
bool OverlapsAnyResimBubble
(
const Chaos::FAABB3& InAABB |
This can be used to determine if an update that affects physics and restricts its effects to within an AABB can be skipped during a resim. | RewindData.h | |
void PushGTDirtyData
(
const FDirtyPropertiesManager& SrcManager, |
Called just before Proxy::PushToPhysicsState is called | RewindData.h | |
void PushPTDirtyData
(
TPBDRigidParticleHandle< FReal, 3 >& Rigid, |
Called post solve but just before PQ are applied to XR | RewindData.h | |
void PushStateAtFrame
(
FGeometryParticleHandle& Handle, |
Push a physics state in the rewind data at specified frame | RewindData.h | |
void RemoveInputHistory
(
const TSharedPtr< FBaseRewindHistory >& InputHistory |
Remove input history from the rewind data | RewindData.h | |
void RemoveInputHistory
(
const TSharedPtr< FBaseRewindHistory >& InputHistory, |
Remove input history for particle from the rewind data | RewindData.h | |
void RemoveObject
(
const FGeometryParticleHandle* Particle, |
RewindData.h | ||
void RemoveObject
(
const FPBDJointConstraintHandle* Joint, |
RewindData.h | ||
void RemovePreResimState
(
Chaos::FGeometryParticleHandle* GeometryParticle |
Remove cached pre resimulation state for particle | RewindData.h | |
void RemoveStateHistory
(
const TSharedPtr< FBaseRewindHistory >& StateHistory |
Remove state history from the rewind data | RewindData.h | |
void RemoveStateHistory
(
const TSharedPtr< FBaseRewindHistory >& StateHistory, |
Remove state history for particle from the rewind data | RewindData.h | |
void RequestResimulation
(
int32 RequestedFrame, |
Request a resimulation by setting a requested frame to rewind to | RewindData.h | |
void ResizeRewindDataIfNeeded() |
Check if we need to resize the rewind data | RewindData.h | |
void RestoreHistoryState
(
FGeometryParticleHandle& Handle, |
Restore some history information after cleaning/pushing state | RewindData.h | |
void RewindStates
(
const int32 RewindFrame, |
Rewind to state for a specified frame from rewind data | RewindData.h | |
void SetResimFrame
(
int32 Frame |
RewindData.h | ||
void SetRewindDataOptimization
(
bool InRewindDataOptimization |
Set if RewindData optimizations should be enabled or not. | RewindData.h | |
void SetTargetStateAtFrame
(
FGeometryParticleHandle& Handle, |
RewindData.h | ||
void SkipFrames
(
int32 NumFramesToSkip |
Advance the frame counter without running desync checks or other per-frame logic. | RewindData.h | |
void SpawnProxyIfNeeded
(
FSingleParticlePhysicsProxy& Proxy |
RewindData.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool CheckQuaternionThreshold
(
FQuat A, |
RewindData.h | ||
static bool CheckVectorThreshold
(
FVec3 A, |
RewindData.h | ||
static void DesyncObject
(
TDirtyInfo& Info, |
RewindData.h |