Drag[en]gine Script Module DragonScript
1.21
|
Touch sensor. More...
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... | |
Touch sensor.
This is a native class.
void Dragengine.Scenery.TouchSensor.addIgnoreCollider | ( | Collider | collider | ) |
Add collider to ignore.
void Dragengine.Scenery.TouchSensor.allHits | ( | ColliderListener | listener | ) |
Visit all touching elements.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
void Dragengine.Scenery.TouchSensor.colliderHits | ( | Collider | collider, |
ColliderListener | listener | ||
) |
Test collider for intersection.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
void Dragengine.Scenery.TouchSensor.colliderMoveHits | ( | Collider | collider, |
Vector | displacement, | ||
ColliderListener | listener | ||
) |
Tests moving collider for collision.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
void Dragengine.Scenery.TouchSensor.colliderMoveHitsClosest | ( | Collider | collider, |
Vector | displacement, | ||
ColliderListener | listener | ||
) |
Tests moving collider for collision.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
void Dragengine.Scenery.TouchSensor.colliderMoveRotateHits | ( | Collider | collider, |
Vector | displacement, | ||
ColliderListener | listener | ||
) |
Test moving and rotating collider for collision.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
void Dragengine.Scenery.TouchSensor.colliderMoveRotateHitsClosest | ( | Collider | collider, |
Vector | displacement, | ||
ColliderListener | listener | ||
) |
Test moving and rotating collider for collision.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
void Dragengine.Scenery.TouchSensor.colliderRotateHits | ( | Collider | collider, |
ColliderListener | listener | ||
) |
Test rotating collider for collision.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
void Dragengine.Scenery.TouchSensor.colliderRotateHitsClosest | ( | Collider | collider, |
ColliderListener | listener | ||
) |
Test rotating collider for collision.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
Collider Dragengine.Scenery.TouchSensor.getColliderAt | ( | int | collider | ) |
Collider at index in touch sensor.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
EOutOfBoundary | collider is less than 0 or larger than or equal to getColliderCount(). |
int Dragengine.Scenery.TouchSensor.getColliderCount | ( | ) |
Number of colliders in touch sensor.
CollisionFilter Dragengine.Scenery.TouchSensor.getCollisionFilter | ( | ) |
Collision filter.
bool Dragengine.Scenery.TouchSensor.getEnabled | ( | ) |
Touch sensor is enabled.
Collider Dragengine.Scenery.TouchSensor.getIgnoreColliderAt | ( | int | index | ) |
Ignore collider at index.
deeInvalidParam | index is less than 0 or equal than or equal to getIgnoreColliderCount(). |
int Dragengine.Scenery.TouchSensor.getIgnoreColliderCount | ( | ) |
Number of colliders to ignore.
TouchSensorListener Dragengine.Scenery.TouchSensor.getListener | ( | ) |
Touch sensor listener or null if not set.
Quaternion Dragengine.Scenery.TouchSensor.getOrientation | ( | ) |
Orientation.
DVector Dragengine.Scenery.TouchSensor.getPosition | ( | ) |
Pposition.
ShapeList Dragengine.Scenery.TouchSensor.getShape | ( | ) |
Get shape.
bool Dragengine.Scenery.TouchSensor.getTrackEnterLeave | ( | ) |
Track enter leave.
bool Dragengine.Scenery.TouchSensor.hasIgnoreCollider | ( | Collider | collider | ) |
Ignore collider is present.
bool Dragengine.Scenery.TouchSensor.isEmpty | ( | ) |
Touch sensor contains colliders.
TouchSensor Dragengine.Scenery.TouchSensor.new | ( | ) |
Create touch sensor.
bool Dragengine.Scenery.TouchSensor.pointInside | ( | DVector | point | ) |
Point is inside touch sensor.
void Dragengine.Scenery.TouchSensor.rayHits | ( | DVector | rayOrigin, |
Vector | rayDirection, | ||
ColliderListener | listener | ||
) |
Ray cast intersection test.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
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.
EOutOfBoundary | shape is less than 0 or larger than or equal to getShapeCount(). |
void Dragengine.Scenery.TouchSensor.removeAllIgnoreColliders | ( | ) |
Remove all colliders to ignore.
void Dragengine.Scenery.TouchSensor.removeIgnoreCollider | ( | Collider | collider | ) |
Remove collider to ignore.
deeInvalidParam | collider is absent. |
void Dragengine.Scenery.TouchSensor.setCollisionFilter | ( | CollisionFilter | collisionFilter | ) |
Set collision filter.
void Dragengine.Scenery.TouchSensor.setEnabled | ( | bool | enabled | ) |
Set if touch sensor is enabled.
void Dragengine.Scenery.TouchSensor.setListener | ( | TouchSensorListener | listener | ) |
Set touch sensor listener or null if not set.
void Dragengine.Scenery.TouchSensor.setOrientation | ( | Quaternion | orientation | ) |
Set orientation.
void Dragengine.Scenery.TouchSensor.setPosition | ( | DVector | position | ) |
Set position.
void Dragengine.Scenery.TouchSensor.setShape | ( | ShapeList | shape | ) |
Set shape.
void Dragengine.Scenery.TouchSensor.setTrackEnterLeave | ( | bool | trackEnterLeave | ) |
Set if enter and leaving is tracked.