Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.TouchSensor Class Reference

Touch sensor. More...

Inheritance diagram for Dragengine.Scenery.TouchSensor:

Public Member Functions

Constructors
TouchSensor new ()
 Create touch sensor. More...
 
Management
DVector getPosition ()
 Pposition. More...
 
void setPosition (DVector position)
 Set position. More...
 
Quaternion getOrientation ()
 Orientation. More...
 
void setOrientation (Quaternion orientation)
 Set orientation. More...
 
CollisionFilter getCollisionFilter ()
 Collision filter. More...
 
void setCollisionFilter (CollisionFilter collisionFilter)
 Set collision filter. More...
 
bool getTrackEnterLeave ()
 Track enter leave. More...
 
void setTrackEnterLeave (bool trackEnterLeave)
 Set if enter and leaving is tracked. More...
 
bool getEnabled ()
 Touch sensor is enabled. More...
 
void setEnabled (bool enabled)
 Set if touch sensor is enabled. More...
 
ShapeList getShape ()
 Get shape. More...
 
void setShape (ShapeList shape)
 Set shape. More...
 
TouchSensorListener getListener ()
 Touch sensor listener or null if not set. More...
 
void setListener (TouchSensorListener listener)
 Set touch sensor listener or null if not set. More...
 
bool isEmpty ()
 Touch sensor contains colliders. More...
 
int getColliderCount ()
 Number of colliders in touch sensor. More...
 
Collider getColliderAt (int collider)
 Collider at index in touch sensor. More...
 
Ignore colliders
int getIgnoreColliderCount ()
 Number of colliders to ignore. More...
 
Collider getIgnoreColliderAt (int index)
 Ignore collider at index. More...
 
bool hasIgnoreCollider (Collider collider)
 Ignore collider is present. More...
 
void addIgnoreCollider (Collider collider)
 Add collider to ignore. More...
 
void removeIgnoreCollider (Collider collider)
 Remove collider to ignore. More...
 
void removeAllIgnoreColliders ()
 Remove all colliders to ignore. More...
 
Collision detection
bool pointInside (DVector point)
 Point is inside touch sensor. More...
 
void allHits (ColliderListener listener)
 Visit all touching elements. More...
 
void rayHits (DVector rayOrigin, Vector rayDirection, ColliderListener listener)
 Ray cast intersection test. More...
 
void rayHitsClosest (DVector rayOrigin, Vector rayDirection, ColliderListener listener)
 Closest ray cast intersection test. More...
 
void colliderHits (Collider collider, ColliderListener listener)
 Test collider for intersection. More...
 
void colliderMoveHits (Collider collider, Vector displacement, ColliderListener listener)
 Tests moving collider for collision. More...
 
void colliderMoveHitsClosest (Collider collider, Vector displacement, ColliderListener listener)
 Tests moving collider for collision. More...
 
void colliderRotateHits (Collider collider, ColliderListener listener)
 Test rotating collider for collision. More...
 
void colliderRotateHitsClosest (Collider collider, ColliderListener listener)
 Test rotating collider for collision. More...
 
void colliderMoveRotateHits (Collider collider, Vector displacement, ColliderListener listener)
 Test moving and rotating collider for collision. More...
 
void colliderMoveRotateHitsClosest (Collider collider, Vector displacement, ColliderListener listener)
 Test moving and rotating collider for collision. More...
 

Detailed Description

Touch sensor.

This is a native class.

Member Function Documentation

◆ addIgnoreCollider()

void Dragengine.Scenery.TouchSensor.addIgnoreCollider ( Collider  collider)

Add collider to ignore.

◆ allHits()

void Dragengine.Scenery.TouchSensor.allHits ( ColliderListener  listener)

Visit all touching elements.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ colliderHits()

void Dragengine.Scenery.TouchSensor.colliderHits ( Collider  collider,
ColliderListener  listener 
)

Test collider for intersection.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ colliderMoveHits()

void Dragengine.Scenery.TouchSensor.colliderMoveHits ( Collider  collider,
Vector  displacement,
ColliderListener  listener 
)

Tests moving collider for collision.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ colliderMoveHitsClosest()

void Dragengine.Scenery.TouchSensor.colliderMoveHitsClosest ( Collider  collider,
Vector  displacement,
ColliderListener  listener 
)

Tests moving collider for collision.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ colliderMoveRotateHits()

void Dragengine.Scenery.TouchSensor.colliderMoveRotateHits ( Collider  collider,
Vector  displacement,
ColliderListener  listener 
)

Test moving and rotating collider for collision.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ colliderMoveRotateHitsClosest()

void Dragengine.Scenery.TouchSensor.colliderMoveRotateHitsClosest ( Collider  collider,
Vector  displacement,
ColliderListener  listener 
)

