## Engine
Class ParticleEmitter

source: C:\XIII\Engine\Classes\ParticleEmitter.uc

    Core.Object
       |
       +--Engine.ParticleEmitter

Direct Known Subclasses:BeamEmitter, MeshEmitter, SparkEmitter, SpriteEmitter

class ParticleEmitter
extends Core.Object

    //=============================================================================
    // ParticleEmitter: Base class for sub- emitters.
    //
    // make sure to keep structs in sync in UnParticleSystem.h
    //=============================================================================

Variables
`vector` | `Acceleration`
`int` | `ActiveParticles` currently active particles
`int` | `AddLocationFromOtherEmitter`
`int` | `AddVelocityFromOtherEmitter`
`bool` | `AllParticlesDead`
`bool` | `AutoDestroy`
`bool` | `AutoReset`
`range` | `AutoResetTimeRange`
`bool` | `AutomaticInitialSpawning`
`bool` | `BlendBetweenSubdivisions`
`float` | `CenterU`
`float` | `CenterV`
`array` | `CollisionPlanes`
`array` | `ColorScale`
`float` | `ColorScaleRepeats`
`EParticleCoordinateSystem` | `CoordinateSystem`
`Texture` | `CurAnimTexture` used to keep track of fractional PPTick
`float` | `CurAnimTime` used to keep track of fractional PPTick
`bool` | `DampRotation`
`rangevector` | `DampingFactorRange`
`bool` | `DisableFogging`
`bool` | `Disabled`
`EParticleDrawStyle` | `DrawStyle`
`EParticleEffectAxis` | `EffectAxis`
`vector` | `ExtentMultiplier`
`bool` | `FadeIn`
`float` | `FadeInEndTime`
`plane` | `FadeInFactor`
`bool` | `FadeOut`
`plane` | `FadeOutFactor`
`float` | `FadeOutStartTime`
`EParticleVelocityDirection` | `GetVelocityDirectionFrom`
`vector` | `GlobalOffset` used to keep track of fractional PPTick
`bool` | `Inactive`
`float` | `InactiveTime`
`float` | `InitialDelay` used to keep track of fractional PPTick
`range` | `InitialDelayRange`
`float` | `InitialParticlesPerSecond`
`range` | `LifetimeRange`
`vector` | `MaxAbsVelocity`
`range` | `MaxCollisions`
`int` | `MaxParticles`
`float` | `MinSquaredVelocity`
`string` | `Name`
`bool` | `NoSynchroAnim`
`bool` | `OnceTextureAnim`
`Emitter` | `Owner`
`float` | `PPSFraction` used to keep track of fractional PPTick
`int` | `PS2Data` used to keep track of fractional PPTick
`int` | `ParticleIndex` index into circular list of particles
`array` | `Particles`
`float` | `ParticlesPerSecond`
`bool` | `RandomSymmetryU`
`bool` | `RandomSymmetryV`
`vector` | `RealExtentMultiplier` used to keep track of fractional PPTick
`float` | `RelativeWarmupTime`
`bool` | `ResetAfterChange`
`bool` | `RespawnDeadParticles`
`rangevector` | `RotationDampingFactorRange`
`vector` | `RotationNormal`
`rotator` | `RotationOffset`
`float` | `SecondsBeforeInactive`
`array` | `SizeScale`
`float` | `SizeScaleRepeats`
`int` | `SpawnAmount`
`int` | `SpawnFromOtherEmitter`
`rangevector` | `SpawnedVelocityScaleRange`
`range` | `SphereRadiusRange`
`vector` | `SpinCCWorCW`
`bool` | `SpinParticles`
`rangevector` | `SpinsPerSecondRange`
`vector` | `StartLocationOffset`
`rangevector` | `StartLocationRange`
`EParticleStartLocationShape` | `StartLocationShape`
`range` | `StartMassRange`
`rangevector` | `StartSizeRange`
`rangevector` | `StartSpinRange`
`rangevector` | `StartVelocityRange`
`int` | `SubdivisionEnd`
`array` | `SubdivisionScale`
`int` | `SubdivisionStart`
`bool` | `SymmetryU`
`bool` | `SymmetryV`
`Texture` | `Texture`
`int` | `TextureUSubdivisions`
`int` | `TextureVSubdivisions`
`float` | `TimeTillReset` used to keep track of fractional PPTick
`bool` | `UniformSize`
`bool` | `UseCollision`
`bool` | `UseCollisionPlanes`
`bool` | `UseColorScale`
`bool` | `UseRandomSubdivision`
`bool` | `UseRegularSizeScale`
`EParticleRotationSource` | `UseRotationFrom`
`bool` | `UseSizeScale`
`bool` | `UseSpawnedVelocityScale`
`rangevector` | `VelocityLossRange`
`float` | `WarmupTicksPerSecond`

Function Summary
`void` | `SetMaxParticles(int NewMaxParticles)`
`void` | `SpawnParticle(int Amount)`

Source Code

    00001	//=============================================================================
    00002	// ParticleEmitter: Base class for sub- emitters.
    00003	//
    00004	// make sure to keep structs in sync in UnParticleSystem.h
    00005	//=============================================================================
    00006
    00007	class ParticleEmitter extends Object
    00008		abstract
    00009		editinlinenew
    00010		native;
    00011
    00012	enum EBlendMode
    00013	{
    00014		BM_MODULATE,
    00015		BM_MODULATE2X,
    00016		BM_MODULATE4X,
    00017		BM_ADD,
    00018		BM_ADDSIGNED,
    00019		BM_ADDSIGNED2X,
    00020		BM_SUBTRACT,
    00021		BM_ADDSMOOTH,
    00022		BM_BLENDDIFFUSEALPHA,
    00023		BM_BLENDTEXTUREALPHA,
    00024		BM_BLENDFACTORALPHA,
    00025		BM_BLENDTEXTUREALPHAPM,
    00026		BM_BLENDCURRENTALPHA,
    00027		BM_PREMODULATE,
    00028		BM_MODULATEALPHA_ADDCOLOR,
    00029		BM_MODULATEINVALPHA_ADDCOLOR,
    00030		BM_MODULATEINVCOLOR_ADDALPHA,
    00031		BM_HACK
    00032	};
    00033
    00034	enum EParticleDrawStyle
    00035	{
    00036		PTDS_Regular,
    00037		PTDS_AlphaBlend,
    00038		PTDS_Modulated,
    00039		PTDS_Translucent,
    00040		PTDS_AlphaModulate_MightNotFogCorrectly,
    00041		PTDS_Darken,
    00042		PTDS_Brighten,
    00043		PTDS_Masked
    00044	};
    00045
    00046	enum EParticleCoordinateSystem
    00047	{
    00048		PTCS_Independent,
    00049		PTCS_Relative,
    00050		PTCS_Absolute
    00051	};
    00052
    00053	enum EParticleRotationSource
    00054	{
    00055		PTRS_None,
    00056		PTRS_Actor,
    00057		PTRS_Offset,
    00058		PTRS_Normal
    00059	};
    00060
    00061	enum EParticleVelocityDirection
    00062	{
    00063		PTVD_None,
    00064		PTVD_StartPositionAndOwner,
    00065		PTVD_OwnerAndStartPosition
    00066	};
    00067
    00068	enum EParticleStartLocationShape
    00069	{
    00070		PTLS_Box,
    00071		PTLS_Sphere
    00072	};
    00073
    00074	enum EParticleEffectAxis
    00075	{
    00076		PTEA_NegativeX,
    00077		PTEA_PositiveZ
    00078	};
    00079
    00080	struct ParticleTimeScale
    00081	{
    00082		var () float	RelativeTime;		// always in range [0..1]
    00083		var () float	RelativeSize;
    00084	};
    00085
    00086	struct ParticleColorScale
    00087	{
    00088		var () float	RelativeTime;		// always in range [0..1]
    00089		var () color	Color;
    00090	};
    00091
    00092
    00093	struct Particle
    00094	{
    00095		var vector	Location;
    00096		var vector	OldLocation;
    00097		var vector	Velocity;
    00098		var vector	StartSize;
    00099		var vector	SpinsPerSecond;
    00100		var vector	StartSpin;
    00101		var vector	Size;
    00102		var vector  StartLocation;
    00103		var rotator Rotation;
    00104		var color   Color;
    00105		var float	Time;
    00106		var float	MaxLifetime;
    00107		var float	Mass;
    00108		var int		HitCount;
    00109		var int		Flags;
    00110		var int		Subdivision;
    00111	};
    00112
    00113
    00114	var (Acceleration)	vector				Acceleration;
    00115
    00116	var (Collision)		bool				UseCollision;
    00117	var (Collision)		bool				UseCollisionPlanes;
    00118	var	(Collision)		bool				UseMaxCollisions;
    00119	var (Collision)		bool				UseSpawnedVelocityScale;
    00120
    00121	var (Color)			bool				UseColorScale;
    00122
    00123	var (Fading)		bool				FadeOut;
    00124	var (Fading)		bool				FadeIn;
    00125
    00126	var (General)		bool				ResetAfterChange;
    00127
    00128	var (Local)			bool				RespawnDeadParticles;
    00129	var (Local)			bool				AutoDestroy;
    00130	var (Local)			bool				AutoReset;
    00131	var (Local)			bool				Disabled;
    00132	var (Local)			bool				DisableFogging;
    00133
    00134	var (Rotation)		bool				SpinParticles;
    00135	var (Rotation)		bool				DampRotation;
    00136
    00137	var (Size)			bool				UseSizeScale;
    00138	var (Size)			bool				UseRegularSizeScale;
    00139	var (Size)			bool				UniformSize;
    00140
    00141	var (Spawning)		bool				AutomaticInitialSpawning;
    00142
    00143	var (Texture)		bool				BlendBetweenSubdivisions;
    00144	var	(Texture)		bool				UseSubdivisionScale;
    00145	var (Texture)		bool				UseRandomSubdivision;
    00146	var (Texture)		bool				NoSynchroAnim;
    00147	var (Texture)		bool				OnceTextureAnim;
    00148	var (Texture)		bool				SymmetryU;
    00149	var (Texture)		bool				SymmetryV;
    00150	var (Texture)		bool				RandomSymmetryU;
    00151	var (Texture)		bool				RandomSymmetryV;
    00152
    00153	var					bool				Initialized;
    00154	var 				bool				Inactive;
    00155	var					bool				RealDisableFogging;
    00156	var 				bool				AllParticlesDead;
    00157	var					bool				WarmedUp;
    00158
    00159	var (Collision)		vector				ExtentMultiplier;
    00160	var (Collision)		rangevector			DampingFactorRange;
    00161	var (Collision)		array<plane>		CollisionPlanes;
    00162	var (Collision)		range				MaxCollisions;
    00163	var (Collision)		int					SpawnFromOtherEmitter;
    00164	var (Collision)		int					SpawnAmount;
    00165	var (Collision)		rangevector			SpawnedVelocityScaleRange;
    00166
    00167
    00168	var (Color)			array<ParticleColorScale> ColorScale;
    00169	var (Color)			float				ColorScaleRepeats;
    00170
    00171	var (Fading)		plane				FadeOutFactor;
    00172	var (Fading)		float				FadeOutStartTime;
    00173	var (Fading)		plane				FadeInFactor;
    00174	var (Fading)		float				FadeInEndTime;
    00175
    00176	var (General)		EParticleCoordinateSystem CoordinateSystem;
    00177	var (General)		const int			MaxParticles;
    00178	var (General)		EParticleEffectAxis EffectAxis;
    00179
    00180	var (Local)			range				AutoResetTimeRange;
    00181	var (Local)			string				Name;
    00182
    00183	var (Location)		vector				StartLocationOffset;
    00184	var (Location)		rangevector			StartLocationRange;
    00185	var (Location)		int					AddLocationFromOtherEmitter;
    00186	var (Location)		EParticleStartLocationShape StartLocationShape;
    00187	var (Location)		range				SphereRadiusRange;
    00188
    00189	var (Mass)			range				StartMassRange;
    00190
    00191	var (Rotation)		EParticleRotationSource	UseRotationFrom;
    00192	var (Rotation)		rotator				RotationOffset;
    00193	var (Rotation)		vector				SpinCCWorCW;
    00194	var (Rotation)		rangevector			SpinsPerSecondRange;
    00195	var (Rotation)		rangevector			StartSpinRange;
    00196	var (Rotation)		rangevector			RotationDampingFactorRange;
    00197	var (Rotation)		vector				RotationNormal;
    00198
    00199	var (Size)			array<ParticleTimeScale> SizeScale;
    00200	var (Size)			float				SizeScaleRepeats;
    00201	var (Size)			rangevector			StartSizeRange;
    00202	var (Size)			float				CenterU;
    00203	var (Size)			float				CenterV;
    00204
    00205	var (Spawning)		float				ParticlesPerSecond;
    00206	var (Spawning)		float				InitialParticlesPerSecond;
    00207
    00208	var (Texture)		EParticleDrawStyle	DrawStyle;
    00209	var (Texture)		texture				Texture;
    00210	var (Texture)		int					TextureUSubdivisions;
    00211	var (Texture)		int					TextureVSubdivisions;
    00212	var (Texture)		array<float>		SubdivisionScale;
    00213	var (Texture)		int					SubdivisionStart;
    00214	var (Texture)		int					SubdivisionEnd;
    00215
    00216	var (Tick)			float				SecondsBeforeInactive;
    00217	var (Tick)			float				MinSquaredVelocity;
    00218
    00219	var	(Time)			range				InitialTimeRange;
    00220	var (Time)			range				LifetimeRange;
    00221	var (Time)			range				InitialDelayRange;
    00222
    00223	var (Velocity)		rangevector			StartVelocityRange;
    00224	var (Velocity)		vector				MaxAbsVelocity;
    00225	var (Velocity)		rangevector			VelocityLossRange;
    00226	var (Velocity)		int					AddVelocityFromOtherEmitter;
    00227	var (Velocity)		EParticleVelocityDirection GetVelocityDirectionFrom;
    00228
    00229	var (Warmup)		float				WarmupTicksPerSecond;
    00230	var (Warmup)		float				RelativeWarmupTime;
    00231
    00232	var transient		emitter				Owner;
    00233	var transient		float				InactiveTime;
    00234	var transient		array<Particle>		Particles;
    00235	var transient		int					ParticleIndex;			// index into circular list of particles
    00236	var transient		int					ActiveParticles;		// currently active particles
    00237	var transient		float				PPSFraction;			// used to keep track of fractional PPTick
    00238
    00239	var transient		vector				RealExtentMultiplier;
    00240	var	transient		int					OtherIndex;
    00241	var transient		float				InitialDelay;
    00242	var transient		vector				GlobalOffset;
    00243	var transient		float				TimeTillReset;
    00244	var transient		int					PS2Data;
    00245
