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

Engine.EmitterPool

Extends
Actor
Modifiers
native transient 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-2011 Epic Games, Inc. All Rights Reserved.

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

Direct Known Subclasses:

UDKEmitterPool

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
AspectRatio16x9, AspectRatio4x3, AspectRatio5x4, DegToRad, DegToUnrRot, INDEX_NONE, InvAspectRatio16x9, InvAspectRatio4x3, InvAspectRatio5x4, MaxInt, Pi, RadToDeg, RadToUnrRot, UnrRotToDeg, UnrRotToRad

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, AngularVelocity, Attached, bAllowFluidSurfaceInteraction, bAlwaysEncroachCheck, bAlwaysRelevant, bAlwaysTick, Base, BaseBoneName, BaseSkelComponent, bBlockActors, bBlocksNavigation, bBlocksTeleport, bBounce, bCallRigidBodyWakeEvents, bCanBeAdheredTo, bCanBeDamaged, bCanBeFrictionedTo, bCanStepUpOn, bCanTeleport, bCollideActors, bCollideAsEncroacher, bCollideComplex, bCollideWhenPlacing, bCollideWorld, bComponentOutsideWorld, bConsiderAllStaticMeshComponentsForStreaming, bDebug, bDebugEffectIsRelevant, bDeleteMe, bDemoOwner, bDemoRecording, bDestroyedByInterpActor, bDestroyInPainVolume, bEditable, bEdShouldSnap, bExchangedRoles, bForceAllowKismetModification, bForceDemoRelevant, bForceNetUpdate, bForceOctreeSNFilter, bGameRelevant, bHardAttach, bHasAlternateTargetLocation, bHidden, bHiddenEd, bHiddenEdCustom, bHiddenEdGroup, bHiddenEdLevel, bHiddenEdTemporary, bHurtEntry, bIgnoreBaseRotation, bIgnoreEncroachers, bIgnoreRigidBodyPawns, bIsMoving, bJustTeleported, bKillDuringLevelTransition, bLockLocation, BlockRigidBody, bMovable, bMoveIgnoresDestruction, bNetDirty, bNetInitial, bNetInitialRotation, bNetOwner, bNetTemporary, bNoDelete, bNoEncroachCheck, bOnlyDirtyReplication, bOnlyOwnerSee, bOnlyRelevantToOwner, bOrientOnSlope, bPathColliding, bPathTemp, bPendingDelete, bPendingNetUpdate, bPhysRigidBodyOutOfWorldCheck, bPostRenderIfNotVisible, bProjTarget, bPushedByEncroachers, bReplicateInstigator, bReplicateMovement, bReplicateRigidBodyLocation, bRigidBodyWasAwake, bRouteBeginPlayEvenIfStatic, bScriptInitialized, bShadowParented, bShouldBaseAtStartup, bSkipActorPropertyReplication, bStatic, bTearOff, bTempEditor, bTicked, bTickIsDisabled, bUpdateSimulatedPosition, bWorldGeometry, Children, CollisionComponent, CollisionType, Components, CreationTime, CustomTimeDilation, DetachFence, DrawScale3D, DrawScale, EditorIconColor, GeneratedEvents, Group, HiddenEditorViews, InitialState, Instigator, LastNetUpdateTime, LastRenderTime, LatentActions, LatentFloat, LatentSeqNode, LifeSpan, Location, MessageClass, NetPriority, NetTag, NetUpdateFrequency, NetUpdateTime, OverlapTag, Owner, PendingTouch, Physics, PhysicsVolume, PrePivot, RelativeLocation, RelativeRotation, RemoteRole, ReplicatedCollisionType, Role, Rotation, RotationRate, SupportedEvents, Tag, TickFrequency, TickFrequencyAtEndDistance, TickFrequencyDecreaseDistanceEnd, TickFrequencyDecreaseDistanceStart, TickFrequencyLastSeenTimeBeforeForcingMaxTickFrequency, TickGroup, Timers, TimeSinceLastTick, 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
AlphaBlendType, EAspectRatioAxisConstraint, EAutomatedRunResult, EAxis, EDebugBreakType, EInputEvent, EInterpCurveMode, EInterpMethodType, ETickingGroup

Structures Summary
EmitterBaseInfo
PSC, Base, RelativeLocation, RelativeRotation, bInheritBaseScale
Inherited Structures from Engine.Actor
ActorReference, AnimSlotDesc, AnimSlotInfo, BasedPosition, CollisionImpactData, ImpactInfo, NavReference, PhysEffectInfo, RigidBodyContactInfo, RigidBodyState, TimerData, TraceHitInfo
Inherited Structures from Core.Object
Array_Mirror, BitArray_Mirror, BoneAtom, Box, BoxSphereBounds, Color, Cylinder, double, FColorVertexBuffer_Mirror, Guid, IndirectArray_Mirror, InlinePointerArray_Mirror, InterpCurveFloat, InterpCurveLinearColor, InterpCurvePointFloat, InterpCurvePointLinearColor, InterpCurvePointQuat, InterpCurvePointTwoVectors, InterpCurvePointVector, InterpCurvePointVector2D, InterpCurveQuat, InterpCurveTwoVectors, InterpCurveVector, InterpCurveVector2D, IntPoint, LinearColor, Map_Mirror, Matrix, MultiMap_Mirror, OctreeElementId, Plane, pointer, Quat, qword, RawDistribution, RenderCommandFence, RenderCommandFence_Mirror, Rotator, Set_Mirror, SHVector, SHVectorRGB, SparseArray_Mirror, TAlphaBlend, ThreadSafeCounter, TPOV, TwoVectors, UntypedBulkData_Mirror, Vector, Vector2D, Vector4

