Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.EmitterPool

Extends
Actor
Modifiers
native config ( Game )

this class manages a pool of ParticleSystemComponents it is meant to be used for single shot effects spawned during gameplay to reduce object overhead that would otherwise be caused by spawning dozens of Emitters Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.

Core.Object
|   
+-- Engine.Actor
   |   
   +-- Engine.EmitterPool

Direct Known Subclasses:

UTEmitterPool

Constants Summary
Inherited Contants from Engine.Actor
ACTORMAXSTEPHEIGHT, MINFLOORZ, RBSTATE_ANGVELSCALE, RBSTATE_LINVELSCALE, RB_NeedsUpdate, RB_None, RB_Sleeping, REP_RBLOCATION_ERROR_TOLERANCE_SQ, TRACEFLAG_Blocking, TRACEFLAG_Bullet, TRACEFLAG_PhysicsVolumes, TRACEFLAG_SkipMovers
Inherited Contants from Core.Object
DegToRad, INDEX_NONE, MaxInt, Pi, RadToDeg

Variables Summary
array<ParticleSystemComponent>ActiveComponents
boolbLogPoolOverflow
boolbLogPoolOverflowList
array<MaterialInstanceConstant>FreeMatInstConsts
array<StaticMeshComponent>FreeSMComponents
intIdealMaterialInstanceConstants
intIdealStaticMeshComponents
intMaxActiveEffects
array<ParticleSystemComponent>PoolComponents
ParticleSystemComponentPSCTemplate
array<EmitterBaseInfo>RelativePSCs
floatSMC_MIC_CurrentReductionTime
floatSMC_MIC_ReductionTime
Inherited Variables from Engine.Actor
Acceleration, AllComponents, Attached, bAlwaysEncroachCheck, bAlwaysRelevant, bAlwaysTick, Base, BaseBoneName, BaseSkelComponent, bBlockActors, bBlocksNavigation, bBlocksTeleport, bBounce, bCanBeAdheredTo, bCanBeDamaged, bCanBeFrictionedTo, bCanTeleport, bClientDemoRecording, bCollideActors, bCollideComplex, bCollideWhenPlacing, bCollideWorld, bComponentOutsideWorld, bConsiderAllStaticMeshComponentsForStreaming, bDebug, bDeleteMe, bDemoOwner, bDemoRecording, bDestroyedByInterpActor, bDestroyInPainVolume, bEdShouldSnap, bExchangedRoles, bForceNetUpdate, bGameRelevant, bHardAttach, bHasAlternateTargetLocation, bHidden, bHiddenEd, bHiddenEdCustom, bHiddenEdGroup, bHurtEntry, bIgnoreBaseRotation, bIgnoreEncroachers, bIgnoreRigidBodyPawns, bIsMoving, bJustTeleported, bKillDuringLevelTransition, bLockLocation, BlockRigidBody, bMovable, bNetDirty, bNetInitial, bNetInitialRotation, bNetOwner, bNetTemporary, bNeverReplicateRotation, bNoDelete, bNoEncroachCheck, bOnlyDirtyReplication, bOnlyOwnerSee, bOnlyRelevantToOwner, bOrientOnSlope, bPathColliding, bPathTemp, bPendingDelete, bPendingNetUpdate, bPhysRigidBodyOutOfWorldCheck, bPostRenderIfNotVisible, bProjTarget, bPushedByEncroachers, bRepClientDemo, bReplicateInstigator, bReplicateMovement, bReplicateRigidBodyLocation, bRouteBeginPlayEvenIfStatic, bScriptInitialized, bShadowParented, bShouldBaseAtStartup, bSkipActorPropertyReplication, bStasis, bStatic, bTearOff, bTempEditor, bTicked, bUpdateSimulatedPosition, bWorldGeometry, Children, CollisionComponent, CollisionType, Components, CreationTime, CustomTimeDilation, DesiredRotation, DetachFence, DrawScale, DrawScale3D, GeneratedEvents, Group, InitialState, Instigator, LastNetUpdateTime, LastRenderTime, LatentActions, LatentFloat, LatentSeqNode, LifeSpan, Location, MessageClass, MinDistForNetRBCorrection, NetPriority, NetTag, NetUpdateFrequency, NetUpdateTime, OverlapTag, Owner, PendingTouch, Physics, PhysicsVolume, PrePivot, RelativeLocation, RelativeRotation, RemoteRole, Role, Rotation, RotationRate, SupportedEvents, Tag, TickGroup, Timers, Touching, Velocity, WorldInfo
Inherited Variables from Core.Object
Class, HashNext, HashOuterNext, Linker, LinkerIndex, Name, NetIndex, ObjectArchetype, ObjectFlags, ObjectInternalInteger, Outer, StateFrame, VfTableObject

