Main   Class List   Namespace List   Wiki

Special Effects
[Game]

Classes responsible for special effect objects, such as Explosion, Debris, Particles, etc. More...

Classes

class  Debris
 Base debris class. Uses the DebrisData datablock for properties of individual debris objects. More...
class  DebrisData
 Stores properties for an individual debris type. More...
class  DecalData
 A datablock describing an individual decal. More...
class  DecalManager
 All decals are managed by the decal manager. Provides a few global variables for managing the number of decals that are visible at any one time and the lifetime of the decal. More...
class  Explosion
 The emitter for an explosion, whose properties are defined in an ExplosionData object. More...
class  ExplosionData
 The data on what an explosion should look like. Definesa particle data, debris data, affects the lighting conditions in the region of the explosion, and shakes the camera. More...
class  ForestWindEmitter
 Object responsible for simulating wind in a level. More...
class  LightAnimData
 A datablock which defines and performs light animation, such as rotation, brightness fade, and colorization. More...
class  Lightning
 An individual lightning bolt, created from a LightningData object. More...
class  LightningData
 An emitter for Lightning objects. More...
class  LightningStrikeEvent
 A lightning bolt strike, called from strikeRandomPoint or strikeObject method on Lightning. More...
class  ParticleData
 Contains information for how specific particles should look and react including particle colors, particle imagemap, acceleration value for individual particles and spin information. More...
class  ParticleEmitter
 This object is responsible for all particle emissions. More...
class  ParticleEmitterData
 Acts as the physical point in space in white Particles are created from. Also manages how to fire particles, including velocity, offset and length of firing (or 'ejection'). More...
class  ParticleEmitterNode
 Manages timing update information for the assigned particleEmitter. Particles can be assigned to this emitter through the method setEmitterDataBlock(particleEmitterDatablock). More...
class  ParticleEmitterNodeData
 Contains the timeMuliplier information to be assigned to a ParticleEmitterNode. The time multiplayer value for the ParticleEmitterNodeData can be set with nodeData.timeMultiple = value;. More...
class  Precipitation
 Defines a precipitation based storm (IE: rain, snow, etc.). More...
class  PrecipitationData
 Defines the droplets used in a storm (IE: raindrops, snowflakes, etc.). More...
class  Splash
 Manages the ring used for a Splash effect. More...
class  SplashData
 Acts as the physical point in space in white a Splash is created from. More...

Enumerations

enum  ParticleBlendStyle {
  NORMAL,
  ADDITIVE,
  SUBTRACTIVE,
  PREMULTALPHA
}
 

The type of visual blending style to apply to the particles.

More...

Functions

float calcExplosionCoverage (Point3F pos=Point3F(0.0f, 0.0f, 0.0f), int id=NULL, int covMask=NULL)
 Calculates how much an explosion effects a specific object. Use this to determine.
int decalManagerAddDecal (Point3F position, Point3F normal, float rot, float scale, DecalData decalData, bool isImmortal=false)
 Adds a new decal to the decal manager.
void decalManagerClear ()
 Removes all decals currently loaded in the decalManager.
bool decalManagerDirty ()
 Returns if the decal manager has unsaved modifications.
bool decalManagerLoad (string fileName)
 Loads the decals from the entered filename.
bool decalManagerRemoveDecal (int decalID)
 Remove specified decal from the scene.
void decalManagerSave (String decalSaveFile="")
 Saves the decals for the active mission in the entered filename.

Variables

bool $Decals::debugRender
 If true, the decal spheres will be visualized when in the editor.
bool $pref::Decals::enabled
 Whether decals are currently enabled or not.
float $pref::Decals::lifeTimeScale
 Lifetime that decals will last after being created in the world.
bool $Decals::poolBuffers
 If true, will merge all PrimitiveBuffers and VertexBuffers into a pair of pools before clearing them at the end of a frame.
float $Decals::sphereDistanceTolerance
 The distance at which the decal system will start breaking up decal spheres when adding new decals.
float $Decals::sphereRadiusTolerance
 The radius beyond which the decal system will start breaking up decal spheres when adding new decals.

Detailed Description

Classes responsible for special effect objects, such as Explosion, Debris, Particles, etc.


Enumeration Type Documentation

The type of visual blending style to apply to the particles.

Enumerator:
NORMAL 

No blending style.

ADDITIVE 

Adds the color of the pixel to the frame buffer with full alpha for each pixel.

SUBTRACTIVE 

Subtractive Blending. Reverses the color model, causing dark colors to have a stronger visual effect.