Functions Summary
function ClearPoolComponents (bool bClearActive = false)
function FreeMaterialInstanceConstants (StaticMeshComponent SMC)
function FreeStaticMeshComponents (ParticleSystemComponent PSC)
functionMaterialInstanceConstant GetFreeMatInstConsts (bool bCreateNewObject = true)
functionStaticMeshComponent GetFreeStaticMeshComponent (bool bCreateNewObject = true)
functionParticleSystemComponent GetPooledComponent (ParticleSystem EmitterTemplate, bool bAutoActivate)
function OnParticleSystemFinished (ParticleSystemComponent PSC))
function ReturnToPool (ParticleSystemComponent PSC)
functionParticleSystemComponent SpawnEmitter (ParticleSystem EmitterTemplate, vector SpawnLocation, optional rotator SpawnRotation, optional Actor AttachToActor, optional bool bInheritScaleFromBase))
functionParticleSystemComponent SpawnEmitterCustomLifetime (ParticleSystem EmitterTemplate, optional bool bSkipAutoActivate))
functionParticleSystemComponent SpawnEmitterMeshAttachment (ParticleSystem EmitterTemplate, SkeletalMeshComponent Mesh, name AttachPointName, optional bool bAttachToSocket, optional vector RelativeLoc, optional rotator RelativeRot ))
Inherited Functions from Engine.Actor
ActivateEventClass, AllActors, AllOwnedComponents, AnimTreeUpdated, ApplyFluidSurfaceImpact, Attach, AttachComponent, AutonomousPhysics, BaseChange, BasedActors, BecomeViewTarget, BeginAnimControl, bool, BP2Vect, BroadcastLocalizedMessage, BroadcastLocalizedTeamMessage, Bump, CalcCamera, CalculateMinSpeedTrajectory, CanActorPlayFaceFXAnim, CanSplash, ChartData, CheckForErrors, CheckHitInfo, ChildActors, ClampRotation, ClearAllTimers, ClearLatentAction, ClearTimer, Clock, CollidingActors, CollisionChanged, ComponentList, ConsoleCommand, ConstraintBrokenNotify, ContainsPoint, CreateAudioComponent, CreateForceField, DebugFreezeGame, DebugMessagePlayer, Destroyed, Detach, DetachComponent, DisplayDebug, DoKismetAttachment, DrawDebugBox, DrawDebugCone, DrawDebugCoordinateSystem, DrawDebugCylinder, DrawDebugFrustrum, DrawDebugLine, DrawDebugPoint, DrawDebugSphere, DrawDebugStar, DrawDebugString, DynamicActors, EffectIsRelevant, EncroachedBy, EncroachingOn, EndViewTarget, Falling, FastTrace, FellOutOfWorld, FindBase, FindEventsOfClass, FindGoodEndView, FindSpot, FinishAnim, FinishAnimControl, fixedTurn, FlushDebugStrings, FlushPersistentDebugLines, ForceNetRelevant, ForceUpdateComponents, GainedChild, GetActorEyesViewPoint, GetActorFaceFXAsset, GetAggregateBaseVelocity, GetAimAdhesionExtent, GetAimFrictionExtent, GetALocalPlayerController, GetAvoidanceVector, GetBasedPosition, GetBaseMost, GetBoundingCylinder, GetComponentsBoundingBox, GetDebugName, GetDestination, GetFaceFXAudioComponent, GetGravityZ, GetHumanReadableName, GetItemName, GetLocalString, GetPackageGuid, GetPhysicsName, GetRemainingTimeForTimer, GetTargetLocation, GetTeamNum, GetTerminalVelocity, GetTimerCount, GetTimerRate, GetURLMap, HealDamage, HitWall, HurtRadius, InterpolationChanged, InterpolationFinished, InterpolationStarted, IsActorPlayingFaceFXAnim, IsBasedOn, IsBlockedBy, IsInPain, IsInPersistentLevel, IsOverlapping, IsOwnedBy, IsPlayerOwned, IsStationary, IsTimerActive, KilledBy, Landed, LocalPlayerControllers, LostChild, MakeNoise, MatchStarting, ModifyHearSoundComponent, ModifyTimerTimeDilation, Move, MoveSmooth, MovingWhichWay, NativePostRenderFor, NotifyLocalPlayerTeamReceived, NotifySkelControlBeyondLimit, OnAnimEnd, OnAnimPlay, OnAttachToActor, OnChangeCollision, OnDestroy, OnModifyHealth, OnRanOver, OnRigidBodySpringOverextension, OnSetBlockRigidBody, OnSetPhysics, OnSetVelocity, OnSleepRBPhysics, OnTeleport, OnToggleHidden, OnWakeRBPhysics, OutsideWorldBounds, OverlappingActors, OverRotated, PauseTimer, PawnBaseDied, PhysicsVolumeChange, PlayActorFaceFXAnim, PlayerCanSeeMe, PlayParticleEffect, PlaySound, PlayTeleportEffect, PointCheckComponent, PostBeginPlay, PostDemoRewind, PostInitAnimTree, PostRenderFor, PostTeleport, PostTouch, PreBeginPlay, PrestreamTextures, PreTeleport, RanInto, ReattachComponent, ReceivedNewEvent, ReplaceText, ReplicatedEvent, ReplicationEnded, Reset, ResetTimerTimeDilation, RigidBodyCollision, RootMotionExtracted, RootMotionModeChanged, RootMotionProcessed, ScriptGetTeamNum, SetAnimPosition, SetBase, SetBasedPosition, SetCollision, SetCollisionSize, SetCollisionType, SetDrawScale, SetDrawScale3D, SetForcedInitialReplicatedProperty, SetHardAttach, SetHidden, SetHUDLocation, SetInitialState, SetMorphWeight, SetNetUpdateTime, SetOnlyOwnerSee, SetOwner, SetPhysics, SetRelativeLocation, SetRelativeRotation, SetRotation, SetSkelControlScale, SetTickGroup, SetTickIsDisabled, SetTimer, SetZone, ShouldBeHiddenBySHOW_NavigationNodes, ShutDown, Sleep, Spawn, SpawnedByKismet, SpecialHandling, StopActorFaceFXAnim, StopsProjectile, SuggestTossVelocity, SupportsKismetModification, TakeDamage, TakeRadiusDamage, Tick, Timer, TornOff, Touch, TouchingActors, Trace, TraceActors, TraceAllPhysicsAssetInteractions, TraceComponent, TrailsNotify, TrailsNotifyEnd, TrailsNotifyTick, TriggerEventClass, TriggerGlobalEventClass, UnClock, UnTouch, UsedBy, Vect2BP, VisibleActors, VisibleCollidingActors, VolumeBasedDestroy, WillOverlap
Inherited Functions from Core.Object
!, !=, $, $=, %, &, &&, *, **, *=, +, ++, +=, -, --, -=, / , /=, <, <<, <=, ==, >, >=, >>, >>>, @, @=, Abs, Acos, Asc, Asin, Atan, Atan2, BeginState, ByteToFloat, Caps, Chr, Clamp, ClampLength, ClampRotAxis, ClampRotAxisFromBase, ClampRotAxisFromRange, ClassIsChildOf, ClockwiseFrom, ColorToLinearColor, ContinuedState, Cos, Cross, DebugBreak, Disable, Dot, DumpStateStack, DynamicLoadObject, Enable, EndState, EvalInterpCurveFloat, EvalInterpCurveVector, EvalInterpCurveVector2D, Exp, FCeil, FClamp, FCubicInterp, FFloor, FindDeltaAngle, FindObject, FInterpConstantTo, FInterpEaseIn, FInterpEaseInOut, FInterpEaseOut, FInterpTo, float, FloatToByte, FMax, FMin, FPctByRange, FRand, GetAngularDegreesFromRadians, GetAngularDistance, GetAngularFromDotDist, GetAxes, GetBuildChangelistNumber, GetDotDistance, GetEngineVersion, GetEnum, GetFuncName, GetHeadingAngle, GetMappedRangeValue, GetPackageName, GetPerObjectConfigSections, GetRangePctByValue, GetRangeValueByPct, GetRightMost, GetRotatorAxis, GetScriptTrace, GetStateName, GetSystemTime, GetUnAxes, GotoState, InCylinder, InStr, InverseTransformNormal, InverseTransformVector, IsA, IsChildState, IsInState, IsPendingKill, IsUTracing, IsZero, JoinArray, Left, Len, Lerp, LerpColor, Localize, Locs, Loge, LogInternal, MakeColor, MakeLinearColor, MakeRotationMatrix, MakeRotationTranslationMatrix, MakeRotator, MatrixGetAxis, MatrixGetOrigin, MatrixGetRotator, Max, Mid, Min, MirrorVectorByNormal, Normal, Normalize, NormalizeRotAxis, NoZDot, OrthoRotation, ParseLocalizedPropertyPath, ParseStringIntoArray, PathName, PausedState, PointDistToLine, PointDistToPlane, PointDistToSegment, PointProjectToPlane, PoppedState, PopState, ProjectOnTo, PushedState, PushState, QuatDot, QuatFindBetween, QuatFromAxisAndAngle, QuatFromRotator, QuatInvert, QuatProduct, QuatRotateVector, QuatSlerp, QuatToRotator, Rand, RDiff, Repl, Right, RInterpTo, RLerp, RotRand, Round, RSize, RSmerp, RTransform, SaveConfig, SClampRotAxis, ScriptTrace, SetUTracing, Sin, Split, SplitString, Sqrt, Square, StaticSaveConfig, Tan, TimeStamp, ToHex, TransformNormal, TransformVector, TransformVectorByRotation, UnwindHeading, vect2d, VInterpTo, VLerp, VRand, VRandCone, VRandCone2, VSize, VSize2D, VSizeSq, VSizeSq2D, VSmerp, WarnInternal, ^, ^^, |, ||, ~, ~=


