public final class Collision extends Object
IWorldPool.
Should not be constructed.| Modifier and Type | Class and Description |
|---|---|
static class |
Collision.ClipVertex
Used for computing contact manifolds.
|
| Constructor and Description |
|---|
Collision(IWorldPool pool) |
| Modifier and Type | Method and Description |
|---|---|
static int |
clipSegmentToLine(Collision.ClipVertex[] vOut,
Collision.ClipVertex[] vIn,
Vec2 normal,
float offset,
int vertexIndexA)
Clipping for contact manifolds.
|
void |
collideCircles(Manifold manifold,
CircleShape circle1,
Transform xfA,
CircleShape circle2,
Transform xfB)
Compute the collision manifold between two circles.
|
void |
collideEdgeAndCircle(Manifold manifold,
EdgeShape edgeA,
Transform xfA,
CircleShape circleB,
Transform xfB) |
void |
collideEdgeAndPolygon(Manifold manifold,
EdgeShape edgeA,
Transform xfA,
PolygonShape polygonB,
Transform xfB) |
void |
collidePolygonAndCircle(Manifold manifold,
PolygonShape polygon,
Transform xfA,
CircleShape circle,
Transform xfB)
Compute the collision manifold between a polygon and a circle.
|
void |
collidePolygons(Manifold manifold,
PolygonShape polyA,
Transform xfA,
PolygonShape polyB,
Transform xfB)
Compute the collision manifold between two polygons.
|
void |
findIncidentEdge(Collision.ClipVertex[] c,
PolygonShape poly1,
Transform xf1,
int edge1,
PolygonShape poly2,
Transform xf2) |
void |
findMaxSeparation(com.almasb.fxgl.physics.box2d.collision.Collision.EdgeResults results,
PolygonShape poly1,
Transform xf1,
PolygonShape poly2,
Transform xf2)
Find the max separation between poly1 and poly2 using edge normals from poly1.
|
boolean |
testOverlap(Shape shapeA,
int indexA,
Shape shapeB,
int indexB,
Transform xfA,
Transform xfB)
Determine if two generic shapes overlap.
|
public Collision(IWorldPool pool)
public boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB)
public static final int clipSegmentToLine(Collision.ClipVertex[] vOut, Collision.ClipVertex[] vIn, Vec2 normal, float offset, int vertexIndexA)
public void collideCircles(Manifold manifold, CircleShape circle1, Transform xfA, CircleShape circle2, Transform xfB)
public void collidePolygonAndCircle(Manifold manifold, PolygonShape polygon, Transform xfA, CircleShape circle, Transform xfB)
manifold - polygon - xfA - circle - xfB - public void findIncidentEdge(Collision.ClipVertex[] c, PolygonShape poly1, Transform xf1, int edge1, PolygonShape poly2, Transform xf2)
public void collidePolygons(Manifold manifold, PolygonShape polyA, Transform xfA, PolygonShape polyB, Transform xfB)
public void findMaxSeparation(com.almasb.fxgl.physics.box2d.collision.Collision.EdgeResults results,
PolygonShape poly1,
Transform xf1,
PolygonShape poly2,
Transform xf2)
public void collideEdgeAndCircle(Manifold manifold, EdgeShape edgeA, Transform xfA, CircleShape circleB, Transform xfB)
public void collideEdgeAndPolygon(Manifold manifold, EdgeShape edgeA, Transform xfA, PolygonShape polygonB, Transform xfB)
Copyright © 2018. All rights reserved.