Physics Module Touch Sensor Peer. More...
#include <deBasePhysicsTouchSensor.h>
Public Member Functions | |
Constructors and Destructors | |
| deBasePhysicsTouchSensor () | |
| Creates a new peer. | |
| virtual | ~deBasePhysicsTouchSensor () |
| Cleans up the peer. | |
Notifications | |
| virtual void | PositionChanged () |
| Position changed. | |
| virtual void | OrientationChanged () |
| Orientation changed. | |
| virtual void | LayerMaskChanged () |
| Layer mask changed. | |
| virtual void | GroupNumberChanged () |
| Group number changed. | |
| virtual bool | IsShapeEmpty (int shape) |
| Determines if the given shape contains no colliders. | |
| virtual int | GetShapeColliderCount (int shape) |
| Retrieves the number of colliders in the given shape. | |
| virtual deCollider * | GetShapeColliderAt (int shape, int collider) |
| Retrieves the collider at the given index in the given shape. | |
| virtual void | ShapeAdded (int index, decShape *shape) |
| Shape added. | |
| virtual void | ShapeChanged (int index, decShape *shape) |
| Shape changed. | |
| virtual void | ShapeRemoved (int index, decShape *shape) |
| Shape removed. | |
| virtual void | AllShapesRemoved () |
| All shapes removed. | |
Collision Detection | |
| virtual void | RayHits (int shape, const decDVector &rayOrigin, const decVector &rayDirection, deBaseScriptingCollider *listener) |
| Tests a ray for collision with the element in the given shape.For each collision the collisionResponse function the given listener is called. | |
| virtual void | ColliderHits (int shape, deCollider *collider, deBaseScriptingCollider *listener) |
| Tests the collider for collision with scene elements. | |
| virtual void | ColliderMoveHits (int shape, deCollider *collider, const decVector &displacement, deBaseScriptingCollider *listener) |
| Tests the moving collider for collision with scene elements. | |
| virtual void | ColliderRotateHits (int shape, deCollider *collider, const decVector &rotation, deBaseScriptingCollider *listener) |
| Tests the rotating collider for collision with scene elements. | |
| virtual void | ColliderMoveRotateHits (int shape, deCollider *collider, const decVector &displacement, const decVector &rotation, deBaseScriptingCollider *listener) |
| Tests the moving and rotating collider for collision with scene elements. | |
Physics Module Touch Sensor Peer.
Touch sensor peer for the pyhsics module.
| deBasePhysicsTouchSensor::deBasePhysicsTouchSensor | ( | ) |
Creates a new peer.
| virtual deBasePhysicsTouchSensor::~deBasePhysicsTouchSensor | ( | ) | [virtual] |
Cleans up the peer.
| virtual void deBasePhysicsTouchSensor::AllShapesRemoved | ( | ) | [virtual] |
All shapes removed.
Called right before all shapes are removed and freed.
| virtual void deBasePhysicsTouchSensor::ColliderHits | ( | int | shape, |
| deCollider * | collider, | ||
| deBaseScriptingCollider * | listener | ||
| ) | [virtual] |
Tests the collider for collision with scene elements.
For each collision the collisionResponse function of the listener assigned to the collider is called. To stop testing set StopTesting in the provided collision information object to true.
Has to be overwritten by the physics system to provide this test. The default implementation does nothing at all.
| virtual void deBasePhysicsTouchSensor::ColliderMoveHits | ( | int | shape, |
| deCollider * | collider, | ||
| const decVector & | displacement, | ||
| deBaseScriptingCollider * | listener | ||
| ) | [virtual] |
Tests the moving collider for collision with scene elements.
For each collision starting with the earliest the collisionResponse function of the listener assigned to the collider is called. To stop testing set StopTesting in the provided collision information object to true.
Has to be overwritten by the physics system to provide this test. The default implementation does nothing at all.
| virtual void deBasePhysicsTouchSensor::ColliderMoveRotateHits | ( | int | shape, |
| deCollider * | collider, | ||
| const decVector & | displacement, | ||
| const decVector & | rotation, | ||
| deBaseScriptingCollider * | listener | ||
| ) | [virtual] |
Tests the moving and rotating collider for collision with scene elements.
For each collision starting with the earliest the collisionResponse function of the listener assigned to the collider is called. To stop testing set StopTesting in the provided collision information object to true.
Has to be overwritten by the physics system to provide this test. The default implementation does nothing at all.
| virtual void deBasePhysicsTouchSensor::ColliderRotateHits | ( | int | shape, |
| deCollider * | collider, | ||
| const decVector & | rotation, | ||
| deBaseScriptingCollider * | listener | ||
| ) | [virtual] |
Tests the rotating collider for collision with scene elements.
For each collision starting with the earliest the collisionResponse function of the listener assigned to the collider is called. To stop testing set StopTesting in the provided collision information object to true.
Has to be overwritten by the physics system to provide this test. The default implementation does nothing at all.
| virtual deCollider* deBasePhysicsTouchSensor::GetShapeColliderAt | ( | int | shape, |
| int | collider | ||
| ) | [virtual] |
Retrieves the collider at the given index in the given shape.
| shape | Index of the shape to query. |
| collider | Index of the collider retrieve from the shape. |
| virtual int deBasePhysicsTouchSensor::GetShapeColliderCount | ( | int | shape ) | [virtual] |
Retrieves the number of colliders in the given shape.
| shape | Index of the shape to query. |
| virtual void deBasePhysicsTouchSensor::GroupNumberChanged | ( | ) | [virtual] |
Group number changed.
| virtual bool deBasePhysicsTouchSensor::IsShapeEmpty | ( | int | shape ) | [virtual] |
Determines if the given shape contains no colliders.
| shape | Index of the shape to test. |
| virtual void deBasePhysicsTouchSensor::LayerMaskChanged | ( | ) | [virtual] |
Layer mask changed.
| virtual void deBasePhysicsTouchSensor::OrientationChanged | ( | ) | [virtual] |
Orientation changed.
| virtual void deBasePhysicsTouchSensor::PositionChanged | ( | ) | [virtual] |
Position changed.
| virtual void deBasePhysicsTouchSensor::RayHits | ( | int | shape, |
| const decDVector & | rayOrigin, | ||
| const decVector & | rayDirection, | ||
| deBaseScriptingCollider * | listener | ||
| ) | [virtual] |
Tests a ray for collision with the element in the given shape.For each collision the collisionResponse function the given listener is called.
To stop testing set StopTesting in the provided collision information object to true. The distance parameter in the collision response represents the actual distance to the ray origin along the ray direction.
Has to be overwritten by the physics system to provide this test. The default implementation does nothing at all.
| shape | Index of shape to test. |
| rayOrigin | Origin of the ray. |
| rayDirection | Normalized direction of the ray. |
| listener | Listener to ask about collisions. |
| layerMask | Layer mask to test for collisions with. |
| groupNumber | Group number to test for collision with or 0. |
| virtual void deBasePhysicsTouchSensor::ShapeAdded | ( | int | index, |
| decShape * | shape | ||
| ) | [virtual] |
Shape added.
| index | Index of the added shape. |
| shape | The added shape. |
| virtual void deBasePhysicsTouchSensor::ShapeChanged | ( | int | index, |
| decShape * | shape | ||
| ) | [virtual] |
Shape changed.
| index | Index of the changed shape. |
| shape | The changed shape. |
| virtual void deBasePhysicsTouchSensor::ShapeRemoved | ( | int | index, |
| decShape * | shape | ||
| ) | [virtual] |
Shape removed.
Called after the shape has been removed from the list but not freed yet.
| index | Index of the removed shape. |
| shape | The removed shape. |
1.7.2