StaticShape Class Reference

#include <staticShape.h>

Inheritance diagram for StaticShape:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 DECLARE_CONOBJECT (StaticShape)
 StaticShape ()
 ~StaticShape ()
bool onAdd ()
 Called when the object is added to the sim.
void onRemove ()
 Called when the object is removed from the sim.
bool onNewDataBlock (GameBaseData *dptr)
 Called when a new datablock is set.
void processTick (const Move *move)
 Processes a move event and updates object state once every 32 milliseconds.
void interpolateTick (F32 delta)
 Interpolates between tick events.
void setTransform (const MatrixF &mat)
 Sets the Object -> World transform.
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.
void setPowered (bool power)
bool isPowered ()

Static Public Member Functions

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

Protected Types

 PositionMask = Parent::NextFreeMask
 NextFreeMask = Parent::NextFreeMask << 1
enum  MaskBits {
  PositionMask = Parent::NextFreeMask,
  NextFreeMask = Parent::NextFreeMask << 1
}

Private Types

typedef ShapeBase Parent

Private Member Functions

void onUnmount (ShapeBase *obj, S32 node)

Private Attributes

StaticShapeDatamDataBlock
 Datablock.
bool mPowered

Member Typedef Documentation

typedef ShapeBase StaticShape::Parent [private]

Reimplemented from ShapeBase.


Member Enumeration Documentation

enum StaticShape::MaskBits [protected]

Enumerator:
PositionMask 
NextFreeMask 


Constructor & Destructor Documentation

StaticShape::StaticShape (  ) 

StaticShape::~StaticShape (  ) 


Member Function Documentation

void StaticShape::onUnmount ( ShapeBase obj,
S32  node 
) [private, virtual]

Reimplemented from ShapeBase.

StaticShape::DECLARE_CONOBJECT ( StaticShape   ) 

bool StaticShape::onAdd (  )  [virtual]

Called when the object is added to the sim.

Reimplemented from ShapeBase.

void StaticShape::onRemove (  )  [virtual]

Called when the object is removed from the sim.

Reimplemented from ShapeBase.

bool StaticShape::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 ShapeBase.

void StaticShape::processTick ( const Move move  )  [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 ShapeBase.

void StaticShape::interpolateTick ( F32  delta  )  [virtual]

Interpolates between tick events.

This takes place on the CLIENT ONLY.

Parameters:
delta Time since last call to interpolate

Reimplemented from GameBase.

void StaticShape::setTransform ( const MatrixF mat  )  [virtual]

Sets the Object -> World transform.

Parameters:
mat New transform matrix

Reimplemented from SceneObject.

U32 StaticShape::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 ShapeBase.

void StaticShape::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 ShapeBase.

void StaticShape::setPowered ( bool  power  )  [inline]

bool StaticShape::isPowered (  )  [inline]

static void StaticShape::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

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

Reimplemented from GameBase.


Member Data Documentation

Datablock.

Reimplemented from ShapeBase.