Enumerations Summary
Inherited Enumerations from Engine.Actor
ECollisionType, EDoubleClickDir, EMoveDir, ENetRole, EPhysics, ETravelType
Inherited Enumerations from Core.Object
EAxis, EInputEvent, EInterpCurveMode, EInterpMethodType, ETickingGroup

Structures Summary
EmitterBaseInfo
PSC, Base, RelativeLocation, RelativeRotation
Inherited Structures from Engine.Actor
AnimSlotDesc, AnimSlotInfo, AsyncLineCheckResult, CollisionImpactData, ImpactInfo, NavReference, ReplicatedHitImpulse, RigidBodyContactInfo, RigidBodyState, TimerData, TraceHitInfo
Inherited Structures from Core.Object
Box, BoxSphereBounds, Color, Cylinder, double, DynamicMap_Mirror, Guid, IndirectArray_Mirror, InterpCurveFloat, InterpCurvePointFloat, InterpCurvePointQuat, InterpCurvePointTwoVectors, InterpCurvePointVector, InterpCurvePointVector2D, InterpCurveQuat, InterpCurveTwoVectors, InterpCurveVector, InterpCurveVector2D, IntPoint, LinearColor, Map_Mirror, Matrix, MultiMap_Mirror, Plane, pointer, Quat, qword, RawDistribution, RenderCommandFence, Rotator, TextureMipBulkData_Mirror, ThreadSafeCounter, TPOV, TwoVectors, UntypedBulkData_Mirror, Vector, Vector2D, Vector4

