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
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| 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< FDirtyParticleErrorInfo > | RewindData.h | ||
| DirtyParticles | TDirtyObjects< FDirtyParticleInfo > | RewindData.h | ||
| FramesSaved | int32 | 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 | |
| LatestFrame | int32 | RewindData.h | ||
| LatestTargetFrame | int32 | RewindData.h | ||
| Managers | TCircularBuffer< FFrameManagerInfo > | RewindData.h | ||
| PropertiesPool | FDirtyPropertiesPool | RewindData.h | ||
| ResimFrame | int32 | RewindData.h | ||
| Solver | FPBDRigidsSolver * | RewindData.h | ||
| StateHistories | TArray< TWeakPtr< FBaseRewindHistory > > | RewindData.h | ||
| StateParticleHistories | TMap< Chaos::FGeometryParticleHandle *, TWeakPtr< FBaseRewindHistory > > | 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 | |
void CacheCurrentDirtyData
(
FFrameAndPhase::EParticleHistoryPhase CurrentPhase |
Caches data for all particles and joints marked dirty in RewindData | 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 DumpHistory_Internal
(
const int32 FramePrintOffset, |
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 | ||
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 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 | |
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 current rewind history | RewindData.h | |
bool IsResim() |
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 | |
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 for particle from the rewind data | RewindData.h | |
void RemoveInputHistory
(
const TSharedPtr< FBaseRewindHistory >& InputHistory |
Remove input history from the rewind data | RewindData.h | |
void RemoveObject
(
const FPBDJointConstraintHandle* Joint, |
RewindData.h | ||
void RemoveObject
(
const FPBDJointConstraintHandle* Joint, |
RewindData.h | ||
void RemoveObject
(
const FGeometryParticleHandle* Particle, |
RewindData.h | ||
void RemoveObject
(
const FGeometryParticleHandle* 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 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 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 |