Variables Detail

ActiveComponents Source code

var transient 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 transient const array<MaterialInstanceConstant> FreeMatInstConsts;
The free MaterialInstanceConstants used by emitters in this pool

FreeSMComponents Source code

var private transient 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 transient 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 transient 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 bool bInheritBaseScale;
var ParticleSystemComponent PSC;
var vector RelativeLocation;
var rotator RelativeRotation;
};
list of components that should be relative to an Actor


Functions Detail

ClearPoolComponents Source code

native final function ClearPoolComponents ( bool bClearActive = false )
Cleans up the pool components, removing any unused
@param bClearActive If TRUE, clear active as well as inactive pool components

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, bool bAutoActivate )
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, optional bool bInheritScaleFromBase) )
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
@param bInheritScaleFromBase (opt) - if TRUE scale from the base actor will be applied
@return the ParticleSystemComponent the effect will use

SpawnEmitterCustomLifetime Source code

function ParticleSystemComponent SpawnEmitterCustomLifetime ( ParticleSystem EmitterTemplate, optional bool bSkipAutoActivate) )
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
@param bSkipAutoActivate - if TRUE, do not autoactivate the component when retrieving it from the pool
@return the ParticleSystemComponent to use

SpawnEmitterMeshAttachment Source code

function ParticleSystemComponent SpawnEmitterMeshAttachment ( ParticleSystem EmitterTemplate, SkeletalMeshComponent Mesh, name AttachPointName, optional bool bAttachToSocket, optional vector RelativeLoc, optional rotator RelativeRot ) )
spawns a particle system attached to a SkeletalMeshComponent instead of to another Actor or to nothing as with SpawnEmitter(), the caller should avoid persistent references to the returned component as it will get automatically reclaimed when the effect is complete
@note: if the owning Actor is destroyed before the effect completes, the ParticleSystemComponent will end up being marked pending kill and therefore eventually destroyed as well. The pool handles this gracefully, although it's obviously suboptimal.
@param EmitterTemplate - particle system to create
@param Mesh - mesh component to attach to
@param AttachPointName - bone or socket to attach to
@param bAttachToSocket (opt) - whether AttachPointName is a socket or bone name
@param RelativeLoc (opt) - offset from bone location to place the effect (not used when attaching to socket)
@param RelativeRot (opt) - offset from bone rotation to place the effect (not used when attaching to socket)
@return the ParticleSystemComponent the effect will use


Defaultproperties

defaultproperties
{
	Begin Object Class=ParticleSystemComponent Name=ParticleSystemComponent0
 		AbsoluteTranslation=true
 		AbsoluteRotation=true
		SecondsBeforeInactive=0.0
	End Object
	PSCTemplate=ParticleSystemComponent0

	TickGroup=TG_DuringAsyncWork

	SMC_MIC_ReductionTime=2.5
	IdealStaticMeshComponents=250
	IdealMaterialInstanceConstants=250
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Creation time: ti 22-3-2011 19:56:48.644 - Created with UnCodeX