Functions Summary
function FreeMaterialInstanceConstants (StaticMeshComponent SMC)
function FreeStaticMeshComponents (ParticleSystemComponent PSC)
functionMaterialInstanceConstant GetFreeMatInstConsts (bool bCreateNewObject = true)
functionStaticMeshComponent GetFreeStaticMeshComponent (bool bCreateNewObject = true)
functionParticleSystemComponent GetPooledComponent (ParticleSystem EmitterTemplate)
function OnParticleSystemFinished (ParticleSystemComponent PSC))
function ReturnToPool (ParticleSystemComponent PSC)
functionParticleSystemComponent SpawnEmitter (ParticleSystem EmitterTemplate, vector SpawnLocation, optional rotator SpawnRotation, optional Actor AttachToActor))
functionParticleSystemComponent SpawnEmitterCustomLifetime (ParticleSystem EmitterTemplate))
Inherited Functions from Engine.Actor
ActivateEventClass, AllActors, AllOwnedComponents, Attach, AttachComponent, AutonomousPhysics, BaseChange, BasedActors, BecomeViewTarget, BeginAnimControl, BroadcastLocalizedMessage, BroadcastLocalizedTeamMessage, Bump, CalcCamera, CanSplash, ChartData, CheckForErrors, CheckHitInfo, CheckMaxEffectDistance, ChildActors, ClampRotation, ClearLatentAction, ClearTimer, Clock, CollidingActors, CollisionChanged, ComponentList, ConsoleCommand, ConstraintBrokenNotify, ContainsPoint, CreateAudioComponent, DebugFreezeGame, Destroy, Destroyed, Detach, DetachComponent, DisplayDebug, DoKismetAttachment, DrawDebugBox, DrawDebugCone, DrawDebugCoordinateSystem, DrawDebugCylinder, DrawDebugLine, DrawDebugSphere, DynamicActors, EffectIsRelevant, EncroachedBy, EncroachingOn, EndViewTarget, Falling, FastTrace, FellOutOfWorld, FindActorsOfClass, FindBase, FindEventsOfClass, FindGoodEndView, FindSpot, FinishAnim, FinishAnimControl, FlushPersistentDebugLines, ForceNetRelevant, ForceUpdateComponents, GainedChild, GetActorEyesViewPoint, GetActorFaceFXAsset, GetBaseMost, GetBoundingCylinder, GetComponentsBoundingBox, GetDebugName, GetDestination, GetFaceFXAudioComponent, GetGravityZ, GetHumanReadableName, GetItemName, GetLocalString, GetLocationStringFor, GetPackageGuid, GetPhysicsName, GetTargetLocation, GetTeamNum, GetTerminalVelocity, GetTimerCount, GetTimerRate, GetURLMap, GetUTFlag, HealDamage, HitWall, HurtRadius, InterpolationChanged, InterpolationFinished, InterpolationStarted, IsActorPlayingFaceFXAnim, IsBasedOn, IsInPain, IsInVolume, IsOverlapping, IsOwnedBy, IsPlayerOwned, IsStationary, IsTimerActive, KilledBy, Landed, LocalPlayerControllers, LostChild, MakeNoise, MatchStarting, ModifyHearSoundComponent, Move, MoveSmooth, MovingWhichWay, NativePostRenderFor, NotifyLocalPlayerTeamReceived, NotifySkelControlBeyondLimit, OnAnimEnd, OnAnimPlay, OnAttachToActor, OnCauseDamage, OnChangeCollision, OnDestroy, OnHealDamage, OnMakeNoise, OnRanOver, OnSetBlockRigidBody, OnSetPhysics, OnTeleport, OnToggleHidden, OutsideWorldBounds, OverlappingActors, OverRotated, PawnBaseDied, PhysicsVolumeChange, PickedUpBy, PlayActorFaceFXAnim, PlayerCanSeeMe, PlaySound, PlayTeleportEffect, PointCheckComponent, PostBeginPlay, PostInitAnimTree, PostRenderFor, PostTeleport, PostTouch, PreBeginPlay, PreTeleport, RanInto, ReplaceText, ReplicatedEvent, Reset, RigidBodyCollision, RootMotionExtracted, RootMotionModeChanged, ScriptGetTeamNum, SetAnimPosition, SetAnimWeights, SetBase, SetCollision, SetCollisionSize, SetDrawScale, SetDrawScale3D, SetForcedInitialReplicatedProperty, SetGRI, SetHardAttach, SetHidden, SetHUDLocation, SetInitialState, SetLocation, SetMorphWeight, SetNetUpdateTime, SetOnlyOwnerSee, SetOwner, SetPhysics, SetRelativeLocation, SetRelativeRotation, SetRotation, SetSkelControlScale, SetTickGroup, SetTimer, SetZone, ShutDown, Sleep, Spawn, SpawnedByKismet, SpecialHandling, StopActorFaceFXAnim, StopsProjectile, SuggestTossVelocity, TakeDamage, TakeRadiusDamage, Tick, Timer, TimeSince, TornOff, Touch, TouchingActors, Trace, TraceActors, TraceComponent, TriggerEventClass, UnClock, UnTouch, UsedBy, VisibleActors, VisibleCollidingActors
Inherited Functions from Core.Object
!, !=, $, $=, %, &, &&, *, **, *=, +, ++, +=, -, --, -=, / , /=, <, <<, <=, ==, >, >=, >>, >>>, @, @=, Abs, Acos, Asc, Asin, Atan, BeginState, ByteToFloat, Caps, Chr, Clamp, ClampLength, ClampRotAxis, ClassIsChildOf, ClearConfig, ClockwiseFrom, ColorToLinearColor, ContinuedState, Cos, Cross, Disable, Dot, DumpStateStack, DynamicLoadObject, Enable, EndState, Exp, FClamp, FCubicInterp, FindDeltaAngle, FindObject, FInterpEaseIn, FInterpEaseInOut, FInterpEaseOut, FInterpTo, FloatToByte, FMax, FMin, FPctByRange, FRand, GetAngularDegreesFromRadians, GetAngularDistance, GetAngularFromDotDist, GetAxes, GetDotDistance, GetEnum, GetFuncName, GetHeadingAngle, GetNetFuncName, GetPackageName, GetPerObjectConfigSections, GetRangePctByValue, GetRangeValueByPct, GetSpecialValue, GetStateName, GetUnAxes, GotoState, InStr, IsA, IsChildState, IsInState, IsNetScript, IsPendingKill, IsUTracing, IsZero, JoinArray, Left, Len, Lerp, Localize, Locs, Loge, LogInternal, MakeColor, MakeLinearColor, Max, Mid, Min, MirrorVectorByNormal, Normal, Normalize, NormalizeRotAxis, OrthoRotation, ParseStringIntoArray, PathName, PausedState, PointDistToLine, PointDistToPlane, PointInBox, PoppedState, PopState, ProjectOnTo, PushedState, PushState, QuatDot, QuatFindBetween, QuatFromAxisAndAngle, QuatFromRotator, QuatInvert, QuatProduct, QuatRotateVector, QuatSlerp, QuatToRotator, Rand, RandRange, RDiff, Repl, Right, RInterpTo, RLerp, RotRand, Round, RSize, RSmerp, SaveConfig, SClampRotAxis, ScriptTrace, SetSpecialValue, SetUTracing, Sin, Split, Sqrt, Square, StaticClearConfig, StaticSaveConfig, Tan, TimeStamp, ToHex, TransformVectorByRotation, UnwindHeading, vect2d, VInterpTo, VLerp, VRand, VSize, VSize2D, VSizeSq, VSizeSq2D, VSmerp, WarnInternal, ^, ^^, |, ||, ~, ~=


