net.java.dev.joode.collision.collider
Class RayRectangleCollider

java.lang.Object
  extended by net.java.dev.joode.collision.collider.RayRectangleCollider
All Implemented Interfaces:
Collider

public class RayRectangleCollider
extends java.lang.Object
implements Collider

NOT A PROPER COLLIDER!!! todo At the moment only works with 2D rays (no x or y component, and used for picking 2D scenes)

Author:
Tom Larkworthy

Field Summary
static ParametricSegment2D[] e
           
static RayRectangleCollider INSTANCE
           
static Vector2[] intersections
           
static Vector2[] pts
           
static ParametricSegment2D ray2D
           
 
Method Summary
 int collide(Geom o1, Geom o2, int flags, ContactGeom[] contact, int contactIndex, int skip)
           
 int collideRayRectangle(Ray ray, Rectangle rect, ContactGeom[] contacts, int contacIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final RayRectangleCollider INSTANCE

ray2D

public static final ParametricSegment2D ray2D

e

public static final ParametricSegment2D[] e

pts

public static final Vector2[] pts

intersections

public static final Vector2[] intersections
Method Detail

collide

public int collide(Geom o1,
                   Geom o2,
                   int flags,
                   ContactGeom[] contact,
                   int contactIndex,
                   int skip)
Specified by:
collide in interface Collider

collideRayRectangle

public int collideRayRectangle(Ray ray,
                               Rectangle rect,
                               ContactGeom[] contacts,
                               int contacIndex)