PREMULTALPHA 

Color blends with the colors of the imagemap rather than the alpha.


Function Documentation

float calcExplosionCoverage ( Point3F  pos = Point3F(0.0f, 0.0f, 0.0f),
int  id = NULL,
int  covMask = NULL 
)

Calculates how much an explosion effects a specific object. Use this to determine.

damage values to objects based on their distance from the explosion's center point.

Example:
// Get the position of an explosion.
%position = ExplosionData.getPosition();

// Set a list of TypeMasks (defined in gameFunctioncs.cpp), seperated by the | character.
%TypeMasks = $TypeMasks::StaticObjectType | $TypeMasks::ItemObjectType

// Call the function, and acquire the value of effect, from 0.0f - 1.0f.
%effectValue = calcExplosionCoverage(%position , %sceneObjectToEffect , %TypeMasks);
int decalManagerAddDecal ( Point3F  position,
Point3F  normal,
float  rot,
float  scale,
DecalData  decalData,
bool  isImmortal = false 
)

Adds a new decal to the decal manager.

Parameters:
position Position for new decal to be placed.
normal Up vector for the decal. Like the axel for this decal.
rot Distance for this decal to be rotated around the normal, like a tire on an axel.
scale Physical scale of new decal.
decalData DecalData Datablock to use for the new decal.
isImmortal Whether or not this decal is immortal. If immortal, it does not age and must be removed explicitly.
Returns:
Returns the ID of the new decal object or -1 on failure.
Example:
// Specify the decal position
%position = "1.0 1.0 1.0";

// Specify the up vector
%normal = "0.0 0.0 1.0";

// Specify the rotation for the decal
%rotation = "0.5";

// Specify the scale for the decal
%scale = "0.35";

// Specify the decalData datablock to use for this new decal
%decalData = "decalDatablockName";

// Specify if this decal is immortal. Immortal decals don't age and must be removed explicitly.
%immortal = "false";

// Tell the decal manager to remove all existing decals.
decalManagerAddDecal( %position, %normal, %rotation, %scale, %decalData, %immortal);
void decalManagerClear (  ) 

Removes all decals currently loaded in the decalManager.

Example:
// Tell the decal manager to remove all existing decals.
decalManagerClear();
bool decalManagerDirty (  ) 

Returns if the decal manager has unsaved modifications.

Returns:
True if the decal manager has unsaved modifications, false if everything has been saved.
Example:
// Ask the decal manager if it has unsaved modifications.
%hasUnsavedModifications = decalManagerDirty();
bool decalManagerLoad ( string  fileName  ) 

Loads the decals from the entered filename.

Parameters:
fileName Filename to load the decals from.
Returns:
True if the decal manager was able to load the requested file, false if it could not.
Example:
// Set the filename to load the decals from.
%fileName = "./missionDecals.mis.decals";
// Inform the decal manager to load the decals from the entered filename.
decalManagerLoad(%fileName);
bool decalManagerRemoveDecal ( int  decalID  ) 

Remove specified decal from the scene.

Returns:
Returns true if successful, false if decal not found.
Parameters:
decalID Entry ID of the decal to remove.
Example:
// Specify a decal ID to be removed
%decalID = 1;

// Tell the decal manager to remove the specified decal ID.
decalManagerRemoveDecal( %decalId )
void decalManagerSave ( String  decalSaveFile = ""  ) 

Saves the decals for the active mission in the entered filename.

Parameters:
decalSaveFile Filename to save the decals at.
Example:
// Set the filename to save the decals in. If no filename is set, then the decals will
   default to <activeMissionName>.mis.decals
%fileName = "./missionDecals.mis.decals";
// Inform the decal manager to save the decals for the active mission.
decalManagerSave(%fileName);

Variable Documentation

bool $Decals::debugRender

If true, the decal spheres will be visualized when in the editor.

bool $pref::Decals::enabled

Whether decals are currently enabled or not.

float $pref::Decals::lifeTimeScale

Lifetime that decals will last after being created in the world.

bool $Decals::poolBuffers

If true, will merge all PrimitiveBuffers and VertexBuffers into a pair of pools before clearing them at the end of a frame.

If false, will just clear them at the end of a frame.

float $Decals::sphereDistanceTolerance

The distance at which the decal system will start breaking up decal spheres when adding new decals.

float $Decals::sphereRadiusTolerance

The radius beyond which the decal system will start breaking up decal spheres when adding new decals.



Copyright © GarageGames, LLC. All Rights Reserved.