C# Класс FarseerPhysics.Collision.Collision

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

collideCircles() публичный статический Метод

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
Результат void

collideEdgeAndCircle() публичный статический Метод

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.
Результат void

collideEdgeAndPolygon() публичный статический Метод

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.
Результат void

collidePolygonAndCircle() публичный статический Метод

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.
Результат void

collidePolygons() публичный статический Метод

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.
Результат void

getPointStates() публичный статический Метод

public static getPointStates ( FixedArray2 &state1, FixedArray2 &state2, Manifold &manifold1, Manifold &manifold2 ) : void
state1 FixedArray2
state2 FixedArray2
manifold1 Manifold
manifold2 Manifold
Результат void

testOverlap() публичный статический Метод

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.
Результат bool