Trigger
Protected Types
TriggerUpdateBits { TransformMask = Parent::NextFreeMask << 0 PolyMask = Parent::NextFreeMask << 1 EnterCmdMask = Parent::NextFreeMask << 2 LeaveCmdMask = Parent::NextFreeMask << 3 TickCmdMask = Parent::NextFreeMask << 4 NextFreeMask = Parent::NextFreeMask << 5 }
Private Types
Parent
Private Attributes
Protected Static Attributes
bool
Private Functions
onUnmount(SceneObject * obj, S32 node)
Callback when this object is unmounted.
Protected Functions
buildConvex(const Box3F & box, Convex * convex)
Builds a convex hull for this object.
interpolateTick(F32 delta)
Interpolates between tick events.
processTick(const Move * move)
Processes a move event and updates object state once every 32 milliseconds.
bool
bool
testObject(GameBase * enter)
bool
Protected Static Functions
bool
setEnterCmd(void * object, const char * index, const char * data)
bool
setLeaveCmd(void * object, const char * index, const char * data)
bool
setTickCmd(void * object, const char * index, const char * data)
Public Functions
Trigger()
~Trigger()
bool
DECLARE_CALLBACK(void , onAdd , (U32 objectId) )
DECLARE_CALLBACK(void , onRemove , (U32 objectId) )
Called after any property of the object is changed in the world editor.
bool
onAdd()
Called when the object is added to the sim.
onDeleteNotify(SimObject * object)
Called when a SimObject is deleted.
bool
onNewDataBlock(GameBaseData * dptr, bool reload)
Called when a new datablock is set.
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Instructs this object to pack its state for transfer over the network.
prepRenderImage(SceneRenderState * state)
Called when the SceneManager is ready for the registration of render instances.
renderObject(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)
setTransform(const MatrixF & mat)
Sets the Object -> World transform.
unpackUpdate(NetConnection * conn, BitStream * stream)
Instructs this object to read state data previously packed with packUpdate.
Public Static Functions
Detailed Description
Protected Types
TriggerUpdateBits
Enumerator
- TransformMask = Parent::NextFreeMask << 0
- PolyMask = Parent::NextFreeMask << 1
- EnterCmdMask = Parent::NextFreeMask << 2
- LeaveCmdMask = Parent::NextFreeMask << 3
- TickCmdMask = Parent::NextFreeMask << 4
- NextFreeMask = Parent::NextFreeMask << 5
Private Types
typedef GameBase Parent
Private Attributes
EarlyOutPolyList mClippedList
Convex * mConvexList
U32 mCurrTick
TriggerData * mDataBlock
String mEnterCommand
U32 mLastThink
String mLeaveCommand
Vector< GameBase * > mObjects
PhysicsBody * mPhysicsRep
String mTickCommand
Polyhedron mTriggerPolyhedron
Trigger polyhedron with outward facing normals and CCW ordered vertices.
String mTripCondition
bool mTripOnce
bool mTripped
S32 mTrippedBy
Private Static Attributes
const U32 CMD_SIZE
Protected Static Attributes
bool smRenderTriggers
Private Functions
onUnmount(SceneObject * obj, S32 node)
Reimplemented from: GameBase
Protected Functions
buildConvex(const Box3F & box, Convex * convex)
Reimplemented from: SceneObject
evalCmD(String * )
interpolateTick(F32 delta)
Reimplemented from: GameBase
processTick(const Move * move)
Reimplemented from: GameBase
testCondition()
testObject(GameBase * enter)
testTrippable()
Protected Static Functions
setEnterCmd(void * object, const char * index, const char * data)
setLeaveCmd(void * object, const char * index, const char * data)
setTickCmd(void * object, const char * index, const char * data)
Public Functions
Trigger()
~Trigger()
castRay(const Point3F & start, const Point3F & end, RayInfo * info)
Reimplemented from: SceneObject
DECLARE_CALLBACK(void , onAdd , (U32 objectId) )
DECLARE_CALLBACK(void , onRemove , (U32 objectId) )
DECLARE_CONOBJECT(Trigger )
getNumTriggeringObjects()
getObject(const U32)
getObjects()
inspectPostApply()
Reimplemented from: GameBase
onAdd()
Reimplemented from: GameBase
onDeleteNotify(SimObject * object)
Reimplemented from: SceneObject
onNewDataBlock(GameBaseData * dptr, bool reload)
Reimplemented from: GameBase
onRemove()
Reimplemented from: GameBase
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Reimplemented from: GameBase
potentialEnterObject(GameBase * )
prepRenderImage(SceneRenderState * state)
Reimplemented from: SceneObject
renderObject(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)
setTransform(const MatrixF & mat)
Reimplemented from: SceneObject
setTriggerPolyhedron(const Polyhedron & )
testObjects()
unpackUpdate(NetConnection * conn, BitStream * stream)
Reimplemented from: GameBase