Navigation
API > API/Plugins > API/Plugins/ChaosCaching
Base adapter type for interfacing with Chaos simulation caches. Any component wishing to use caches must have a compatible record adapter and a playback adapter to produce and consume cache data.
This base interface should not be used to implement those adapters however but the derived classes FCacheRecordAdapter and FCachePlaybackAdapter (declared below) should instead be used.
| Name | FComponentCacheAdapter |
| Type | class |
| Header File | /Engine/Plugins/Experimental/ChaosCaching/Source/ChaosCaching/Public/Chaos/Adapters/CacheAdapter.h |
| Include Path | #include "Chaos/Adapters/CacheAdapter.h" |
Syntax
class FComponentCacheAdapter : public IModularFeature
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FComponentCacheAdapter() |
Chaos/Adapters/CacheAdapter.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FComponentCacheAdapter() |
Chaos/Adapters/CacheAdapter.h |
Enums
Public
| Name | Remarks |
|---|---|
| SupportType |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| EngineAdapterPriorityBegin | const uint8 | Chaos/Adapters/CacheAdapter.h | |
| FeatureName | const FName | Registration name for modular features module | Chaos/Adapters/CacheAdapter.h |
| UserAdapterPriorityBegin | const uint8 | Chaos/Adapters/CacheAdapter.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual Chaos::FPhysicsSolverEvents * BuildEventsSolver
(
UPrimitiveComponent* InComponent |
Called to retrieve the base events solver for a specific component. | Chaos/Adapters/CacheAdapter.h | |
virtual void Finalize() |
Called from the game thread to perform any final steps before deallocation. | Chaos/Adapters/CacheAdapter.h | |
virtual void FinalizeComponent
(
UPrimitiveComponent* InComponent, |
Called from the game thread to finalize for a specific component | Chaos/Adapters/CacheAdapter.h | |
Chaos::FPhysicsSolver * GetComponentSolver
(
UPrimitiveComponent* InComponent |
Called to retrieve the rigid solver for a specific component if it exists. | Chaos/Adapters/CacheAdapter.h | |
UClass * GetDesiredClass () |
Query the class that this adapter wants to drive. | Chaos/Adapters/CacheAdapter.h | |
| Gets a unique identifier for the adapter | Chaos/Adapters/CacheAdapter.h | ||
uint8 GetPriority () |
Gets the priority for an adapter. | Chaos/Adapters/CacheAdapter.h | |
virtual void Initialize() |
Called from the game thread to perform any global setup that the adapter may need to perform. | Chaos/Adapters/CacheAdapter.h | |
virtual void InitializeForLoad
(
UPrimitiveComponent* InComponent, |
Called from the game thread to initialize a component and cache ready to load a cache at a given frame | Chaos/Adapters/CacheAdapter.h | |
virtual bool InitializeForPlayback
(
UPrimitiveComponent* InComponent, |
Chaos/Adapters/CacheAdapter.h | ||
virtual bool InitializeForPlayback
(
UPrimitiveComponent* InComponent, |
Called from the game thread to initialize a component and cache ready to playback a cache | Chaos/Adapters/CacheAdapter.h | |
virtual bool InitializeForRecord
(
UPrimitiveComponent* InComponent, |
Chaos/Adapters/CacheAdapter.h | ||
virtual bool InitializeForRecord
(
UPrimitiveComponent* InComponent, |
Called from the game thread to initialize a component and cache ready to record a cache | Chaos/Adapters/CacheAdapter.h | |
void Playback_PreSolve
(
UPrimitiveComponent* InComponent, |
Called by a cache observer actor when a cache needs to be applied to a component through this adapter. | Chaos/Adapters/CacheAdapter.h | |
void Record_PostSolve
(
UPrimitiveComponent* InComp, |
Called by a cache observer when a component should be recorded to a cache through this adapter. | Chaos/Adapters/CacheAdapter.h | |
void SetRestartSimulation
(
bool InbRestartSimulation |
Chaos/Adapters/CacheAdapter.h | ||
void SetRestartTimeRange
(
float InRestartTimeStart, |
Chaos/Adapters/CacheAdapter.h | ||
void SetRestState
(
UPrimitiveComponent* InComponent, |
Called from the game thread to set rest state from an evaluated time in the cache. | Chaos/Adapters/CacheAdapter.h | |
SupportType SupportsComponentClass
(
UClass* InComponentClass |
Query whether InComponentClass can be driven by this adapter. | Chaos/Adapters/CacheAdapter.h | |
virtual bool SupportsPlayWhileRecording() |
If the cache adapter supports playback when recording | Chaos/Adapters/CacheAdapter.h | |
virtual bool SupportsRestartSimulation() |
Chaos/Adapters/CacheAdapter.h | ||
bool ValidForPlayback
(
UPrimitiveComponent* InComponent, |
Determines whether a cache is able to safely playback on a component. | Chaos/Adapters/CacheAdapter.h | |
virtual void WaitForSolverTasks
(
UPrimitiveComponent* InComponent |
Stall on any solver tasks that could broadcast events via the EventsSolver. | Chaos/Adapters/CacheAdapter.h |