Drag[en]gine Game Engine  1.0
deBasePhysicsTouchSensor Class Reference

Physics Module Touch Sensor Peer. More...

#include <deBasePhysicsTouchSensor.h>

Public Member Functions

Constructors and Destructors
 deBasePhysicsTouchSensor ()
 
virtual ~deBasePhysicsTouchSensor ()
 
Notifications
virtual void PositionChanged ()
 
virtual void OrientationChanged ()
 
virtual void CollisionFilterChanged ()
 Collision filter changed. More...
 
virtual void IgnoreCollidersChanged ()
 Ignore colliders changed. More...
 
virtual void TrackEnterLeaveChanged ()
 Track enter/leave changed. More...
 
virtual void EnabledChanged ()
 Enabled changed. More...
 
virtual bool IsShapeEmpty (int shape)
 
virtual int GetShapeColliderCount (int shape)
 
virtual deColliderGetShapeColliderAt (int shape, int collider)
 
virtual void ShapeAdded (int index, decShape *shape)
 
virtual void ShapeChanged (int index, decShape *shape)
 
virtual void ShapeRemoved (int index, decShape *shape)
 
virtual void AllShapesRemoved ()
 
Collision Detection
virtual void RayHits (int shape, const decDVector &rayOrigin, const decVector &rayDirection, deBaseScriptingCollider *listener)
 
virtual void ColliderHits (int shape, deCollider *collider, deBaseScriptingCollider *listener)
 
virtual void ColliderMoveHits (int shape, deCollider *collider, const decVector &displacement, deBaseScriptingCollider *listener)
 
virtual void ColliderRotateHits (int shape, deCollider *collider, const decVector &rotation, deBaseScriptingCollider *listener)
 
virtual void ColliderMoveRotateHits (int shape, deCollider *collider, const decVector &displacement, const decVector &rotation, deBaseScriptingCollider *listener)
 

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::deBasePhysicsTouchSensor ( )

Creates a new peer.

◆ ~deBasePhysicsTouchSensor()

virtual deBasePhysicsTouchSensor::~deBasePhysicsTouchSensor ( )
virtual

Cleans up the peer.

Member Function Documentation

◆ AllShapesRemoved()

virtual void deBasePhysicsTouchSensor::AllShapesRemoved ( )
virtual

All shapes removed. Called right before all shapes are removed and freed.

◆ ColliderHits()

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.

◆ ColliderMoveHits()

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.

◆ ColliderMoveRotateHits()

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.

◆ ColliderRotateHits()

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.

◆ CollisionFilterChanged()

virtual void deBasePhysicsTouchSensor::CollisionFilterChanged ( )
virtual

Collision filter changed.

◆ EnabledChanged()

virtual void deBasePhysicsTouchSensor::EnabledChanged ( )
virtual

Enabled changed.

◆ GetShapeColliderAt()

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.

◆ GetShapeColliderCount()

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.

◆ IgnoreCollidersChanged()

virtual void deBasePhysicsTouchSensor::IgnoreCollidersChanged ( )
virtual

Ignore colliders changed.

◆ IsShapeEmpty()

virtual bool deBasePhysicsTouchSensor::IsShapeEmpty ( int  shape)
virtual

Determines if the given shape contains no colliders.

Parameters
shapeIndex of the shape to test.

◆ OrientationChanged()

virtual void deBasePhysicsTouchSensor::OrientationChanged ( )
virtual

Orientation changed.

◆ PositionChanged()

virtual void deBasePhysicsTouchSensor::PositionChanged ( )
virtual

Position changed.

◆ RayHits()

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.

◆ ShapeAdded()

virtual void deBasePhysicsTouchSensor::ShapeAdded ( int  index,
decShape shape 
)
virtual

Shape added.

Parameters
indexIndex of the added shape.
shapeThe added shape.

◆ ShapeChanged()

virtual void deBasePhysicsTouchSensor::ShapeChanged ( int  index,
decShape shape 
)
virtual

Shape changed.

Parameters
indexIndex of the changed shape.
shapeThe changed shape.

◆ ShapeRemoved()

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.

◆ TrackEnterLeaveChanged()

virtual void deBasePhysicsTouchSensor::TrackEnterLeaveChanged ( )
virtual

Track enter/leave changed.


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