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

Collision detection. More...

Inheritance diagram for CollisionDetection:

Static Public Member Functions

Interesection tests
static bool sphereHitsSphere (Vector sphere1Center, float sphere1Radius, Vector sphere2Center, float sphere2Radius)
 Spheres intersects another sphere. More...
static bool capsuleHitsCapsule (Vector capsule1Start, Vector capsule1End, float capsule1Radius, Vector capsule2Start, Vector capsule2End, float capsule2Radius)
 Capsule intersects another capsule. More...
static bool sphereHitsBox (Vector sphereCenter, float sphereRadius, Vector boxCenter, Vector boxHalfSize)
 Sphere intersects box. More...
static bool capsuleHitsBox (Vector capsuleStart, Vector capsuleEnd, float capsuleRadius, Vector boxCenter, Vector boxHalfSize)
 Capsule intersects box. More...
static bool boxHitsBox (Vector box1Center, Vector box1HalfSize, Vector box2Center, Vector box2HalfSize)
 Box intersects box. More...

Detailed Description

Collision detection.

Collision detection should be left to be done by the physics module if possible. This class provides some generic collision detection for simple testing.

This is a native class.

Roland Pl├╝ss

Member Function Documentation

◆ boxHitsBox()

static bool boxHitsBox ( Vector  box1Center,
Vector  box1HalfSize,
Vector  box2Center,
Vector  box2HalfSize 

Box intersects box.

◆ capsuleHitsBox()

static bool capsuleHitsBox ( Vector  capsuleStart,
Vector  capsuleEnd,
float  capsuleRadius,
Vector  boxCenter,
Vector  boxHalfSize 

Capsule intersects box.

◆ capsuleHitsCapsule()

static bool capsuleHitsCapsule ( Vector  capsule1Start,
Vector  capsule1End,
float  capsule1Radius,
Vector  capsule2Start,
Vector  capsule2End,
float  capsule2Radius 

Capsule intersects another capsule.

◆ sphereHitsBox()

static bool sphereHitsBox ( Vector  sphereCenter,
float  sphereRadius,
Vector  boxCenter,
Vector  boxHalfSize 

Sphere intersects box.

◆ sphereHitsSphere()

static bool sphereHitsSphere ( Vector  sphere1Center,
float  sphere1Radius,
Vector  sphere2Center,
float  sphere2Radius 

Spheres intersects another sphere.

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