Debris Class Reference#include <debris.h>
Inheritance diagram for Debris:
[legend]
|
Public Member Functions |
| | Debris () |
| | ~Debris () |
| bool | onNewDataBlock (GameBaseData *dptr) |
| | Called when a new datablock is set.
|
| void | init (const Point3F &position, const Point3F &velocity) |
| void | setLifetime (F32 lifetime) |
| void | setPartInstance (TSPartInstance *part) |
| void | setSize (F32 size) |
| void | setVelocity (const Point3F &vel) |
| | Sets the velocity of the object.
|
| void | setRotAngles (const Point3F &angles) |
| | DECLARE_CONOBJECT (Debris) |
Static Public Member Functions |
| static void | initPersistFields () |
| | Register dynamic fields in a subclass of ConsoleObject.
|
Protected Member Functions |
| virtual void | processTick (const Move *move) |
| | Processes a move event and updates object state once every 32 milliseconds.
|
| virtual void | advanceTime (F32 dt) |
| | Advances simulation time for animations.
|
| 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.
|
| bool | onAdd () |
| | Called when the object is added to the sim.
|
| void | onRemove () |
| | Called when the object is removed from the sim.
|
| void | updateEmitters (Point3F &pos, Point3F &vel, U32 ms) |
Private Types |
| typedef GameBase | Parent |
Private Member Functions |
| bool | bounce (const Point3F &nextPos, F32 dt) |
| void | computeNewState (Point3F &newPos, Point3F &newVel, F32 dt) |
| void | explode () |
| void | render2D () |
| void | rotate (F32 dt) |
Private Attributes |
| S32 | mNumBounces |
| F32 | mSize |
| Point3F | mLastPos |
| Point3F | mVelocity |
| F32 | mLifetime |
| DebrisData * | mDataBlock |
| F32 | mElapsedTime |
| TSShapeInstance * | mShape |
| TSPartInstance * | mPart |
| MatrixF | mInitialTrans |
| F32 | mXRotSpeed |
| F32 | mZRotSpeed |
| Point3F | mRotAngles |
| F32 | mRadius |
| bool | mStatic |
| F32 | mElasticity |
| F32 | mFriction |
| ParticleEmitter * | mEmitterList [DebrisData::DDC_NUM_EMITTERS] |
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
| bool Debris::bounce |
( |
const Point3F & |
nextPos, |
|
|
F32 |
dt | |
|
) |
| | [private] |
| void Debris::explode |
( |
|
) |
[private] |
| void Debris::render2D |
( |
|
) |
[private] |
| void Debris::rotate |
( |
F32 |
dt |
) |
[private] |
| virtual void Debris::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.
| virtual void Debris::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.
| bool Debris::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.
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.
| bool Debris::onAdd |
( |
|
) |
[protected, virtual] |
Called when the object is added to the sim.
Reimplemented from GameBase.
| void Debris::onRemove |
( |
|
) |
[protected, virtual] |
Called when the object is removed from the sim.
Reimplemented from GameBase.
| static void Debris::initPersistFields |
( |
|
) |
[static] |
| bool Debris::onNewDataBlock |
( |
GameBaseData * |
dptr |
) |
[virtual] |
Called when a new datablock is set.
This allows subclasses to appropriately handle new datablocks.
- See also:
- setDataBlock()
- Parameters:
-
Reimplemented from GameBase.
| void Debris::setLifetime |
( |
F32 |
lifetime |
) |
[inline] |
| void Debris::setVelocity |
( |
const Point3F & |
v |
) |
[inline, virtual] |
Sets the velocity of the object.
- Parameters:
-
Reimplemented from SceneObject.
| void Debris::setRotAngles |
( |
const Point3F & |
angles |
) |
[inline] |
| Debris::DECLARE_CONOBJECT |
( |
Debris |
|
) |
|
Field Documentation
|