Navigation
API > API/Plugins > API/Plugins/Niagara
General storage class for all per instance simulation data in Niagara.
| Name | FNiagaraDataSet |
| Type | class |
| Header File | /Engine/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraDataSet.h |
| Include Path | #include "NiagaraDataSet.h" |
Syntax
class FNiagaraDataSet
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FNiagaraDataSet() |
NiagaraDataSet.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FNiagaraDataSet() |
NiagaraDataSet.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NumSpawnedIDs | int | NiagaraDataSet.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bInitialized | bool | NiagaraDataSet.h | ||
| BufferSizeBytes | std::atomic< int64 > | Tracked memory allocations | NiagaraDataSet.h | |
| CompiledData | FNiagaraCompiledDataReference< FNiagaraDataSetCompiledData > | NiagaraDataSet.h | ||
| CurrentData | FNiagaraDataBuffer * | Buffer containing the current simulation state. | NiagaraDataSet.h | |
| Data | TArray< FNiagaraDataBuffer *, TInlineAllocator< 2 > > | Actual data storage. | NiagaraDataSet.h | |
| DestinationData | FNiagaraDataBuffer * | Buffer we're currently simulating into. | NiagaraDataSet.h | |
| FNiagaraDataBuffer | friend | NiagaraDataSet.h | ||
| FreeIDsTable | TArray< int32 > | Table of free IDs available to allocate next tick. | NiagaraDataSet.h | |
| GPUFreeIDs | FRWBuffer | GPU buffer of free IDs available on the next tick. | NiagaraDataSet.h | |
| GPUNumAllocatedIDs | uint32 | NUmber of IDs allocated for the GPU simulation. | NiagaraDataSet.h | |
| IDAcquireTag | int32 | Tag to use when new IDs are acquired. Should be unique per tick. | NiagaraDataSet.h | |
| MaxAllocationCount | uint32 | Max allocation couns it eh maximum number of instances we can allocate which can be > MaxInstanceCount due to rounding. | NiagaraDataSet.h | |
| MaxInstanceCount | uint32 | Max instance count is the maximum number of instances we allow. | NiagaraDataSet.h | |
| MaxUsedID | int32 | Max ID seen in last execution. Allows us to shrink the IDTable. | NiagaraDataSet.h | |
| NumFreeIDs | int32 | Number of free IDs in FreeIDTable. | NiagaraDataSet.h | |
| SpawnedIDsTable | TArray< int32 > | Table of IDs spawned in the last tick (just the index part, the acquire tag is IDAcquireTag for all of them). | NiagaraDataSet.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Allocate
(
int32 NumInstances, |
Allocates space for NumInstances in the current destination buffer. | NiagaraDataSet.h | |
FNiagaraDataBuffer & AllocateBuffer() |
Allocates a new buffer from this data set, or reuses an unused one. | NiagaraDataSet.h | |
void AllocateGPUFreeIDs
(
uint32 InNumInstances, |
NiagaraDataSet.h | ||
FNiagaraDataBuffer & BeginSimulate
(
bool bResetDestinationData |
Begins a new simulation pass and grabs a destination buffer. | NiagaraDataSet.h | |
void CheckForNaNs() |
NiagaraDataSet.h | ||
void CopyFromGPUReadback
(
const float* GPUReadBackFloat, |
NiagaraDataSet.h | ||
void CopyTo
(
FNiagaraDataSet& Other, |
NiagaraDataSet.h | ||
| NiagaraDataSet.h | |||
void EndSimulate
(
bool SetCurrentData |
Ends a simulation pass and sets the current simulation state. | NiagaraDataSet.h | |
const FNiagaraDataSetCompiledData & GetCompiledData() |
NiagaraDataSet.h | ||
FNiagaraDataBuffer * GetCurrentData() |
NiagaraDataSet.h | ||
FNiagaraDataBuffer & GetCurrentDataChecked() |
NiagaraDataSet.h | ||
FNiagaraDataBuffer * GetDestinationData() |
NiagaraDataSet.h | ||
FNiagaraDataBuffer & GetDestinationDataChecked() |
NiagaraDataSet.h | ||
const TArray< int32 > & GetFreeIDTable () |
NiagaraDataSet.h | ||
TArray< int32 > & GetFreeIDTable () |
NiagaraDataSet.h | ||
FRWBuffer & GetGPUFreeIDs() |
NiagaraDataSet.h | ||
uint32 GetGPUNumAllocatedIDs() |
NiagaraDataSet.h | ||
FNiagaraDataSetID GetID() |
NiagaraDataSet.h | ||
int32 GetIDAcquireTag() |
NiagaraDataSet.h | ||
uint32 GetMaxAllocationCount() |
NiagaraDataSet.h | ||
uint32 GetMaxInstanceCount() |
NiagaraDataSet.h | ||
int32 * GetMaxUsedIDPtr() |
NiagaraDataSet.h | ||
uint32 GetNumFloatComponents() |
NiagaraDataSet.h | ||
int32 * GetNumFreeIDsPtr() |
NiagaraDataSet.h | ||
uint32 GetNumHalfComponents() |
NiagaraDataSet.h | ||
uint32 GetNumInt32Components() |
NiagaraDataSet.h | ||
uint32 GetNumVariables() |
NiagaraDataSet.h | ||
ENiagaraSimTarget GetSimTarget() |
NiagaraDataSet.h | ||
int64 GetSizeBytes() |
Returns size in bytes for all data buffers currently allocated by this dataset. | NiagaraDataSet.h | |
const TArray< int32 > & GetSpawnedIDsTable () |
NiagaraDataSet.h | ||
TArray< int32 > & GetSpawnedIDsTable () |
NiagaraDataSet.h | ||
bool GetVariableComponentOffsets
(
const FNiagaraVariableBase& Var, |
NiagaraDataSet.h | ||
const FNiagaraVariableLayoutInfo * GetVariableLayout
(
const FNiagaraVariableBase& Var |
NiagaraDataSet.h | ||
const TArray< FNiagaraVariableLayoutInfo > & GetVariableLayouts() |
NiagaraDataSet.h | ||
const TArray< FNiagaraVariableBase > & GetVariables() |
NiagaraDataSet.h | ||
bool HasVariable
(
const FNiagaraVariableBase& Var |
NiagaraDataSet.h | ||
bool HasVariable
(
const FName& Name |
NiagaraDataSet.h | ||
void Init
(
const FNiagaraDataSetCompiledData* InDataSetCompiledData, |
Initialize the data set with the compiled data | NiagaraDataSet.h | |
bool IsCurrentDataValid() |
NiagaraDataSet.h | ||
bool IsInitialized() |
NiagaraDataSet.h | ||
bool RequiresPersistentIDs() |
NiagaraDataSet.h | ||
void ResetBuffers() |
Resets current data but leaves variable/layout information etc intact. | NiagaraDataSet.h | |
void SetCurrentData
(
FNiagaraDataBuffer* CurrentData |
Set current data directly, you can not call this while inside a BeginSimulate block | NiagaraDataSet.h | |
void SetIDAcquireTag
(
int32 InTag |
NiagaraDataSet.h | ||
void SetMaxAllocationCount
(
uint32 InMaxAllocationCount |
NiagaraDataSet.h | ||
void SetMaxInstanceCount
(
uint32 InMaxInstanceCount |
NiagaraDataSet.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FNiagaraDataSet & operator=
(
const FNiagaraDataSet& |
NiagaraDataSet.h |