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

Functions used for computing contact points, distance queries, and TOI queries. Collision methods are non-static for pooling speed, retrieve a collision object from the {@link SingletonPool}. Should not be constructed.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
NULL_FEATURE int

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

Метод Описание
ClipSegmentToLine ( ClipVertex vOut, ClipVertex vIn, Vec2 normal, float offset, int vertexIndexA ) : int

Clipping for contact manifolds. Sutherland-Hodgman clipping.

CollideCircles ( Manifold manifold, CircleShape circle1, Transform xfA, CircleShape circle2, Transform xfB ) : void

Compute the collision manifold between two circles.

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 ) : void

Compute the collision manifold between a polygon and a circle.

CollidePolygons ( Manifold manifold, PolygonShape polyA, Transform xfA, PolygonShape polyB, Transform xfB ) : void

Compute the collision manifold between two polygons.

Collision ( IWorldPool argPool ) : System
EdgeSeparation ( PolygonShape poly1, Transform xf1, int edge1, PolygonShape poly2, Transform xf2 ) : float

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

FindIncidentEdge ( ClipVertex c, PolygonShape poly1, Transform xf1, int edge1, PolygonShape poly2, Transform xf2 ) : void
FindMaxSeparation ( EdgeResults results, PolygonShape poly1, Transform xf1, PolygonShape poly2, Transform xf2 ) : void

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

GetPointStates ( PointState state1, PointState state2, Manifold manifold1, Manifold manifold2 ) : void

Compute the point states given two manifolds. The states pertain to the transition from manifold1 to manifold2. So state1 is either persist or remove while state2 is either add or persist.

TestOverlap ( Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB ) : bool

Determine if two generic shapes overlap.

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

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

Clipping for contact manifolds. Sutherland-Hodgman clipping.
public static ClipSegmentToLine ( ClipVertex vOut, ClipVertex vIn, Vec2 normal, float offset, int vertexIndexA ) : int
vOut ClipVertex
vIn ClipVertex
normal Box2D.Common.Vec2
offset float
vertexIndexA int
Результат int

CollideCircles() публичный метод

Compute the collision manifold between two circles.
public CollideCircles ( Manifold manifold, CircleShape circle1, Transform xfA, CircleShape circle2, Transform xfB ) : void
manifold Manifold
circle1 Box2D.Collision.Shapes.CircleShape
xfA Box2D.Common.Transform
circle2 Box2D.Collision.Shapes.CircleShape
xfB Box2D.Common.Transform
Результат void

CollideEdgeAndCircle() публичный метод

public CollideEdgeAndCircle ( Manifold manifold, EdgeShape edgeA, Transform xfA, CircleShape circleB, Transform xfB ) : void
manifold Manifold
edgeA Box2D.Collision.Shapes.EdgeShape
xfA Box2D.Common.Transform
circleB Box2D.Collision.Shapes.CircleShape
xfB Box2D.Common.Transform
Результат void

CollideEdgeAndPolygon() публичный метод

public CollideEdgeAndPolygon ( Manifold manifold, EdgeShape edgeA, Transform xfA, PolygonShape polygonB, Transform xfB ) : void
manifold Manifold
edgeA Box2D.Collision.Shapes.EdgeShape
xfA Box2D.Common.Transform
polygonB Box2D.Collision.Shapes.PolygonShape
xfB Box2D.Common.Transform
Результат void

CollidePolygonAndCircle() публичный метод

Compute the collision manifold between a polygon and a circle.
public CollidePolygonAndCircle ( Manifold manifold, PolygonShape polygon, Transform xfA, CircleShape circle, Transform xfB ) : void
manifold Manifold
polygon Box2D.Collision.Shapes.PolygonShape
xfA Box2D.Common.Transform
circle Box2D.Collision.Shapes.CircleShape
xfB Box2D.Common.Transform
Результат void

CollidePolygons() публичный метод

Compute the collision manifold between two polygons.
public CollidePolygons ( Manifold manifold, PolygonShape polyA, Transform xfA, PolygonShape polyB, Transform xfB ) : void
manifold Manifold
polyA Box2D.Collision.Shapes.PolygonShape
xfA Box2D.Common.Transform
polyB Box2D.Collision.Shapes.PolygonShape
xfB Box2D.Common.Transform
Результат void

Collision() публичный метод

public Collision ( IWorldPool argPool ) : System
argPool IWorldPool
Результат System

EdgeSeparation() публичный метод

Find the separation between poly1 and poly2 for a given edge normal on poly1.
public EdgeSeparation ( PolygonShape poly1, Transform xf1, int edge1, PolygonShape poly2, Transform xf2 ) : float
poly1 Box2D.Collision.Shapes.PolygonShape ///
xf1 Box2D.Common.Transform ///
edge1 int ///
poly2 Box2D.Collision.Shapes.PolygonShape ///
xf2 Box2D.Common.Transform ///
Результат float

FindIncidentEdge() публичный метод

public FindIncidentEdge ( ClipVertex c, PolygonShape poly1, Transform xf1, int edge1, PolygonShape poly2, Transform xf2 ) : void
c ClipVertex
poly1 Box2D.Collision.Shapes.PolygonShape
xf1 Box2D.Common.Transform
edge1 int
poly2 Box2D.Collision.Shapes.PolygonShape
xf2 Box2D.Common.Transform
Результат void

FindMaxSeparation() публичный метод

Find the max separation between poly1 and poly2 using edge normals from poly1.
public FindMaxSeparation ( EdgeResults results, PolygonShape poly1, Transform xf1, PolygonShape poly2, Transform xf2 ) : void
results EdgeResults
poly1 Box2D.Collision.Shapes.PolygonShape
xf1 Box2D.Common.Transform
poly2 Box2D.Collision.Shapes.PolygonShape
xf2 Box2D.Common.Transform
Результат void

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

Compute the point states given two manifolds. The states pertain to the transition from manifold1 to manifold2. So state1 is either persist or remove while state2 is either add or persist.
public static GetPointStates ( PointState state1, PointState state2, Manifold manifold1, Manifold manifold2 ) : void
state1 PointState
state2 PointState
manifold1 Manifold
manifold2 Manifold
Результат void

TestOverlap() публичный метод

Determine if two generic shapes overlap.
public TestOverlap ( Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB ) : bool
shapeA Box2D.Collision.Shapes.Shape
indexA int
shapeB Box2D.Collision.Shapes.Shape
indexB int
xfA Box2D.Common.Transform
xfB Box2D.Common.Transform
Результат bool

Описание свойств

NULL_FEATURE публичное статическое свойство

public static int NULL_FEATURE
Результат int