Variables Detail

ActiveComponents Source code

var array<ParticleSystemComponent> ActiveComponents;
components currently active

bLogPoolOverflow Source code

var globalconfig bool bLogPoolOverflow;
option to log out the names of all active effects when the pool overflows

bLogPoolOverflowList Source code

var globalconfig bool bLogPoolOverflowList;

FreeMatInstConsts Source code

var private const array<MaterialInstanceConstant> FreeMatInstConsts;
The free MaterialInstanceConstants used by emitters in this pool

FreeSMComponents Source code

var private const array<StaticMeshComponent> FreeSMComponents;
The free StaticMeshComponents used by emitters in this pool

IdealMaterialInstanceConstants Source code

var int IdealMaterialInstanceConstants;

IdealStaticMeshComponents Source code

var int IdealStaticMeshComponents;
The ideal number of StaticMeshComponents and MaterialInstanceConstants. If their counts are greater than this for more than ReductionTime, then they will be chopped down to their respective settings.

MaxActiveEffects Source code

var int MaxActiveEffects;
maximum allowed active components - if this is greater than 0 and is exceeded, the oldest active effect is taken

PoolComponents Source code

var const array<ParticleSystemComponent> PoolComponents;
components currently in the pool

PSCTemplate Source code

var protected ParticleSystemComponent PSCTemplate;
template to base pool components off of - should not be used for effects or attached to anything

RelativePSCs Source code

var array<EmitterBaseInfo> RelativePSCs;

SMC_MIC_CurrentReductionTime Source code

var transient float SMC_MIC_CurrentReductionTime;

SMC_MIC_ReductionTime Source code

var float SMC_MIC_ReductionTime;
The amount of time to allow the SMC and MIC arrays to be beyond their ideals.


Structures Detail

EmitterBaseInfo Source code

struct EmitterBaseInfo
{
var Actor Base;
var ParticleSystemComponent PSC;
var vector RelativeLocation;
var rotator RelativeRotation;
};
list of components that should be relative to an Actor


Functions Detail

FreeMaterialInstanceConstants Source code

