C# Class 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.
Datei anzeigen Open project: gerich-home/box2dnet

Public Properties

Property Type Description
NULL_FEATURE int

Public Methods

Method Description
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.

Method Details

ClipSegmentToLine() public static method

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
return int

CollideCircles() public method

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
return void

CollideEdgeAndCircle() public method

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
return void

CollideEdgeAndPolygon() public method

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
return void

CollidePolygonAndCircle() public method

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
return void

CollidePolygons() public method

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
return void

Collision() public method

public Collision ( IWorldPool argPool ) : System
argPool IWorldPool
return System

EdgeSeparation() public method

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 ///
return float

FindIncidentEdge() public method

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
return void

FindMaxSeparation() public method

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
return void

GetPointStates() public static method

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
return void

TestOverlap() public method

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
return bool

Property Details

NULL_FEATURE public_oe static_oe property

public static int NULL_FEATURE
return int