Item

Engine/source/T3D/item.h

More...

Classes:

Protected Types

enum
MaskBits {
  HiddenMask = Parent::NextFreeMask
  ThrowSrcMask = Parent::NextFreeMask << 1
  PositionMask = Parent::NextFreeMask << 2
  RotationMask = Parent::NextFreeMask << 3
  NextFreeMask = Parent::NextFreeMask << 4
}
Parent 

Public Types

enum
LightType {
  NoLight = 0
  ConstantLight 
  PulsingLight 
  NumLightTypes 
}

Protected Static Attributes

Protected Functions

Advances simulation time for animations.

DECLARE_CALLBACK(void , onEnterLiquid , (const char *objID, F32 waterCoverage, const char *liquidType) )
DECLARE_CALLBACK(void , onLeaveLiquid , (const char *objID, const char *liquidType) )
DECLARE_CALLBACK(void , onStickyCollision , (const char *objID) )

Public Functions

Item()

Applies an impulse force to this object.

Gets the velocity of the object.

Interpolates between tick events.

bool
bool
bool
bool

Called when the object is added to the sim.

bool
onNewDataBlock(GameBaseData * dptr, bool reload)

Called when a new datablock is set.

Called when the object is removed from the sim.

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

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

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

registerLights(LightManager * lightManager, bool lightingScene)

Sets the Object -> World transform.

Sets the velocity of this object.

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

Private Functions

buildConvex(const Box3F & box, Convex * convex)

Builds a convex hull for this object.

bool
buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)

Builds a list of polygons which intersect a bounding volume.

Called when a SimObject is deleted.

Private Static Functions

bool
_setRotate(void * object, const char * index, const char * data)
bool
_setStatic(void * object, const char * index, const char * data)

Public Static Functions

Detailed Description

Protected Types

MaskBits

Enumerator

HiddenMask = Parent::NextFreeMask
ThrowSrcMask = Parent::NextFreeMask << 1
PositionMask = Parent::NextFreeMask << 2
RotationMask = Parent::NextFreeMask << 3
NextFreeMask = Parent::NextFreeMask << 4
typedef ShapeBase Parent 

Public Types

LightType

Enumerator

NoLight = 0
ConstantLight
PulsingLight
NumLightTypes

Protected Attributes

bool mAtRest 
S32 mAtRestCounter 
ShapeBase * mCollisionObject 
U32 mCollisionTimeout 
ItemData * mDataBlock 
StateDelta mDelta 
bool mInLiquid 
PhysicsBody * mPhysicsRep 
bool mRotate 
bool mStatic 
bool mSubclassItemHandlesScene 

A subclass of Item will handle all of the adding to the scene.

VectorF mVelocity 

Protected Static Attributes

const S32 csmAtRestTimer 

Private Attributes

OrthoBoxConvex mConvex 
S32 mDropTime 
LightInfo * mLight 
Box3F mWorkingQueryBox 

Public Attributes

Point3F mStickyCollisionNormal 
Point3F mStickyCollisionPos 

Protected Functions

_updatePhysics()

advanceTime(F32 dt)

Reimplemented from: ProcessObject

Reimplemented by: ProximityMine, AITurretShape, TurretShape

DECLARE_CALLBACK(void , onEnterLiquid , (const char *objID, F32 waterCoverage, const char *liquidType) )

DECLARE_CALLBACK(void , onLeaveLiquid , (const char *objID, const char *liquidType) )

DECLARE_CALLBACK(void , onStickyCollision , (const char *objID) )

prepRenderImage(SceneRenderState * state)

Reimplemented from: ShapeBase

Reimplemented by: ProximityMine, TurretShape

Public Functions

Item()

~Item()

applyImpulse(const Point3F & pos, const VectorF & vec)

Reimplemented from: ShapeBase

DECLARE_CONOBJECT(Item )

getCollisionObject()

getVelocity()

Reimplemented from: SceneObject

interpolateTick(F32 delta)

Reimplemented from: GameBase

Reimplemented by: TurretShape

isAtRest()

isRotating()

isStatic()

onAdd()

Reimplemented from: GameBase

Reimplemented by: ProximityMine, AITurretShape, TurretShape

onNewDataBlock(GameBaseData * dptr, bool reload)

Reimplemented from: GameBase

Reimplemented by: ProximityMine, AITurretShape, TurretShape

onRemove()

Reimplemented from: GameBase

Reimplemented by: ProximityMine, AITurretShape, TurretShape

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Reimplemented from: GameBase

Reimplemented by: ProximityMine, AITurretShape, TurretShape

processTick(const Move * move)

Reimplemented from: GameBase

Reimplemented by: ProximityMine, AITurretShape, TurretShape

registerLights(LightManager * lightManager, bool lightingScene)

setCollisionTimeout(ShapeBase * obj)

setTransform(const MatrixF & mat)

Reimplemented from: SceneObject

Reimplemented by: ProximityMine, AITurretShape, TurretShape

setVelocity(const VectorF & vel)

Reimplemented from: ShapeBase

unpackUpdate(NetConnection * conn, BitStream * stream)

Reimplemented from: GameBase

Reimplemented by: ProximityMine, AITurretShape, TurretShape

Private Functions

buildConvex(const Box3F & box, Convex * convex)

Reimplemented from: SceneObject

buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)

Reimplemented from: SceneObject

onDeleteNotify(SimObject * object)

Reimplemented from: ShapeBase

updatePos(const U32 mask, const F32 dt)

updateVelocity(const F32 dt)

updateWorkingCollisionSet(const U32 mask, const F32 dt)

Private Static Functions

_setRotate(void * object, const char * index, const char * data)

_setStatic(void * object, const char * index, const char * data)

Public Static Functions

consoleInit()

initPersistFields()