protected native final function FreeMaterialInstanceConstants ( StaticMeshComponent SMC )
internal - moves the MIConstants from given SMComponent to the pool free list

FreeStaticMeshComponents Source code

protected native final function FreeStaticMeshComponents ( ParticleSystemComponent PSC )
internal - moves the SMComponents from given PSC to the pool free list

GetFreeMatInstConsts Source code

protected native final function MaterialInstanceConstant GetFreeMatInstConsts ( bool bCreateNewObject = true )
internal - retrieves a MaterialInstanceConstant from the pool free list
@param bCreateNewObject If TRUE, create an MIC w/ the pool as its outer
@return MaterialInstanceConstant The MIC, NULL if none was available/created

GetFreeStaticMeshComponent Source code

protected native final function StaticMeshComponent GetFreeStaticMeshComponent ( bool bCreateNewObject = true )
internal - retrieves a SMComponent from the pool free list
@param bCreateNewObject If TRUE, create an SMC w/ the pool as its outer
@return StaticMeshComponent The SMC, NULL if none was available/created

GetPooledComponent Source code

protected native final function ParticleSystemComponent GetPooledComponent ( ParticleSystem EmitterTemplate )
internal - helper for spawning functions gets a component from the appropriate pool array (checks PerEmitterPools) includes creating a new one if necessary as well as taking one from the active list if the max number active has been exceeded
@return the ParticleSystemComponent to use

OnParticleSystemFinished Source code

function OnParticleSystemFinished ( ParticleSystemComponent PSC) )
set to each pool component's finished delegate to return it to the pool for custom lifetime PSCs, must be called manually when done with the component

ReturnToPool Source code

protected native final function ReturnToPool ( ParticleSystemComponent PSC )
internal - detaches the given PSC and returns it to the pool

SpawnEmitter Source code

function ParticleSystemComponent SpawnEmitter ( ParticleSystem EmitterTemplate, vector SpawnLocation, optional rotator SpawnRotation, optional Actor AttachToActor) )
plays the specified effect at the given location and rotation, taking a component from the pool or creating as necessary
@note: the component is returned so the caller can perform any additional modifications (parameters, etc), but it shouldn't keep the reference around as the component will be returned to the pool as soon as the effect is complete
@param EmitterTemplate - particle system to create
@param SpawnLocation - location to place the effect in world space
@param SpawnRotation (opt) - rotation to place the effect in world space
@param AttachToActor (opt) - if specified, component will move along with this Actor
@return the ParticleSystemComponent the effect will use

SpawnEmitterCustomLifetime Source code

function ParticleSystemComponent SpawnEmitterCustomLifetime ( ParticleSystem EmitterTemplate) )
spawns a pooled component that has a custom lifetime (controlled by the caller) the caller is responsible for attaching/detaching the component as well as calling our OnParticleSystemFinished() function when it is done with the component the pool may take the component back early - if it does, it will trigger the component's OnSystemFinished delegate so the caller can guarantee that it will be triggered
@param EmitterTemplate - particle system to create
@return the ParticleSystemComponent to use


Defaultproperties

defaultproperties
{
   Begin Object Class=ParticleSystemComponent Name=ParticleSystemComponent0 ObjName=ParticleSystemComponent0 Archetype=ParticleSystemComponent'Engine.Default__ParticleSystemComponent'
      AbsoluteTranslation=True
      AbsoluteRotation=True
      Name="ParticleSystemComponent0"
      ObjectArchetype=ParticleSystemComponent'Engine.Default__ParticleSystemComponent'
   End Object
   PSCTemplate=ParticleSystemComponent0
   SMC_MIC_ReductionTime=2.500000
   IdealStaticMeshComponents=250
   IdealMaterialInstanceConstants=250
   TickGroup=TG_DuringAsyncWork
   CollisionType=COLLIDE_CustomDefault
   Name="Default__EmitterPool"
   ObjectArchetype=Actor'Engine.Default__Actor'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Creation time: sk 18-3-2018 10:00:36.643 - Created with UnCodeX