00246 var transient texture CurAnimTexture; 00247 var transient float CurAnimTime; 00248 var transient int CurLastUpdateTime[2]; 00249 00250 native function SpawnParticle( int Amount ); 00251 native function SetMaxParticles( int NewMaxParticles ); 00252 00253 defaultproperties 00254 { 00255 RespawnDeadParticles=True 00256 UseRegularSizeScale=True 00257 UniformSize=True 00258 AutomaticInitialSpawning=True 00259 ExtentMultiplier=(X=1.000000,Y=1.000000,Z=1.000000) 00260 DampingFactorRange=(X=(Min=1.000000,Max=1.000000),Y=(Min=1.000000,Max=1.000000),Z=(Min=1.000000,Max=1.000000)) 00261 SpawnFromOtherEmitter=-1 00262 FadeOutFactor=(W=1.000000,X=1.000000,Y=1.000000,Z=1.000000) 00263 FadeInFactor=(W=1.000000,X=1.000000,Y=1.000000,Z=1.000000) 00264 AddLocationFromOtherEmitter=-1 00265 StartMassRange=(Min=1.000000,Max=1.000000) 00266 SpinCCWorCW=(X=0.500000,Y=0.500000,Z=0.500000) 00267 StartSizeRange=(X=(Min=100.000000,Max=100.000000),Y=(Min=100.000000,Max=100.000000),Z=(Min=100.000000,Max=100.000000)) 00268 DrawStyle=PTDS_Translucent 00269 Texture=Texture'Engine.S_Emitter' 00270 SecondsBeforeInactive=1.000000 00271 LifetimeRange=(Min=4.000000,Max=4.000000) 00272 AddVelocityFromOtherEmitter=-1 00273 }

End Source Code