torque Torque Game Engine Documentation
TGE Version 1.5.2

Splash Class Reference

#include <splash.h>

Inheritance diagram for Splash:

Inheritance graph
[legend]

Public Member Functions

 Splash ()
 ~Splash ()
void setInitialState (const Point3F &point, const Point3F &normal, const F32 fade=1.0)
U32 packUpdate (NetConnection *conn, U32 mask, BitStream *stream)
 Instructs this object to pack its state for transfer over the network.
void unpackUpdate (NetConnection *conn, BitStream *stream)
 Instructs this object to read state data previously packed with packUpdate.
bool onNewDataBlock (GameBaseData *dptr)
 Called when a new datablock is set.
 DECLARE_CONOBJECT (Splash)

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.
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 updateWave (F32 dt)
void updateColor ()
SplashRing createRing ()
void updateRings (F32 dt)
void updateRing (SplashRing *ring, F32 dt)
void emitRings (F32 dt)
void render ()
void renderSegment (SplashRing &top, SplashRing &bottom)
void spawnExplosion ()
bool prepRenderImage (SceneState *state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState=false)
 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.

Protected Attributes

Point3F mInitialPosition
Point3F mInitialNormal
F32 mFade
F32 mFog
bool mActive
S32 mDelayMS

Private Types

typedef GameBase Parent

Private Attributes

SplashDatamDataBlock
ParticleEmittermEmitterList [SplashData::NUM_EMITTERS]
LList< SplashRingringList
U32 mCurrMS
U32 mEndingMS
F32 mRandAngle
F32 mRadius
F32 mVelocity
F32 mHeight
ColorF mColor
F32 mTimeSinceLastRing
bool mDead
F32 mElapsedTime

Member Typedef Documentation

typedef GameBase Splash::Parent [private]

Reimplemented from GameBase.


Constructor & Destructor Documentation

Splash::Splash (  ) 

Splash::~Splash (  ) 


Member Function Documentation

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

Called when the object is added to the sim.

Reimplemented from GameBase.

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

Called when the object is removed from the sim.

Reimplemented from GameBase.

void Splash::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 Splash::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 Splash::updateEmitters ( F32  dt  )  [protected]

void Splash::updateWave ( F32  dt  )  [protected]

void Splash::updateColor (  )  [protected]

SplashRing Splash::createRing (  )  [protected]

void Splash::updateRings ( F32  dt  )  [protected]

void Splash::updateRing ( SplashRing ring,
F32  dt 
) [protected]

void Splash::emitRings ( F32  dt  )  [protected]

void Splash::render (  )  [protected]

void Splash::renderSegment ( SplashRing top,
SplashRing bottom 
) [protected]

void Splash::spawnExplosion (  )  [protected]

bool Splash::prepRenderImage ( SceneState state,
const U32  stateKey,
const U32  startZone,
const bool  modifyBaseZoneState = false 
) [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 Splash::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 Splash::setInitialState ( const Point3F point,
const Point3F normal,
const F32  fade = 1.0 
)

U32 Splash::packUpdate ( NetConnection conn,
U32  mask,
BitStream stream 
) [virtual]

Instructs this object to pack its state for transfer over the network.

Parameters:
conn Net connection being used
mask Mask indicating fields to transmit.
stream Bitstream to pack data to
Returns:
Any bits which were not dealt with. The value is stored by the networking system. Don't set bits you weren't passed.

Reimplemented from GameBase.

void Splash::unpackUpdate ( NetConnection conn,
BitStream stream 
) [virtual]

Instructs this object to read state data previously packed with packUpdate.

Parameters:
conn Net connection being used
stream stream to read from

Reimplemented from GameBase.

bool Splash::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.

Splash::DECLARE_CONOBJECT ( Splash   ) 


Field Documentation

Reimplemented from GameBase.

ParticleEmitter* Splash::mEmitterList[SplashData::NUM_EMITTERS] [private]

U32 Splash::mCurrMS [private]

F32 Splash::mRadius [private]

F32 Splash::mHeight [private]

bool Splash::mDead [private]

F32 Splash::mFade [protected]

F32 Splash::mFog [protected]

bool Splash::mActive [protected]

S32 Splash::mDelayMS [protected]




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