Drag[en]gine Script Module DragonScript Script API  1.0
TouchSensor Class Reference

Touch sensor. More...

Inheritance diagram for TouchSensor:

Public Member Functions

Collider getColliderAt (int collider)
 Collider at index in touch sensor. More...
 
int getColliderCount ()
 Number of colliders in touch sensor. More...
 
bool isEmpty ()
 Touch sensor contains colliders. More...
 
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...
 
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)
 Test collider for intersection. More...
 
void colliderMoveHits (Collider collider, Vector displacement)
 Tests moving collider for collision. More...
 
void colliderRotateHits (Collider collider)
 Test rotating collider for collision. More...
 
void colliderMoveRotateHits (Collider collider, Vector displacement)
 Test moving and rotating collider for collision. More...
 

Detailed Description

Touch sensor.

This is a native class.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

◆ addIgnoreCollider()

void addIgnoreCollider ( Collider  collider)

Add collider to ignore.

◆ allHits()

void allHits ( ColliderListener  listener)

Visit all touching elements..

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

◆ colliderHits()

void colliderHits ( Collider  collider)

Test collider for intersection.

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

◆ colliderMoveHits()

void colliderMoveHits ( Collider  collider,
Vector  displacement 
)

Tests moving collider for collision.

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

◆ colliderMoveRotateHits()

void colliderMoveRotateHits ( Collider  collider,
Vector  displacement 
)

Test moving and rotating collider for collision.

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

◆ colliderRotateHits()

void colliderRotateHits ( Collider  collider)

Test rotating collider for collision.

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

◆ getColliderAt()

Collider 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 getColliderCount ( )

Number of colliders in touch sensor.

◆ getCollisionFilter()

CollisionFilter getCollisionFilter ( )

Collision filter.

◆ getEnabled()

bool getEnabled ( )

Touch sensor is enabled.

◆ getIgnoreColliderAt()

Collider getIgnoreColliderAt ( int  index)

Ignore collider at index.

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

◆ getIgnoreColliderCount()

int getIgnoreColliderCount ( )

Number of colliders to ignore.

◆ getListener()

TouchSensorListener getListener ( )

Touch sensor listener or null if not set.

◆ getOrientation()

Quaternion getOrientation ( )

Orientation.

◆ getPosition()

DVector getPosition ( )

Pposition.

◆ getShape()

ShapeList getShape ( )

Get shape.

◆ getTrackEnterLeave()

bool getTrackEnterLeave ( )

Track enter leave.

◆ hasIgnoreCollider()

bool hasIgnoreCollider ( Collider  collider)

Ignore collider is present.

◆ isEmpty()

bool isEmpty ( )

Touch sensor contains colliders.

◆ new()

TouchSensor new ( )

Create touch sensor.

◆ pointInside()

bool pointInside ( DVector  point)

Point is inside touch sensor.

◆ rayHits()

void 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 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 removeAllIgnoreColliders ( )

Remove all colliders to ignore.

◆ removeIgnoreCollider()

void removeIgnoreCollider ( Collider  collider)

Remove collider to ignore.

Exceptions
deeInvalidParamcollider is absent.

◆ setCollisionFilter()

void setCollisionFilter ( CollisionFilter  collisionFilter)

Set collision filter.

◆ setEnabled()

void setEnabled ( bool  enabled)

Set if touch sensor is enabled.

◆ setListener()

void setListener ( TouchSensorListener  listener)

Set touch sensor listener or null if not set.

◆ setOrientation()

void setOrientation ( Quaternion  orientation)

Set orientation.

◆ setPosition()

void setPosition ( DVector  position)

Set position.

◆ setShape()

void setShape ( ShapeList  shape)

Set shape.

◆ setTrackEnterLeave()

void setTrackEnterLeave ( bool  trackEnterLeave)

Set if enter and leaving is tracked.


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