Debris

Engine/source/T3D/debris.h

More...

Private Types

Parent 

Private Functions

bool
bounce(const Point3F & nextPos, F32 dt)

Bounce the debris - returns true if debris bounces.

computeNewState(Point3F & newPos, Point3F & newVel, F32 dt)

Compute state of debris as if it hasn't collided with anything.

Protected Functions

Advances simulation time for animations.

bool

Called when the object is added to the sim.

Called when the object is removed from the sim.

Called when the SceneManager is ready for the registration of render instances.

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

Public Functions

init(const Point3F & position, const Point3F & velocity)
bool
onNewDataBlock(GameBaseData * dptr, bool reload)

Called when a new datablock is set.

setLifetime(F32 lifetime)

Sets the velocity of the object.

Public Static Functions

Detailed Description

Private Types

typedef GameBase Parent 

Private Attributes

DebrisData * mDataBlock 
F32 mElapsedTime 
F32 mElasticity 
SimObjectPtr< ParticleEmitter > mEmitterList [DebrisData::DDC_NUM_EMITTERS]
F32 mFriction 
MatrixF mInitialTrans 
Point3F mLastPos 
F32 mLifetime 
S32 mNumBounces 
TSPartInstance * mPart 
F32 mRadius 
Point3F mRotAngles 
TSShapeInstance * mShape 
F32 mSize 
bool mStatic 
Point3F mVelocity 
F32 mXRotSpeed 
F32 mZRotSpeed 
S32 ss_index 
SimObject * ss_object 

Private Functions

bounce(const Point3F & nextPos, F32 dt)

Bounce the debris - returns true if debris bounces.

computeNewState(Point3F & newPos, Point3F & newVel, F32 dt)

Compute state of debris as if it hasn't collided with anything.

explode()

rotate(F32 dt)

Protected Functions

advanceTime(F32 dt)

Reimplemented from: ProcessObject

onAdd()

Reimplemented from: SceneObject

onRemove()

Reimplemented from: SceneObject

prepBatchRender(SceneRenderState * state)

prepRenderImage(SceneRenderState * state)

Reimplemented from: SceneObject

processTick(const Move * move)

Reimplemented from: ProcessObject

updateEmitters(Point3F & pos, Point3F & vel, U32 ms)

Public Functions

Debris()

~Debris()

DECLARE_CONOBJECT(Debris )

init(const Point3F & position, const Point3F & velocity)

onNewDataBlock(GameBaseData * dptr, bool reload)

Reimplemented from: GameBase

setLifetime(F32 lifetime)

setPartInstance(TSPartInstance * part)

setRotAngles(const Point3F & angles)

setSize(F32 size)

setSubstitutionData(SimObject * obj, S32 idx)

setVelocity(const Point3F & v)

Reimplemented from: SceneObject

Public Static Functions

initPersistFields()