FParticleEmitterInstance

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/ParticleEmitterInstances.h

Include

#include "ParticleEmitterInstances.h"

Syntax

struct FParticleEmitterInstance

Variables

Name Description

Public variable

int32

 

ActiveParticles

The number of particles currently active in the emitter.

Public variable

uint32: 1

 

bAxisLockEnabled

Whether axis lock is enabled, cached here to avoid finding it from the module each frame

Public variable

bool

 

bEmitterIsDone

True if the emitter has no active particles and will no longer spawn any in the future

Public variable

uint32: 1

 

bEnabled

Component can disable Tick and Rendering of this emitter.

Public variable

uint32: 1

 

bFakeBurstsWhenSpawningSupressed

When true and spawning is supressed, the bursts will be faked so that when spawning is enabled again, the bursts don't fire late.

Public variable

uint32: 1

 

bHaltSpawning

If true, halt spawning for this instance.

Public variable

uint32: 1

 

bHaltSpawningExternal

If true, this emitter has been disabled by game code and some systems to re-enable are not allowed.

Public variable

uint32: 1

 

bIgnoreComponentScale

If true, the emitter ignores the component's scale. (Mesh emitters only).

Public variable

uint32: 1

 

bIsBeam

Hack: Make sure this is a Beam type to avoid casting from/to wrong types.

Public variable

uint32: 1

 

bKillOnCompleted

If true, kill this emitter instance when it has completed.

Public variable

uint32: 1

 

bKillOnDeactivate

If true, kill this emitter instance when it is deactivated.

Public variable

uint32: 1

 

bRequiresLoopNotification

If true, the emitter has modules that require loop notification.

Public variable

uint32: 1

 

bRequiresSorting

Whether this emitter requires sorting as specified by artist.

Public variable

TArray< struct ...

 

BurstFired

The BurstFire information.

Public variable

int32

 

CameraPayloadOffset

The offset to the Camera payload in the particle data.

Public variable

UParticleSystem...

 

Component

The component who owns it.

Public variable

float

 

CurrentDelay

The emitter's delay for the current loop

Public variable

UParticleLODLev...

 

CurrentLODLevel

The currently set LOD level.

Public variable

int32

 

CurrentLODLevelIndex

The index of the currently set LOD level.

Public variable

UMaterialInterf...

 

CurrentMaterial

The material to render this instance with.

Public variable

int32

 

DynamicParameterDataOffset

The offset to the dynamic parameter payload in the particle data

Public variable

float

 

EmitterDuration

The current duration fo the emitter instance.

Public variable

TArray< float >

 

EmitterDurations

The emitter duration at each LOD level for the instance.

Public variable

float

 

EmitterTime

Public variable

FMatrix

 

EmitterToSimulation

Transform from emitter local space to simulation space.

Public variable

int32

 

EventCount

Number of events this emitter has generated...

Public variable

TArray< class U...

 

HighQualityLights

Public variable

uint8 *

 

InstanceData

Pointer to the instance data array.

Public variable

int32

 

InstancePayloadSize

The size of the Instance data array.

Public variable

int32

 

IsRenderDataDirty

Flag indicating if the render data is dirty.

Public variable

float

 

LastDeltaTime

The amount of time simulated in the previous time step.

Public variable

float

 

LastTickDurationMs

How long did the last tick take?

Public variable

int32

 

LightDataOffset

Offset to the light module data payload.

Public variable

float

 

LightVolumetricScatteringIntensity

Public variable

FVector

 

Location

The location of the emitter instance

Public variable

TEnumAsByte< EP...

 

LockAxisFlags

Axis lock flags, cached here to avoid finding it from the module each frame

Public variable

int32

 

LoopCount

The number of loops completed by the instance.

Public variable

int32

 

MaxActiveParticles

The maximum number of active particles that can be held in the particle data array.

Public variable

int32

 

MaxEventCount

Public variable

int32

 

MaxVertexIndex

Public variable

FVector

 

OldLocation

The previous location of the instance.

Public variable

int32

 

OrbitModuleOffset

The offset to the Orbit module payload in the particle data.

Public variable

FBox

 

ParticleBoundingBox

The bounding box for the particles.

Public variable

uint32

 

ParticleCounter

Monotonically increasing counter.

Public variable

uint8 *

 

ParticleData

Pointer to the particle data array.

Public variable

uint16 *

 

ParticleIndices

Pointer to the particle index array.

Public variable

int32

 

ParticleSize

The total size of a particle (in bytes).

Public variable

int32

 

ParticleStride

The stride between particles in the ParticleData array.

Public variable

int32

 

PayloadOffset

The offset to the particle data.

Public variable

FVector2D

 

PivotOffset

The PivotOffset applied to the vertex positions

Public variable

FVector

 

PositionOffsetThisTick

Position offset for each particle. Will be reset to zero at the end of the tick

Public variable

float

 

SecondsSinceCreation

The number of seconds that have passed since the instance was created.

Public variable

FMatrix

 

SimulationToWorld

Transform from simulation space to world space.

Public variable

int32

 

SortMode

The sort mode to use for this emitter as specified by artist.

Public variable

float

 

SpawnFraction

The fraction of time left over from spawning.

Public variable

UParticleEmitte...

 

SpriteTemplate

The template this instance is based on.

Public variable

int32

 

SubUVDataOffset

The offset to the SubUV payload in the particle data.

Public variable

int32

 

TrianglesToRender

The number of triangles to render

Public variable

int32

 

TypeDataInstanceOffset

The offset to the TypeData instance payload.

Public variable

int32

 

TypeDataOffset

The offset to the TypeData payload in the particle data.

Constructors

Name Description

Public function

FParticleEmitterInstance()

Constructor

Destructors

Name Description

Public function Virtual

~FParticleEmitterInstance()

Destructor

Functions

Name Description

Public function Virtual

void

 

ApplyWorldOffset

(
    FVector InOffset,
    bool bWorldShift
)

Called on world origin changes.

Public function Virtual

void

 

BeginTrail()

Begins the trail.

Public function

void

 

CalculateOrbitOffset

(
    FOrbitChainModuleInstancePayload& ...,
    FVector& AccumOffset,
    FVector& AccumRotation,
    FVector& AccumRotationRate,
    float DeltaTime,
    FVector& Result,
    FMatrix& RotationMat
)

Calculate the orbit offset data.

Public function Virtual

uint32

 

CalculateParticleStride

(
    uint32 ParticleSize
)

Calculate the stride of a single particle for this instance

Public function

void

 

CheckEmitterFinished()

Called from Tick to determine whether the emitter will no longer spawn particles checks for emitters with 0 loops, infinite lifetime, and no continuous spawning (only bursts) and sets bEmitterIsDone if the last burst lies in the past and there are no active particles bEmitterIsDone is checked for all emitters by ParticleSystemComponent tick, and the particle system is deactivated if it's true for all emitters, and if bAutoDeactivate is set on the ParticleSystem

Public function

void

 

CheckSpawnCount

(
    int32 InNewCount,
    int32 InMaxCount
)

Public function Virtual

void

 

EndTrail()

Ends the trail.

Public function

void

 

FakeBursts()

Advances the bursts as though they were fired with out actually firing them.

Protected function Virtual

bool

 

FillReplayData

(
    FDynamicEmitterReplayDataBase& Out...
)

Captures dynamic replay data for this particle system.

Protected function

void

 

FixupParticleIndices()

Fixup particle indices to only have valid entries.

Public function Virtual

void

 

ForceSpawn

(
    float DeltaTime,
    int32 InSpawnCount,
    int32 InBurstCount,
    FVector& InLocation,
    FVector& InVelocity
)

Spawn/burst the given particles...

Public function Virtual

void

 

ForceUpdateBoundingBox()

Update the bounding box for the emitter

Force the bounding box to be updated.

Public function Virtual Const

void

 

GatherMaterialRelevance

(
    FMaterialRelevance* OutMateria...,
    const UParticleLODLevel* LODLe...,
    ERHIFeatureLevel::Type InFeatureLev...
)

Gathers material relevance flags for this emitter instance.

Public function Virtual

void

 

GetAllocatedSize

(
    int32& OutNum,
    int32& OutMax
)

Retrieve the allocated size of this instance.

Public function Virtual Const

bool

 

GetBeamEndPoint

(
    FVector& OutEndPoint
)

Public function Virtual Const

bool

 

GetBeamSourcePoint

(
    int32 SourceIndex,
    FVector& OutSourcePoint
)

Public function Virtual Const

bool

 

GetBeamSourceStrength

(
    int32 SourceIndex,
    float& OutSourceStrength
)

Public function Virtual Const

bool

 

GetBeamSourceTangent

(
    int32 SourceIndex,
    FVector& OutTangentPoint
)

Public function Virtual Const

bool

 

GetBeamTargetPoint

(
    int32 TargetIndex,
    FVector& OutTargetPoint
)

Public function Virtual Const

bool

 

GetBeamTargetStrength

(
    int32 TargetIndex,
    float& OutTargetStrength
)

Public function Virtual Const

bool

 

GetBeamTargetTangent

