Packagecom.fileitup.fisixengine.collisions
Classpublic final class DetectionModes

Holds constants used to set Collision Detection Modes.


Example
The following example demonstrates how to set an object's collision detection mode
  import com.fileitup.fisixengine.collisions.  import com.fileitup.fisixengine.core.  import com.fileitup.fisixengine.particles.  
  var myEngine:FisixEngine = new FisixEngine()
  var p:CircleParticle = myEngine.newCircleParticle(100,100,10)
  
  p.setDetectionMode(DetectionModes.HYBRID_VELOCITY)
  
  



Public Constants
 ConstantDefined by
  HYBRID_RAYCAST : int = 3
[static]This is a happy medium between PENETRATION and RAYCAST.
DetectionModes
  LIMIT_VELOCITY : int = 1
[static]Similar to PENETRATION but limits objects' velocities to the magnitude of their radius in order to prevent tunneling.
This method reduces physical accuracy, but is fairly quick.
DetectionModes
  PENETRATION : int = 0
[static]This is the simplest and fastest collision detection mode.
DetectionModes
  RAYCAST : int = 2
[static]Uses the object's last position to find out if a collision occured at any time between the last timestep.
This method prevents tunneling, but is also much slower than simple penetration--Use discretely
DetectionModes
Constant detail
HYBRID_RAYCASTconstant
public static const HYBRID_RAYCAST:int = 3

This is a happy medium between PENETRATION and RAYCAST. it only raycasts when the velocity of the object is greater than it's radius.
This method is much faster than regular raycasting, but is a bit less accurate. Tunneling may occur in some cases.

LIMIT_VELOCITYconstant 
public static const LIMIT_VELOCITY:int = 1

Similar to PENETRATION but limits objects' velocities to the magnitude of their radius in order to prevent tunneling.
This method reduces physical accuracy, but is fairly quick. Usually best with larger objects.

PENETRATIONconstant 
public static const PENETRATION:int = 0

This is the simplest and fastest collision detection mode. Use it whenever possible for faster simulations.
This mode does not prevent tunneling (fast moving objects moving through other objects

RAYCASTconstant 
public static const RAYCAST:int = 2

Uses the object's last position to find out if a collision occured at any time between the last timestep.
This method prevents tunneling, but is also much slower than simple penetration--Use discretely