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

ParticleSystems.ParticleTemplate


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
//=============================================================================
// $Author: Aleiby $
// $Date: 5/17/02 8:28p $
// $Revision: 10 $
//=============================================================================

//------------------------------------------------------------------------------
// Name:	ParticleTemplate.uc
// Author:	Aaron R Leiby
// Date:	9 March 2000
//------------------------------------------------------------------------------
// Description:  ParticleTemplates are used to store initialization data instead 
// of Particles or ParticleGenerators.  There is a 1 to 1 relationship of 
// Particle subclasses to ParticleTemplate subclasses.  Each Particle subclass 
// must implement its own ParticleTemplate which is responsible for fully 
// intializing Particles of its associated type (also taking into account that 
// the particle it is inializing could possibly have been recycled, thus we need
// to inialize *everything* just in case).
//------------------------------------------------------------------------------
// How to use this class:
//
// + If you subclass a Particle, you also need to subclass its ParticleTemplate
//   to properly initialize all the variables you add to your subclass.
//------------------------------------------------------------------------------

class ParticleTemplate extends Object within ParticleGenerator
//	abstract
	native;

//////////////////
// Enumerations //
//////////////////

enum EDrawStyle
{
	STYLE_Translucent,
	STYLE_Modulated,
	STYLE_Normal,
	STYLE_Alpha,
	STYLE_AlphaModulate,
	STYLE_Brighten,
	STYLE_Darken,
	STYLE_Masked,
};

/////////////////////////
// Initialization data //
/////////////////////////

var() public  Range           InitialSpeed;
var() public  Range           InitialLifeSpan;
var() public  Range           StasisTime;		// Number of seconds before forces are allowed to affect a newly created particle.
var() public  Actor           LifeSpanLimitor;	// LifeSpan calculated as a function of speed and initial distance from this Actor.

////////////////////
// Selection data //
////////////////////

var() public  float           SelectionWeight;	// Part of the selection criteria.
var   private float           Frequency;		// Used internally for linear distributions.
var   private float           CumulativeFreq;	// Used internally for linear distributions.

//////////////
// Lighting //
//////////////

var(Lighting) array<Actor>    Lights;			// Add lights to use as lighting.
var(Lighting) array<Actor>    RaytracedLights;	// Add lights to use as lighting (raytraced for shadows).
var(Lighting) bool            bDynamicLit;		// Use lights marked as bLightParticles.
var(Lighting) int             MaxDynamicLights;	// Maximum number of lights to use when colorizing particles.

////////////////
// Additional //
////////////////

var() public  bool            bExternallyAffected;	// Register as affected by external forces (such as blowers).
var() public  bool            bReverseDrawOrder;	// If true will draw the particles within this template in reverse order -- that is to say from oldest to newest.
var() public  bool            bRandomDrawOrder;		// Randomly insert the new particles either at the start or the end of the list.
var() public  bool            ChangeClass;			// Dummy var for hanging drop down dialog box off of for changing this template's class.
var() public  float           DrawOrder;			// Order that this template is drawn within our containing System (be sure to hit Sort after changing this value).

////////////////////////
// Internal variables //
////////////////////////

var   const   string          ParticleType;		// Type of particle this template is responsible for initializing.

var native Array<ParticleHandle> ParticleList;	// List of all currently active particles generated by this generator.
												// We can safely assume that all particles in this like will be of
												// class ParticleType.
var() const/*editconst*/
      public  Box             Extents;			// Bounding box.

var() private editinline Array<Force>    AffectingForces;	// Templates that this Force affects the particles of.

var const int HardwareLightsUsed;			// Number of Hardware Lights used, so we know how many to un-set

var private const native noexport int ParticleClass;	// internal particleClass cache (as specified by ParticleType string).

defaultproperties
{
	InitialLifeSpan=(A=1.000000,B=1.000000)
	SelectionWeight=1.000000
	MaxDynamicLights=8
	DrawOrder=1.000000
	ParticleType="Particle"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: sk 3-1-2016 10:38:40.000 - Creation time: sk 3-1-2016 10:48:40.789 - Created with UnCodeX