(
    int32 TargetIndex,
    FVector& OutTangentPoint
)

Public function Virtual

FBox

 

GetBoundingBox()

Retrieve the bounding box for the instance

Public function Virtual

float

 

GetCurrentBurstRateOffset

(
    float& DeltaTime,
    int32& Burst
)

Get the current burst rate offset (delta time is artificially increased to generate bursts)

Protected function

UParticleLOD...

 

GetCurrentLODLevelChecked()

Retrieves the current LOD level and asserts that it is valid.

Protected function

UMaterialInt...

 

GetCurrentMaterial()

Get the current material to render with.

Public function Virtual

FDynamicEmit...

 

GetDynamicData

(
    bool bSelected,
    ERHIFeatureLevel::Type InFeatureLev...
)

Retrieves the dynamic data for the emitter

Public function Virtual Const

int32

 

GetMeshRotationOffset()

Returns the offset to the mesh rotation payload, if any.

Public function

uint32

 

GetModuleDataOffset

(
    UParticleModule* Module
)

Get offset for particle payload data for a particular module

Public function

uint8 *

 

GetModuleInstanceData

(
    UParticleModule* Module
)

Get pointer to emitter instance payload data for a particular module

Public function

FParticleRan...

 

GetModuleRandomSeedInstanceData

(
    UParticleModule* Module
)

Get pointer to emitter instance random seed payload data for a particular module

Public function

int32

 

GetOrbitPayloadOffset()

Get the offset of the orbit payload.

Public function Virtual

FBaseParticl...

 

GetParticle

(
    int32 Index
)

Retrieve the particle at the given index

Public function Virtual

FBaseParticl...

 

GetParticleDirect

(
    int32 InDirectIndex
)

Get the particle at the given direct index

Public function

int32

 

GetParticleDirectIndex

(
    int32 InIndex
)

Get the physical index of the particle at the given index (ie, the contents of ParticleIndices[InIndex])

Public function

FVector

 

GetParticleLocationWithOrbitOffset

(
    FBaseParticle* Particle
)

Get the position of the particle taking orbit in to account.

Public function Virtual

FDynamicEmit...

 

GetReplayData()

Retrieves replay data for the emitter

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx& CumulativeResourc...
)

Returns resource size, similar to UObject function

Public function

void

 

GetScreenAlignmentAndScale

(
    int32& OutScreenAlign,
    FVector& OutScale
)

Returns the screen alignment and scale of the component.

Public function Virtual

uint8 *

 

GetTypeDataModuleInstanceData()

Get the pointer to the instance data allocated for type data module.

Public function Const

UWorld *

 

GetWorld()

Public function

bool

 

HasActiveParticles()

Returns whether the system has any active particles.

Public function Virtual

bool

 

HasCompleted()

Has the instance completed it's run?

Public function Virtual

void

 

Init()

Initialize the instance

Public function Virtual

void

 

InitParameters

(
    UParticleEmitter* InTemplate,
    UParticleSystemComponent* InCo...
)

Public function Virtual

bool

 

IsDynamicDataRequired

(
    UParticleLODLevel* CurrentLODL...
)

Checks some common values for GetDynamicData validity

Public function Virtual Const

bool

 

IsMeshRotationActive()

Returns true if mesh rotation is active.

Public function Virtual Const

bool

 

IsTrailEmitter()

Public function Virtual

void

 

KillParticle

(
    int32 Index
)

Kill the particle at the given instance

Public function Virtual

void

 

KillParticles()

Kill off any dead particles. (Remove them from the active array)

Public function Virtual

void

 

KillParticlesForced

(
    bool bFireEvents
)

Force kill all particles in the emitter.

Public function Virtual

void

 

OnDeactivateSystem()

Called when the particle system is deactivating...

Public function Virtual

void

 

OnEmitterInstanceKilled

(
    FParticleEmitterInstance* Inst...
)

When an emitter is killed, this will check other emitters and clean up anything pointing to this one

Public function Virtual

void

 

ParticlePrefetch()

Public function Virtual

void

 

PostSpawn

(
    FBaseParticle* Particle,
    float InterpolationPercentage,
    float SpawnTime
)

Handle any post-spawning actions required by the instance

Public function Virtual

void

 

PreSpawn

(
    FBaseParticle* Particle,
    const FVector& InitialLocation,
    const FVector& InitialVelocity
)

Handle any pre-spawning actions required for particles

Public function Virtual

void

 

ProcessParticleEvents

(
    float DeltaTime,
    bool bSuppressSpawning
)

Process received events.

Public function Virtual

uint32

 

RequiredBytes()

Retrieved the per-particle bytes that this emitter type requires.

