#include <AwV4.h>
Public Member Functions | |
aw_type_vector_range & | Volume () |
Determine the emitter's effective volume. | |
aw_type_vector_range & | Speed () |
Determine the emitter's speed. | |
aw_type_vector_range & | Accel () |
Determine the emitter's acceleration. | |
aw_type_vector_range & | Angle () |
Determine the emitter's starting angle. | |
aw_type_vector_range & | Spin () |
Determine the emitter's rotation. | |
aw_type_vector_range & | Size () |
Determine the emitter's size. | |
unsigned long & | ReleaseMin () |
Determine the emitter's release time. | |
unsigned long & | ReleaseMax () |
unsigned short & | ReleaseCount () |
Determine the particle release count. | |
unsigned long & | Lifespan () |
Determine the particle lifespan. | |
unsigned long & | EmitterLifespan () |
Determine the emitter's lifespan. | |
unsigned long & | FadeIn () |
Determine the particle fade-in time. | |
unsigned long & | FadeOut () |
Determine the particle fade-out time. | |
unsigned long & | ColorStart () |
Determine the particle start color. | |
unsigned long & | ColorEnd () |
Determine the particle end color. | |
float & | Opacity () |
Determine the particle opacity. | |
unsigned char & | RenderStyle () |
Determine the particle render style. | |
unsigned short & | Flags () |
Return the bitfield containing emitter options. | |
unsigned char & | Type () |
Determine the type of particles to release. | |
SimpleString & | AssetList () |
Determine the emitter's asset list, if any. | |
SimpleString & | TagName () |
Determine the emitter's tag name, if any. | |
aw_object_data_particles * | GetObjectData () |
Create an aw_object_data_particles structure. | |
ParticleEmitter () | |
Default constructor. | |
void | Assign (const aw_object_data_particles *data) |
Assign emitter data from an SDK structure. | |
unsigned int | Efficiency () const |
Determine the efficiency of an emitter. |
This class encapsulates a particle emitter. The methods return references to various fields, which may be used to update them.
For example:
float& opac = emitter.Opacity();
Will allow you to update the emitter's opacity by assigning a value to the 'opac' reference.
AwV4::ParticleEmitter::ParticleEmitter | ( | ) |
Default constructor.
Constructor which initializes the emitter wrapper class.
aw_type_vector_range& AwV4::ParticleEmitter::Volume | ( | ) | [inline] |
Determine the emitter's effective volume.
This defines the size (in meters) of the cubic area in which new particles will appear.
aw_type_vector_range& AwV4::ParticleEmitter::Speed | ( | ) | [inline] |
Determine the emitter's speed.
This defines how fast (in meters per second) particles will be moving at the time of their creation.
aw_type_vector_range& AwV4::ParticleEmitter::Accel | ( | ) | [inline] |
Determine the emitter's acceleration.
This defines how fast (in meters per second) particles will accelerate.
aw_type_vector_range& AwV4::ParticleEmitter::Angle | ( | ) | [inline] |
Determine the emitter's starting angle.
This defines the position (in degrees of rotation) of each particle.
aw_type_vector_range& AwV4::ParticleEmitter::Spin | ( | ) | [inline] |
Determine the emitter's rotation.
This defines the rotation (in degrees of rotation per second) of each particle.
aw_type_vector_range& AwV4::ParticleEmitter::Size | ( | ) | [inline] |
Determine the emitter's size.
This defines how big (in meters) each particle is. These numbers have different effects based on what type of particle this is.
unsigned long& AwV4::ParticleEmitter::ReleaseMin | ( | ) | [inline] |
Determine the emitter's release time.
This defines how often (in milliseconds) new particles will appear. If this range is set to 500 to 3000, then particles will be released at least once every three seconds, but not more often than once every half second. The browser will emit particles at random intervals between these two values.
unsigned long& AwV4::ParticleEmitter::ReleaseMax | ( | ) | [inline] |
unsigned short& AwV4::ParticleEmitter::ReleaseCount | ( | ) | [inline] |
Determine the particle release count.
This defines how many particles will be released at one time.
unsigned long& AwV4::ParticleEmitter::Lifespan | ( | ) | [inline] |
Determine the particle lifespan.
This defines how long (in milliseconds) each particle will last once it is released.
unsigned long& AwV4::ParticleEmitter::EmitterLifespan | ( | ) | [inline] |
Determine the emitter's lifespan.
This defines how long (in milliseconds) this emitter will release particles.
unsigned long& AwV4::ParticleEmitter::FadeIn | ( | ) | [inline] |
Determine the particle fade-in time.
This defines how long (in milliseconds) it will take for each particle to "fade in" to view.
unsigned long& AwV4::ParticleEmitter::FadeOut | ( | ) | [inline] |
Determine the particle fade-out time.
This defines how long (in milliseconds) it will take for each particle to "fade out" of view.
unsigned long& AwV4::ParticleEmitter::ColorStart | ( | ) | [inline] |
Determine the particle start color.
If "Interpolate" is enabled, then particles will begin at this color and fade to "Color End". If it is not enabled, then particles will randomly choose a color between "Color Start" and "Color End".
unsigned long& AwV4::ParticleEmitter::ColorEnd | ( | ) | [inline] |
Determine the particle end color.
If "Interpolate" is enabled, then particles will begin at "Color Start" and fade to this color. If it is not enabled, then particles will randomly choose a color between "Color Start" and "Color End".
float& AwV4::ParticleEmitter::Opacity | ( | ) | [inline] |
Determine the particle opacity.
This is a value between 0.00 and 1.00 that defines how opaque the particles will be.
unsigned char& AwV4::ParticleEmitter::RenderStyle | ( | ) | [inline] |
Determine the particle render style.
This defines how the particle will be blended with the scene.
1) AW_PARTICLE_DRAW_NORMAL: The texture is simply drawn to the scene with no special effects.
2) AW_PARTICLE_DRAW_BRIGHT: The texture is drawn to the scene, blending with whatever is already visible so as to brighten the scene.
3) AW_PARTICLE_DRAW_GLOW: The texture is added to the scene, making it significantly brighter.
unsigned short& AwV4::ParticleEmitter::Flags | ( | ) | [inline] |
Return the bitfield containing emitter options.
This value is a bitfield which contains all of the active emitter options.
Emitter flags are defined in AW_PARTICLE_FLAGS. Examples follow.
To determine if the 'AW_PARTICLE_FLAG_INTERPOLATE' flag is set:
bool bInterpolate = (emitter.Flags() & AW_PARTICLE_FLAG_INTERPOLATE)? true : false;
To remove a flag:
unsigned short& opts = emitter.Flags(); opts &= ~AW_PARTICLE_FLAG_INTERPOLATE;
To add a flag:
unsigned short& opts = emitter.Flags(); opts |= AW_PARTICLE_FLAG_INTERPOLATE;
unsigned char& AwV4::ParticleEmitter::Type | ( | ) | [inline] |
Determine the type of particles to release.
This controls what kind of particle will be released. There are four types:
1) AW_PARTICLE_TYPE_SPRITE 2) AW_PARTICLE_TYPE_FACER 3) AW_PARTICLE_TYPE_FLAT 4) AW_PARTICLE_TYPE_OBJECT
SimpleString& AwV4::ParticleEmitter::AssetList | ( | ) | [inline] |
Determine the emitter's asset list, if any.
This defines what textures or models will be used to make the particles. This may be a list of textures (seperated by commas) for sprites, facers, and flat panels, or a list of model names (seperated by commas) for model type particles.
SimpleString& AwV4::ParticleEmitter::TagName | ( | ) | [inline] |
Determine the emitter's tag name, if any.
This assigns a name to the emitter. If this field is NOT empty, the emitter will NOT start when it comes into view, but will need to be triggered by another object.
aw_object_data_particles * AwV4::ParticleEmitter::GetObjectData | ( | ) |
Create an aw_object_data_particles structure.
Creates and returns an aw_object_data_particles structure using the data from this wrapper class.
Note that it is up to the caller to appropriately use free() to delete the memory associated with this structure.
void AwV4::ParticleEmitter::Assign | ( | const aw_object_data_particles * | data | ) |
Assign emitter data from an SDK structure.
Constructor which initializes the zone wrapper class from an existing aw_object_data_particles structure.
unsigned int AwV4::ParticleEmitter::Efficiency | ( | ) | const [inline] |
Determine the efficiency of an emitter.
Calculates an efficiency rating for this emitter. For more info, see: http://www.swcity.net/academy/index.php?n=Main.ParticleEmitterOptimization