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

Touch sensor. More...

Inheritance diagram for 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...
 
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...
 
Shapes
ShapeList getShape ()
 Shape. More...
 
void setShape (ShapeList shape)
 Set shape. More...
 
int getShapeCount ()
 Number of shapes. More...
 
void addShapeSphere (Vector position, float radius)
 Add sphere shape. More...
 
void addShapeBox (Vector position, Quaternion orientation, Vector halfExtends)
 Add box shape. More...
 
void addShapeCylinder (Vector position, Quaternion orientation, float halfHeight, float topRadius, float bottomRadius)
 Add cylinder shape. More...
 
void addShapeCapsule (Vector position, Quaternion orientation, float halfHeight, float topRadius, float bottomRadius)
 Add capsule shape. More...
 
void removeShapeFrom (int index)
 Remove shape. More...
 
void removeAllShapes ()
 Remove all shapes. More...
 
bool isShapeEmpty (int shape)
 Shape contains colliders. More...
 
int getShapeColliderCount (int shape)
 Number of colliders in shape. More...
 
Collider getShapeColliderAt (int shape, int collider)
 Collider at index in shape. 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
void rayHits (int shape, DVector rayOrigin, Vector rayDirection, ColliderListener listener)
 Ray cast intersection test. More...
 
void rayHitsClosest (int shape, DVector rayOrigin, Vector rayDirection, ColliderListener listener)
 Closest ray cast intersection test. More...
 
void colliderHits (int shape, Collider collider)
 Test collider for intersection. More...
 
void colliderMoveHits (int shape, Collider collider, Vector displacement)
 Tests moving collider for collision. More...
 
void colliderRotateHits (int shape, Collider collider)
 Test rotating collider for collision. More...
 
void colliderMoveRotateHits (int shape, 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.

§ addShapeBox()

void addShapeBox ( Vector  position,
Quaternion  orientation,
Vector  halfExtends 
)

Add box shape.

§ addShapeCapsule()

void addShapeCapsule ( Vector  position,
Quaternion  orientation,
float  halfHeight,
float  topRadius,
float  bottomRadius 
)

Add capsule shape.

§ addShapeCylinder()

void addShapeCylinder ( Vector  position,
Quaternion  orientation,
float  halfHeight,
float  topRadius,
float  bottomRadius 
)

Add cylinder shape.

§ addShapeSphere()

void addShapeSphere ( Vector  position,
float  radius 
)

Add sphere shape.

§ colliderHits()

void colliderHits ( int  shape,
Collider  collider 
)

Test collider for intersection.

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

§ colliderMoveHits()

void colliderMoveHits ( int  shape,
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 ( int  shape,
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 ( int  shape,
Collider  collider 
)

Test rotating collider for collision.

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

§ 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 ( )

Shape.

§ getShapeColliderAt()

Collider getShapeColliderAt ( int  shape,
int  collider 
)

Collider at index in shape.

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

§ getShapeColliderCount()

int getShapeColliderCount ( int  shape)

Number of colliders in shape.

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

§ getShapeCount()

int getShapeCount ( )

Number of shapes.

§ getTrackEnterLeave()

bool getTrackEnterLeave ( )

Track enter leave.

§ hasIgnoreCollider()

bool hasIgnoreCollider ( Collider  collider)

Ignore collider is present.

§ isShapeEmpty()

bool isShapeEmpty ( int  shape)

Shape contains colliders.

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

§ new()

TouchSensor new ( )

Create touch sensor.

§ rayHits()

void rayHits ( int  shape,
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 ( int  shape,
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.

§ removeAllShapes()

void removeAllShapes ( )

Remove all shapes.

§ removeIgnoreCollider()

void removeIgnoreCollider ( Collider  collider)

Remove collider to ignore.

Exceptions
deeInvalidParamcollider is absent.

§ removeShapeFrom()

void removeShapeFrom ( int  index)

Remove shape.

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

§ 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: