torque Torque Game Engine Documentation
TGE Version 1.5.2

Explosion Class Reference

#include <explosion.h>

Inheritance diagram for Explosion:

Inheritance graph
[legend]

Public Member Functions

 Explosion ()
 ~Explosion ()
void setInitialState (const Point3F &point, const Point3F &normal, const F32 fade=1.0)
bool onNewDataBlock (GameBaseData *dptr)
 Called when a new datablock is set.
void setCollideType (U32 cType)
 DECLARE_CONOBJECT (Explosion)

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Protected Member Functions

bool onAdd ()
 Called when the object is added to the sim.
void onRemove ()
 Called when the object is removed from the sim.
bool explode ()
void processTick (const Move *move)
 Processes a move event and updates object state once every 32 milliseconds.
void advanceTime (F32 dt)
 Advances simulation time for animations.
void updateEmitters (F32 dt)
void launchDebris (Point3F &axis)
void spawnSubExplosions ()
void setCurrentScale ()
bool prepRenderImage (SceneState *state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState)
 Called when the SceneGraph is ready for the registration of RenderImages.
void renderObject (SceneState *state, SceneRenderImage *image)
 Called when the object is supposed to render itself.
void prepModelView (SceneState *)
void registerLights (LightManager *lm, bool lightingScene)
 Called to register the object's lights, if any, with the LightManager.

Protected Attributes

Point3F mInitialNormal
F32 mFade
F32 mFog
bool mActive
S32 mDelayMS
F32 mRandomVal
U32 mCollideType

Private Types

typedef GameBase Parent

Private Attributes

ExplosionDatamDataBlock
TSShapeInstancemExplosionInstance
TSThreadmExplosionThread
ParticleEmittermEmitterList [ExplosionData::EC_NUM_EMITTERS]
U32 mCurrMS
U32 mEndingMS
F32 mRandAngle
LightInfo mLight

Member Typedef Documentation

typedef GameBase Explosion::Parent [private]

Reimplemented from GameBase.


Constructor & Destructor Documentation

Explosion::Explosion (  ) 

Explosion::~Explosion (  ) 


Member Function Documentation

bool Explosion::onAdd (  )  [protected, virtual]

Called when the object is added to the sim.

Reimplemented from GameBase.

void Explosion::onRemove (  )  [protected, virtual]

Called when the object is removed from the sim.

Reimplemented from GameBase.

bool Explosion::explode (  )  [protected]

void Explosion::processTick ( const Move move  )  [protected, virtual]

Processes a move event and updates object state once every 32 milliseconds.

This takes place both on the client and server, every 32 milliseconds (1 tick).

See also:
ProcessList
Parameters:
move Move event corresponding to this tick, or NULL.

Reimplemented from GameBase.

void Explosion::advanceTime ( F32  dt  )  [protected, virtual]

Advances simulation time for animations.

This is called every frame.

Parameters:
dt Time since last advance call

Reimplemented from GameBase.

void Explosion::updateEmitters ( F32  dt  )  [protected]

void Explosion::launchDebris ( Point3F axis  )  [protected]

void Explosion::spawnSubExplosions (  )  [protected]

void Explosion::setCurrentScale (  )  [protected]

bool Explosion::prepRenderImage ( SceneState state,
const U32  stateKey,
const U32  startZone,
const bool  modifyBaseZoneState 
) [protected, virtual]

Called when the SceneGraph is ready for the registration of RenderImages.

See also:
SceneState
Parameters:
state SceneState
stateKey State key of the current SceneState
startZone Base zone index
modifyBaseZoneState If true, the object needs to modify the zone state.

Reimplemented from SceneObject.

void Explosion::renderObject ( SceneState state,
SceneRenderImage image 
) [protected, virtual]

Called when the object is supposed to render itself.

Parameters:
state Current rendering state.
See also:
SceneState
Parameters:
image Image associated with this object to render.
See also:
SceneRenderImage

Reimplemented from SceneObject.

void Explosion::prepModelView ( SceneState  )  [protected]

void Explosion::registerLights ( LightManager lm,
bool  lightingScene 
) [protected, virtual]

Called to register the object's lights, if any, with the LightManager.

Parameters:
lm LightManager to put lights into.
lightingScene True if we're currently calculating lighting information.

Reimplemented from SimObject.

void Explosion::setInitialState ( const Point3F point,
const Point3F normal,
const F32  fade = 1.0 
)

bool Explosion::onNewDataBlock ( GameBaseData dptr  )  [virtual]

Called when a new datablock is set.

This allows subclasses to appropriately handle new datablocks.

See also:
setDataBlock()
Parameters:
dptr New datablock

Reimplemented from GameBase.

void Explosion::setCollideType ( U32  cType  )  [inline]

Explosion::DECLARE_CONOBJECT ( Explosion   ) 

static void Explosion::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDepricatedField(), addGroup(), endGroup()

Reimplemented from GameBase.


Field Documentation

Reimplemented from GameBase.

ParticleEmitter* Explosion::mEmitterList[ExplosionData::EC_NUM_EMITTERS] [private]

F32 Explosion::mFade [protected]

F32 Explosion::mFog [protected]

bool Explosion::mActive [protected]

S32 Explosion::mDelayMS [protected]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen