C# Class FarseerPhysics.Collision.Collision

Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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
Résultat void

collideEdgeAndCircle() public static méthode

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.
Résultat void

collideEdgeAndPolygon() public static méthode

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.
Résultat void

collidePolygonAndCircle() public static méthode

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.
Résultat void

collidePolygons() public static méthode

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.
Résultat void

getPointStates() public static méthode

public static getPointStates ( FixedArray2 &state1, FixedArray2 &state2, Manifold &manifold1, Manifold &manifold2 ) : void
state1 FixedArray2
state2 FixedArray2
manifold1 Manifold
manifold2 Manifold
Résultat void

testOverlap() public static méthode

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.
Résultat bool