dtABC::ProximityTrigger Class Reference

The ProximityTrigger class contains a Trigger which it fires whenever a Transformable enters it's bounding shape. More...

#include <proximitytrigger.h>

Inheritance diagram for dtABC::ProximityTrigger:

dtCore::Transformable dtCore::DeltaDrawable dtCore::Base

List of all members.

Public Member Functions

 ProximityTrigger (const std::string &name="ProximityTrigger")
TriggerGetTrigger ()
 Non-const getter for the internal Trigger that this ProximityTrigger holds.
const TriggerGetTrigger () const
 Const getter for the internal Trigger that this ProximityTrigger holds.
virtual bool FilterContact (dContact *contact, Transformable *collider)
 Callback from Scene when a contact occurs.
void SetTimeDelay (float delay)
float GetTimeDelay () const

Protected Member Functions

virtual ~ProximityTrigger ()
void SetTraversalNumber (int number)

Classes

class  NodeCallback
 Node callback to update traversal numbers inside ProximityTrigger.


Detailed Description

The ProximityTrigger class contains a Trigger which it fires whenever a Transformable enters it's bounding shape.

By default, it has a collision sphere set with a radius of 5 units. To filter what can collide with this ProximityTrigger use SetCollisionCollideBits as the OR of all the CollisionCategories you want. A ProximityTrigger is fired only once per touch of a Transformable.


Constructor & Destructor Documentation

ProximityTrigger::ProximityTrigger ( const std::string &  name = "ProximityTrigger"  ) 

virtual dtABC::ProximityTrigger::~ProximityTrigger (  )  [inline, protected, virtual]


Member Function Documentation

Trigger* dtABC::ProximityTrigger::GetTrigger (  )  [inline]

Non-const getter for the internal Trigger that this ProximityTrigger holds.

Use this to set the Action on the internal trigger.

Returns:
The non-const internal Trigger.

const Trigger* dtABC::ProximityTrigger::GetTrigger (  )  const [inline]

Const getter for the internal Trigger that this ProximityTrigger holds.

Use this to query the Action on the internal trigger.

Returns:
The const internal Trigger.

bool ProximityTrigger::FilterContact ( dContact *  contact,
Transformable *  collider 
) [virtual]

Callback from Scene when a contact occurs.

This normally is used to filter out Transformable that you do not want to perform expensive physics calculations on, but here we use it to fire our Trigger.

void dtABC::ProximityTrigger::SetTimeDelay ( float  delay  )  [inline]

float dtABC::ProximityTrigger::GetTimeDelay (  )  const [inline]

void dtABC::ProximityTrigger::SetTraversalNumber ( int  number  )  [inline, protected]


http://www.delta3d.org
2.0.0 generated 14 Feb 2008