Test moving and rotating collider for collision.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ colliderRotateHits()

void Dragengine.Scenery.TouchSensor.colliderRotateHits ( Collider  collider,
ColliderListener  listener 
)

Test rotating collider for collision.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ colliderRotateHitsClosest()

void Dragengine.Scenery.TouchSensor.colliderRotateHitsClosest ( Collider  collider,
ColliderListener  listener 
)

Test rotating collider for collision.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ getColliderAt()

Collider Dragengine.Scenery.TouchSensor.getColliderAt ( int  collider)

Collider at index in touch sensor.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().
EOutOfBoundarycollider is less than 0 or larger than or equal to getColliderCount().

◆ getColliderCount()

int Dragengine.Scenery.TouchSensor.getColliderCount ( )

Number of colliders in touch sensor.

◆ getCollisionFilter()

CollisionFilter Dragengine.Scenery.TouchSensor.getCollisionFilter ( )

Collision filter.

◆ getEnabled()

bool Dragengine.Scenery.TouchSensor.getEnabled ( )

Touch sensor is enabled.

◆ getIgnoreColliderAt()

Collider Dragengine.Scenery.TouchSensor.getIgnoreColliderAt ( int  index)

Ignore collider at index.

Exceptions
deeInvalidParamindex is less than 0 or equal than or equal to getIgnoreColliderCount().

◆ getIgnoreColliderCount()

int Dragengine.Scenery.TouchSensor.getIgnoreColliderCount ( )

Number of colliders to ignore.

◆ getListener()

TouchSensorListener Dragengine.Scenery.TouchSensor.getListener ( )

Touch sensor listener or null if not set.

◆ getOrientation()

Quaternion Dragengine.Scenery.TouchSensor.getOrientation ( )

Orientation.

◆ getPosition()

DVector Dragengine.Scenery.TouchSensor.getPosition ( )

Pposition.

◆ getShape()

ShapeList Dragengine.Scenery.TouchSensor.getShape ( )

Get shape.

◆ getTrackEnterLeave()

bool Dragengine.Scenery.TouchSensor.getTrackEnterLeave ( )

Track enter leave.

◆ hasIgnoreCollider()

bool Dragengine.Scenery.TouchSensor.hasIgnoreCollider ( Collider  collider)

Ignore collider is present.

◆ isEmpty()

bool Dragengine.Scenery.TouchSensor.isEmpty ( )

Touch sensor contains colliders.

◆ new()

TouchSensor Dragengine.Scenery.TouchSensor.new ( )

Create touch sensor.

◆ pointInside()

bool Dragengine.Scenery.TouchSensor.pointInside ( DVector  point)

Point is inside touch sensor.

◆ rayHits()

void Dragengine.Scenery.TouchSensor.rayHits ( DVector  rayOrigin,
Vector  rayDirection,
ColliderListener  listener 
)

Ray cast intersection test.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ rayHitsClosest()

void Dragengine.Scenery.TouchSensor.rayHitsClosest ( DVector  rayOrigin,
Vector  rayDirection,
ColliderListener  listener 
)

Closest ray cast intersection test.

Only closest intersection is reported to listener. rayHits() reports all intersections.

Exceptions
EOutOfBoundaryshape is less than 0 or larger than or equal to getShapeCount().

◆ removeAllIgnoreColliders()

void Dragengine.Scenery.TouchSensor.removeAllIgnoreColliders ( )

Remove all colliders to ignore.

◆ removeIgnoreCollider()

void Dragengine.Scenery.TouchSensor.removeIgnoreCollider ( Collider  collider)

Remove collider to ignore.

Exceptions
deeInvalidParamcollider is absent.

◆ setCollisionFilter()

void Dragengine.Scenery.TouchSensor.setCollisionFilter ( CollisionFilter  collisionFilter)

Set collision filter.

◆ setEnabled()

void Dragengine.Scenery.TouchSensor.setEnabled ( bool  enabled)

Set if touch sensor is enabled.

◆ setListener()

void Dragengine.Scenery.TouchSensor.setListener ( TouchSensorListener  listener)

Set touch sensor listener or null if not set.

◆ setOrientation()

void Dragengine.Scenery.TouchSensor.setOrientation ( Quaternion  orientation)

Set orientation.

◆ setPosition()

void Dragengine.Scenery.TouchSensor.setPosition ( DVector  position)

Set position.

◆ setShape()

void Dragengine.Scenery.TouchSensor.setShape ( ShapeList  shape)

Set shape.

◆ setTrackEnterLeave()

void Dragengine.Scenery.TouchSensor.setTrackEnterLeave ( bool  trackEnterLeave)

Set if enter and leaving is tracked.


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