Trigger Class Reference#include <trigger.h>
Inheritance diagram for Trigger:
[legend]
|
Public Member Functions |
void | setTransform (const MatrixF &mat) |
| Sets the Object -> World transform.
|
| Trigger () |
| ~Trigger () |
void | setTriggerPolyhedron (const Polyhedron &) |
void | potentialEnterObject (GameBase *) |
U32 | getNumTriggeringObjects () const |
GameBase * | getObject (const U32) |
| DECLARE_CONOBJECT (Trigger) |
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.
|
bool | castRay (const Point3F &start, const Point3F &end, RayInfo *info) |
| Casts a ray and obtain collision information, returns true if RayInfo is modified.
|
Static Public Member Functions |
static void | initPersistFields () |
| Register dynamic fields in a subclass of ConsoleObject.
|
Protected Member Functions |
bool | onAdd () |
| Called when the object is added to the sim.
|
void | onRemove () |
| Called when the object is removed from the sim.
|
void | onDeleteNotify (SimObject *) |
| Called when a SimObject is deleted.
|
bool | onNewDataBlock (GameBaseData *dptr) |
| Called when a new datablock is set.
|
void | onEditorEnable () |
| Called when the editor is activated.
|
void | onEditorDisable () |
| Called when the editor is deactivated.
|
bool | testObject (GameBase *enter) |
void | processTick (const Move *move) |
| Processes a move event and updates object state once every 32 milliseconds.
|
void | buildConvex (const Box3F &box, Convex *convex) |
| Builds a convex hull for this object.
|
bool | prepRenderImage (SceneState *state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState=false) |
| 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.
|
Protected Attributes |
Convex * | mConvexList |
Private Types |
typedef GameBase | Parent |
Private Attributes |
Polyhedron | mTriggerPolyhedron |
EarlyOutPolyList | mClippedList |
Vector< GameBase * > | mObjects |
TriggerData * | mDataBlock |
U32 | mLastThink |
U32 | mCurrTick |
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
bool Trigger::onAdd |
( |
|
) |
[protected, virtual] |
Called when the object is added to the sim.
Reimplemented from GameBase.
void Trigger::onRemove |
( |
|
) |
[protected, virtual] |
Called when the object is removed from the sim.
Reimplemented from GameBase.
void Trigger::onDeleteNotify |
( |
SimObject * |
object |
) |
[protected, virtual] |
Called when a SimObject is deleted.
When you are on the notification list for another object and it is deleted, this method is called.
Reimplemented from SimObject.
bool Trigger::onNewDataBlock |
( |
GameBaseData * |
dptr |
) |
[protected, virtual] |
Called when a new datablock is set.
This allows subclasses to appropriately handle new datablocks.
- See also:
- setDataBlock()
- Parameters:
-
Reimplemented from GameBase.
void Trigger::onEditorEnable |
( |
|
) |
[protected, virtual] |
Called when the editor is activated.
Reimplemented from SimObject.
void Trigger::onEditorDisable |
( |
|
) |
[protected, virtual] |
Called when the editor is deactivated.
Reimplemented from SimObject.
bool Trigger::testObject |
( |
GameBase * |
enter |
) |
[protected] |
void Trigger::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.
void Trigger::buildConvex |
( |
const Box3F & |
box, |
|
|
Convex * |
convex | |
|
) |
| | [protected, virtual] |
Builds a convex hull for this object.
Think of a convex hull as a low-res mesh which covers, as tightly as possible, the object mesh, and is used as a collision mesh. - Parameters:
-
| box | |
| convex | Convex mesh generated (out) |
Reimplemented from SceneObject.
bool Trigger::prepRenderImage |
( |
SceneState * |
state, |
|
|
const U32 |
stateKey, |
|
|
const U32 |
startZone, |
|
|
const bool |
modifyBaseZoneState = false | |
|
) |
| | [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.
void Trigger::setTransform |
( |
const MatrixF & |
mat |
) |
[virtual] |
Sets the Object -> World transform.
- Parameters:
-
Reimplemented from SceneObject.
U32 Trigger::getNumTriggeringObjects |
( |
|
) |
const [inline] |
GameBase * Trigger::getObject |
( |
const |
U32 |
) |
[inline] |
Trigger::DECLARE_CONOBJECT |
( |
Trigger |
|
) |
|
static void Trigger::initPersistFields |
( |
|
) |
[static] |
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 GameBase.
Instructs this object to read state data previously packed with packUpdate.
- Parameters:
-
| conn | Net connection being used |
| stream | stream to read from |
Reimplemented from GameBase.
Casts a ray and obtain collision information, returns true if RayInfo is modified.
- Parameters:
-
| start | Start point of ray |
| end | End point of ray |
| info | Collision information obtained (out) |
Reimplemented from SceneObject.
Field Documentation
|