org.jbox2d.collision.shapes
Class CollidePoly

java.lang.Object
  extended by org.jbox2d.collision.shapes.CollidePoly

public class CollidePoly
extends Object

Polygon overlap solver - for internal use.


Constructor Summary
CollidePoly()
           
 
Method Summary
static int clipSegmentToLine(org.jbox2d.collision.shapes.CollidePoly.ClipVertex[] vOut, org.jbox2d.collision.shapes.CollidePoly.ClipVertex[] vIn, Vec2 normal, float offset)
           
static void collidePolyAndEdge(Manifold manifold, PolygonShape polygon, XForm xf1, EdgeShape edge, XForm xf2)
          puts collision information into the manifold about a collision between a polygon and an edge
static void collidePolygonAndPoint(Manifold manifold, PolygonShape polygon, XForm xf1, PointShape point, XForm xf2)
          puts collision information into the manifold about the collision between a polygon and a point
static void collidePolygons(Manifold manif, PolygonShape polyA, XForm xfA, PolygonShape polyB, XForm xfB)
           
static float edgeSeparation(PolygonShape poly1, XForm xf1, int edge1, PolygonShape poly2, XForm xf2)
           
static void findIncidentEdge(org.jbox2d.collision.shapes.CollidePoly.ClipVertex[] c, PolygonShape poly1, XForm xf1, int edge1, PolygonShape poly2, XForm xf2)
           
static org.jbox2d.collision.shapes.MaxSeparation findMaxSeparation(PolygonShape poly1, XForm xf1, PolygonShape poly2, XForm xf2)
          Find the max separation between poly1 and poly2 using face normals from poly1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollidePoly

public CollidePoly()
Method Detail

clipSegmentToLine

public static final int clipSegmentToLine(org.jbox2d.collision.shapes.CollidePoly.ClipVertex[] vOut,
                                          org.jbox2d.collision.shapes.CollidePoly.ClipVertex[] vIn,
                                          Vec2 normal,
                                          float offset)

edgeSeparation

public static final float edgeSeparation(PolygonShape poly1,
                                         XForm xf1,
                                         int edge1,
                                         PolygonShape poly2,
                                         XForm xf2)

findMaxSeparation

public static final org.jbox2d.collision.shapes.MaxSeparation findMaxSeparation(PolygonShape poly1,
                                                                                XForm xf1,
                                                                                PolygonShape poly2,
                                                                                XForm xf2)
Find the max separation between poly1 and poly2 using face normals from poly1.

Parameters:
poly1 -
xf1 -
poly2 -
xf2 -
Returns:

findIncidentEdge

public static final void findIncidentEdge(org.jbox2d.collision.shapes.CollidePoly.ClipVertex[] c,
                                          PolygonShape poly1,
                                          XForm xf1,
                                          int edge1,
                                          PolygonShape poly2,
                                          XForm xf2)

collidePolygons

public static final void collidePolygons(Manifold manif,
                                         PolygonShape polyA,
                                         XForm xfA,
                                         PolygonShape polyB,
                                         XForm xfB)

collidePolygonAndPoint

public static final void collidePolygonAndPoint(Manifold manifold,
                                                PolygonShape polygon,
                                                XForm xf1,
                                                PointShape point,
                                                XForm xf2)
puts collision information into the manifold about the collision between a polygon and a point

Parameters:
manifold -
polygon -
xf1 -
point -
xf2 -

collidePolyAndEdge

public static final void collidePolyAndEdge(Manifold manifold,
                                            PolygonShape polygon,
                                            XForm xf1,
                                            EdgeShape edge,
                                            XForm xf2)
puts collision information into the manifold about a collision between a polygon and an edge

Parameters:
manifold -
polygon -
xf1 -
edge -
xf2 -