Public function Virtual

void

 

ResetBurstList()

Reset the burst list information for the instance

Public function Virtual

void

 

ResetParticleParameters

(
    float DeltaTime
)

Reset the particle parameters

Public function Virtual

bool

 

Resize

(
    int32 NewMaxActiveParticles,
    bool bSetMaxActiveCount
)

Ensures enough memory is allocated for the requested number of particles.

Public function Virtual

void

 

Rewind()

Rewind the instance.

Public function Virtual

void

 

SetBeamEndPoint

(
    FVector NewEndPoint
)

Public function Virtual

void

 

SetBeamSourcePoint

(
    FVector NewSourcePoint,
    int32 SourceIndex
)

Public function Virtual

void

 

SetBeamSourceStrength

(
    float NewSourceStrength,
    int32 SourceIndex
)

Public function Virtual

void

 

SetBeamSourceTangent

(
    FVector NewTangentPoint,
    int32 SourceIndex
)

Public function Virtual

void

 

SetBeamTargetPoint

(
    FVector NewTargetPoint,
    int32 TargetIndex
)

Public function Virtual

void

 

SetBeamTargetStrength

(
    float NewTargetStrength,
    int32 TargetIndex
)

Public function Virtual

void

 

SetBeamTargetTangent

(
    FVector NewTangentPoint,
    int32 TargetIndex
)

Public function Virtual

void

 

SetCurrentLODIndex

(
    int32 InLODIndex,
    bool bInFullyProcess
)

Set the LOD to the given index

Public function

void

 

SetFakeBurstWhenSpawningSupressed

(
    bool bInFakeBurstsWhenSpawningSupre...
)

Public function Virtual

void

 

SetHaltSpawning

(
    bool bInHaltSpawning
)

Set the HaltSpawning flag

Public function Virtual

void

 

SetHaltSpawningExternal

(
    bool bInHaltSpawning
)

Set the bHaltSpawningExternal flag

Public function Virtual

void

 

SetMeshMaterials

(
    const TArray< UMaterialInterface&#...
)

Sets the materials with which mesh particles should be rendered.

Public function Virtual

void

 

SetTrailSourceData

(
    FName InFirstSocketName,
    FName InSecondSocketName,
    ETrailWidthMode InWidthMode,
    float InWidth
)

Sets the data that defines this trail.

Public function

void

 

SetupEmitterDuration()

Calculates the emitter duration for the instance.

Public function Virtual

float

 

Spawn

(
    float DeltaTime
)

Spawn particles for this emitter instance

Public function

void

 

SpawnParticles

(
    int32 Count,
    float StartTime,
    float Increment,
    const FVector& InitialLocation,
    const FVector& InitialVelocity,
    FParticleEventInstancePayload*...
)

Spawn the indicated number of particles.

Public function Virtual

void

 

Tick

(
    float DeltaTime,
    bool bSuppressSpawning
)

Tick the instance.

Public function Virtual

float

 

Tick_EmitterTimeSetup

(
    float DeltaTime,
    UParticleLODLevel* CurrentLODL...
)

Tick sub-function that handles EmitterTime setup, looping, etc.

Public function Virtual

void

 

Tick_MaterialOverrides

(
    int32 EmitterIndex
)

Ticks the emitter's material overrides.

Public function Virtual

void

 

Tick_ModuleFinalUpdate

(
    float DeltaTime,
    UParticleLODLevel* CurrentLODL...
)

Tick sub-function that handles module FINAL updates

Public function Virtual

void

 

Tick_ModulePostUpdate

(
    float DeltaTime,
    UParticleLODLevel* CurrentLODL...
)

Tick sub-function that handles module post updates

Public function Virtual

void

 

Tick_ModuleUpdate

(
    float DeltaTime,
    UParticleLODLevel* CurrentLODL...
)

Tick sub-function that handles module updates

Public function Virtual

float

 

Tick_SpawnParticles

(
    float DeltaTime,
    UParticleLODLevel* CurrentLODL...,
    bool bSuppressSpawning,
    bool bFirstTime
)

Tick sub-function that handles spawning of particles

Public function Virtual

void

 

UpdateBoundingBox

(
    float DeltaTime
)

Update the bounding box for the emitter

Public function Virtual

void

 

UpdateOrbitData

(
    float DeltaTime
)

Protected function

void

 

UpdateTransforms()

Updates all internal transforms.

Public function

bool

 

UseLocalSpace()

True if this emitter emits in local space

Constants

Name

Description

PeakActiveParticleUpdateDelta

The maximum DeltaTime allowed for updating PeakActiveParticle tracking.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss