C# Class Project290.Physics.Collision.Collision

ファイルを表示 Open project: scastle/Solitude

Public Methods

Method Description
CollideCircles ( Manifold &manifold, CircleShape circleA, Transform &xfA, CircleShape circleB, Transform &xfB ) : void
CollideEdgeAndCircle ( Manifold &manifold, EdgeShape edgeA, Transform &transformA, CircleShape circleB, Transform &transformB ) : void

Compute contact points for edge versus circle. This accounts for edge connectivity.

CollideEdgeAndPolygon ( Manifold &manifold, EdgeShape edgeA, Transform &xfA, PolygonShape polygonB, Transform &xfB ) : void

Collides and edge and a polygon, taking into account edge adjacency.

CollidePolygonAndCircle ( Manifold &manifold, PolygonShape polygonA, Transform &transformA, CircleShape circleB, Transform &transformB ) : void

Compute the collision manifold between a polygon and a circle.

CollidePolygons ( Manifold &manifold, PolygonShape polyA, Transform &transformA, PolygonShape polyB, Transform &transformB ) : void

Compute the collision manifold between two polygons.

GetPointStates ( FixedArray2 &state1, FixedArray2 &state2, Manifold &manifold1, Manifold &manifold2 ) : void
GetWorldManifold ( Manifold &manifold, Transform &transformA, float radiusA, Transform &transformB, float radiusB, Vector2 &normal, FixedArray2 &points ) : void

Evaluate the manifold with supplied transforms. This assumes modest motion from the original state. This does not change the point count, impulses, etc. The radii must come from the Shapes that generated the manifold.

Private Methods

Method Description
ClipSegmentToLine ( FixedArray2 &vOut, FixedArray2 &vIn, Vector2 normal, float offset, int vertexIndexA ) : int

Clipping for contact manifolds.

ComputeEdgeSeparation ( ) : EPAxis
ComputePolygonSeparation ( ) : EPAxis
EdgeSeparation ( PolygonShape poly1, Transform &xf1, int edge1, PolygonShape poly2, Transform &xf2 ) : float

Find the separation between poly1 and poly2 for a give edge normal on poly1.

FindIncidentEdge ( FixedArray2 &c, EPProxy proxy1, int edge1, EPProxy proxy2 ) : void
FindIncidentEdge ( FixedArray2 &c, PolygonShape poly1, Transform &xf1, int edge1, PolygonShape poly2, Transform &xf2 ) : void
FindMaxSeparation ( int &edgeIndex, PolygonShape poly1, Transform &xf1, PolygonShape poly2, Transform &xf2 ) : float

Find the max separation between poly1 and poly2 using edge normals from poly1.

Method Details

CollideCircles() public static method

public static CollideCircles ( Manifold &manifold, CircleShape circleA, Transform &xfA, CircleShape circleB, Transform &xfB ) : void
manifold Manifold
circleA Project290.Physics.Collision.Shapes.CircleShape
xfA Transform
circleB Project290.Physics.Collision.Shapes.CircleShape
xfB Transform
return void

CollideEdgeAndCircle() public static method

Compute contact points for edge versus circle. This accounts for edge connectivity.
public static CollideEdgeAndCircle ( Manifold &manifold, EdgeShape edgeA, Transform &transformA, CircleShape circleB, Transform &transformB ) : void
manifold Manifold The manifold.
edgeA Project290.Physics.Collision.Shapes.EdgeShape The edge A.
transformA Transform The transform A.
circleB Project290.Physics.Collision.Shapes.CircleShape The circle B.
transformB Transform The transform B.
return void

CollideEdgeAndPolygon() public static method

Collides and edge and a polygon, taking into account edge adjacency.
public static CollideEdgeAndPolygon ( Manifold &manifold, EdgeShape edgeA, Transform &xfA, PolygonShape polygonB, Transform &xfB ) : void
manifold Manifold The manifold.
edgeA Project290.Physics.Collision.Shapes.EdgeShape The edge A.
xfA Transform The xf A.
polygonB Project290.Physics.Collision.Shapes.PolygonShape The polygon B.
xfB Transform The xf B.
return void

CollidePolygonAndCircle() public static method

Compute the collision manifold between a polygon and a circle.
public static CollidePolygonAndCircle ( Manifold &manifold, PolygonShape polygonA, Transform &transformA, CircleShape circleB, Transform &transformB ) : void
manifold Manifold The manifold.
polygonA Project290.Physics.Collision.Shapes.PolygonShape The polygon A.
transformA Transform The transform of A.
circleB Project290.Physics.Collision.Shapes.CircleShape The circle B.
transformB Transform The transform of B.
return void

CollidePolygons() public static method

Compute the collision manifold between two polygons.
public static CollidePolygons ( Manifold &manifold, PolygonShape polyA, Transform &transformA, PolygonShape polyB, Transform &transformB ) : void
manifold Manifold The manifold.
polyA Project290.Physics.Collision.Shapes.PolygonShape The poly A.
transformA Transform The transform A.
polyB Project290.Physics.Collision.Shapes.PolygonShape The poly B.
transformB Transform The transform B.
return void

GetPointStates() public static method

public static GetPointStates ( FixedArray2 &state1, FixedArray2 &state2, Manifold &manifold1, Manifold &manifold2 ) : void
state1 FixedArray2
state2 FixedArray2
manifold1 Manifold
manifold2 Manifold
return void

GetWorldManifold() public static method

Evaluate the manifold with supplied transforms. This assumes modest motion from the original state. This does not change the point count, impulses, etc. The radii must come from the Shapes that generated the manifold.
public static GetWorldManifold ( Manifold &manifold, Transform &transformA, float radiusA, Transform &transformB, float radiusB, Vector2 &normal, FixedArray2 &points ) : void
manifold Manifold The manifold.
transformA Transform The transform for A.
radiusA float The radius for A.
transformB Transform The transform for B.
radiusB float The radius for B.
normal Vector2 World vector pointing from A to B
points FixedArray2 Torld contact point (point of intersection).
return void