C# Class FarseerPhysics.Collision.Collision

Mostra file Open project: prime31/Nez Class Usage Examples

Public Methods

Method Description
collideCircles ( Manifold &manifold, CircleShape circleA, Transform &xfA, CircleShape circleB, Transform &xfB ) : void

Compute the collision manifold between two circles.

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 &xfA, CircleShape circleB, Transform &xfB ) : 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
testOverlap ( Shape shapeA, int indexA, Shape shapeB, int indexB, Transform &xfA, Transform &xfB ) : bool

Test overlap between the two shapes.

Private Methods

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

Clipping for contact manifolds.

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, 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

Compute the collision manifold between two circles.
public static collideCircles ( Manifold &manifold, CircleShape circleA, Transform &xfA, CircleShape circleB, Transform &xfB ) : void
manifold Manifold
circleA FarseerPhysics.Collision.Shapes.CircleShape
xfA UnityEngine.Transform
circleB FarseerPhysics.Collision.Shapes.CircleShape
xfB UnityEngine.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 FarseerPhysics.Collision.Shapes.EdgeShape The edge A.
transformA UnityEngine.Transform The transform A.
circleB FarseerPhysics.Collision.Shapes.CircleShape The circle B.
transformB UnityEngine.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 FarseerPhysics.Collision.Shapes.EdgeShape The edge A.
xfA UnityEngine.Transform The xf A.
polygonB FarseerPhysics.Collision.Shapes.PolygonShape The polygon B.
xfB UnityEngine.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 &xfA, CircleShape circleB, Transform &xfB ) : void
manifold Manifold The manifold.
polygonA FarseerPhysics.Collision.Shapes.PolygonShape The polygon A.
xfA UnityEngine.Transform The transform of A.
circleB FarseerPhysics.Collision.Shapes.CircleShape The circle B.
xfB UnityEngine.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 FarseerPhysics.Collision.Shapes.PolygonShape The poly A.
transformA UnityEngine.Transform The transform A.
polyB FarseerPhysics.Collision.Shapes.PolygonShape The poly B.
transformB UnityEngine.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

testOverlap() public static method

Test overlap between the two shapes.
public static testOverlap ( Shape shapeA, int indexA, Shape shapeB, int indexB, Transform &xfA, Transform &xfB ) : bool
shapeA FarseerPhysics.Collision.Shapes.Shape The first shape.
indexA int The index for the first shape.
shapeB FarseerPhysics.Collision.Shapes.Shape The second shape.
indexB int The index for the second shape.
xfA UnityEngine.Transform The transform for the first shape.
xfB UnityEngine.Transform The transform for the seconds shape.
return bool