Navigation
API > API/Plugins > API/Plugins/ChaosCaching
| Name | UChaosCache |
| Type | class |
| Header File | /Engine/Plugins/Experimental/ChaosCaching/Source/ChaosCaching/Public/Chaos/ChaosCache.h |
| Include Path | #include "Chaos/ChaosCache.h" |
Syntax
UCLASS (Experimental, MinimalAPI)
class UChaosCache : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UChaosCache
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UChaosCache() |
Chaos/ChaosCache.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FNamedTransformTrack | FParticleTransformTrack | Per component/cache transform data. | Chaos/ChaosCache.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CurrentVersion | int32 | Version 0 : Pre versioning. | Chaos/ChaosCache.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCompressChannels | bool | Chaos/ChaosCache.h | ||
| ChannelCurveToParticle | TArray< int32 > | Map a curve index in the cache to the original particle index specified when recording | Chaos/ChaosCache.h | |
| ChannelsCompressionErrorThreshold | float | Chaos/ChaosCache.h | ||
| ChannelsCompressionSampleRate | float | Chaos/ChaosCache.h | ||
| ChannelsTracks | TMap< FName, FRichCurves > | Per-particle data, continuous per-frame data | Chaos/ChaosCache.h | |
| CompressedChannelsTracks | TMap< FName, FCompressedRichCurves > | Chaos/ChaosCache.h | ||
| CurveData | TMap< FName, FRichCurve > | Per component/cache curve data, any continuous data that isn't per-particle can be stored here | Chaos/ChaosCache.h | |
| InterpolationMode | EChaosCacheInterpolationMode | Chaos/ChaosCache.h |
|
|
| NamedTransformTracks | TMap< FName, FParticleTransformTrack > | Chaos/ChaosCache.h | ||
| NumRecordedFrames | uint32 | Chaos/ChaosCache.h |
|
|
| ParticleTracks | TArray< FPerParticleCacheData > | Per-particle data, includes transforms, velocities and other per-particle, per-frame data | Chaos/ChaosCache.h | |
| RecordedDuration | float | Chaos/ChaosCache.h |
|
|
| TrackToParticle | TArray< int32 > | Maps a track index in the cache to the original particle index specified when recording | Chaos/ChaosCache.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AdapterGuid | FGuid | GUID identifier for the adapter that spawned this cache | Chaos/ChaosCache.h | |
| bStripMassToLocal | bool | Indicates that we need to strip MassToLocal before playing the cache. | Chaos/ChaosCache.h | |
| CacheData | TScriptInterface< IChaosCacheData > | Optional cache data to store on the chaos cache | Chaos/ChaosCache.h | |
| CurrentPlaybackCount | std::atomic< int32 > | Chaos/ChaosCache.h | ||
| CurrentRecordCount | std::atomic< int32 > | Counts for current number of users, should only ever have one recorder, and if we do no playbacks | Chaos/ChaosCache.h | |
| EventTracks | TMap< FName, FCacheEventTrack > | Timestamped generic event tracks | Chaos/ChaosCache.h | |
| MaxTime | float | Max time in case we are not writing to particle/curves/channels datas | Chaos/ChaosCache.h | |
| MinTime | float | Min time in case we are not writing to particle/curves/channels datas | Chaos/ChaosCache.h | |
| ParticleToChannelCurve | TMap< int32, int32 > | Reverse Lookup for ChannelCurveToParticle. Rebuilt on load. | Chaos/ChaosCache.h | |
| PendingWrites | TQueue< FPendingFrameWrite, EQueueMode::Mpsc > | Pending writes from all threads to be consumed on the game thread, triggered by the recording cache manager | Chaos/ChaosCache.h | |
| Spawnable | FCacheSpawnableTemplate | Spawn template for an actor that can play this cache | Chaos/ChaosCache.h |
|
| Version | int32 | Version for controlling conditioning of older caches to work with current system. | Chaos/ChaosCache.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddFrame_Concurrent
(
FPendingFrameWrite&& InFrame |
Adds a new frame to process to a threadsafe queue for later processing in FlushPendingFrames | Chaos/ChaosCache.h | |
FCacheUserToken BeginPlayback() |
Initialise the cache for playback, may not take any actual action on the cache but will provide the caller with a valid cache user token if it is safe to continue with playback | Chaos/ChaosCache.h | |
FCacheUserToken BeginRecord
(
const UPrimitiveComponent* InComponent, |
Reset and initialize a cache to make it ready to record the specified component | Chaos/ChaosCache.h | |
void BuildSpawnableFromComponent
(
const UPrimitiveComponent* InComponent, |
Initializes the spawnable template from a currently existing component so it can be spawned by the editor when a cache is dragged into the scene. | Chaos/ChaosCache.h | |
void CompressChannelsData
(
float ErrorThreshold, |
Chaos/ChaosCache.h | ||
void EndPlayback
(
FCacheUserToken& InOutToken |
End a playback session for the cache. | Chaos/ChaosCache.h | |
void EndRecord
(
FCacheUserToken& InOutToken |
End the recording session for the cache. | Chaos/ChaosCache.h | |
FCacheEvaluationResult Evaluate
(
const FCacheEvaluationContext& InContext, |
Evaluate the cache with the specified parameters, returning the evaluated results | Chaos/ChaosCache.h | |
void EvaluateCurves
(
const FPerParticleCacheData& InData, |
Chaos/ChaosCache.h | ||
void EvaluateEvents
(
FPlaybackTickRecord& InTickRecord, |
Chaos/ChaosCache.h | ||
void EvaluateSingle
(
int32 InIndex, |
Evaluates a single particle from the tracks array | Chaos/ChaosCache.h | |
void EvaluateTransform
(
const FPerParticleCacheData& InData, |
Chaos/ChaosCache.h | ||
FCacheEventTrack & FindOrAddEventTrack
(
FName InName |
Chaos/ChaosCache.h | ||
void FlushPendingFrames () |
As we record post-simulate of physics, we're almost always taking data from a non-main thread (physics thread). | Chaos/ChaosCache.h | |
IChaosCacheData * GetCacheData() |
Get the cache data asset if defined | Chaos/ChaosCache.h | |
float GetDuration() |
Gets the recorded duration of the cache | Chaos/ChaosCache.h | |
const FCacheSpawnableTemplate & GetSpawnableTemplate() |
Read access to the spawnable template stored in the cache | Chaos/ChaosCache.h | |
void SetCacheData
(
IChaosCacheData* InCacheData |
Set the cache data asset interface | Chaos/ChaosCache.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostLoad() |
Chaos/ChaosCache.h | ||
virtual void Serialize
(
FArchive& Ar |
Chaos/ChaosCache.h |