deBasePhysicsTouchSensor Class Reference

Physics Module Touch Sensor Peer. More...

#include <deBasePhysicsTouchSensor.h>

List of all members.

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 deColliderGetShapeColliderAt (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.

Detailed Description

Physics Module Touch Sensor Peer.

Touch sensor peer for the pyhsics module.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deBasePhysicsTouchSensor::deBasePhysicsTouchSensor (  )

Creates a new peer.

virtual deBasePhysicsTouchSensor::~deBasePhysicsTouchSensor (  ) [virtual]

Cleans up the peer.


Member Function Documentation

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.

Parameters:
shapeIndex of the shape to query.
colliderIndex of the collider retrieve from the shape.
Returns:
collider at the given index in the given shape.
virtual int deBasePhysicsTouchSensor::GetShapeColliderCount ( int  shape ) [virtual]

Retrieves the number of colliders in the given shape.

Parameters:
shapeIndex of the shape to query.
Returns:
number of colliders in the shape.
virtual void deBasePhysicsTouchSensor::GroupNumberChanged (  ) [virtual]

Group number changed.

virtual bool deBasePhysicsTouchSensor::IsShapeEmpty ( int  shape ) [virtual]

Determines if the given shape contains no colliders.

Parameters:
shapeIndex 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.

Parameters:
shapeIndex of shape to test.
rayOriginOrigin of the ray.
rayDirectionNormalized direction of the ray.
listenerListener to ask about collisions.
layerMaskLayer mask to test for collisions with.
groupNumberGroup number to test for collision with or 0.
virtual void deBasePhysicsTouchSensor::ShapeAdded ( int  index,
decShape shape 
) [virtual]

Shape added.

Parameters:
indexIndex of the added shape.
shapeThe added shape.
virtual void deBasePhysicsTouchSensor::ShapeChanged ( int  index,
decShape shape 
) [virtual]

Shape changed.

Parameters:
indexIndex of the changed shape.
shapeThe 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.

Parameters:
indexIndex of the removed shape.
shapeThe removed shape.

The documentation for this class was generated from the following file: