Collision
Declaration
public static class tainicom.Aether.Physics2D.Collision.Collision
Collision methods
Methods
TestOverlap static
Test overlap between the two shapes.
bool TestOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB, ref Transform xfA, ref Transform xfB)
Parameters:
| Name | Type | Description |
|---|---|---|
shapeA |
tainicom.Aether.Physics2D.Collision.Shapes.Shape |
The first shape. |
indexA |
System.Int32 |
The index for the first shape. |
shapeB |
tainicom.Aether.Physics2D.Collision.Shapes.Shape |
The second shape. |
indexB |
System.Int32 |
The index for the second shape. |
xfA |
ref tainicom.Aether.Physics2D.Common.Transform |
The transform for the first shape. |
xfB |
ref tainicom.Aether.Physics2D.Common.Transform |
The transform for the seconds shape. |
GetPointStates static
void GetPointStates(out FixedArray2<PointState> state1, out FixedArray2<PointState> state2, ref Manifold manifold1, ref Manifold manifold2)
Parameters:
| Name | Type | Description |
|---|---|---|
state1 |
out tainicom.Aether.Physics2D.Common.FixedArray2 |
|
state2 |
out tainicom.Aether.Physics2D.Common.FixedArray2 |
|
manifold1 |
ref tainicom.Aether.Physics2D.Collision.Manifold |
|
manifold2 |
ref tainicom.Aether.Physics2D.Collision.Manifold |
CollideCircles static
Compute the collision manifold between two circles.
void CollideCircles(ref Manifold manifold, CircleShape circleA, ref Transform xfA, CircleShape circleB, ref Transform xfB)
Parameters:
| Name | Type | Description |
|---|---|---|
manifold |
ref tainicom.Aether.Physics2D.Collision.Manifold |
|
circleA |
tainicom.Aether.Physics2D.Collision.Shapes.CircleShape |
|
xfA |
ref tainicom.Aether.Physics2D.Common.Transform |
|
circleB |
tainicom.Aether.Physics2D.Collision.Shapes.CircleShape |
|
xfB |
ref tainicom.Aether.Physics2D.Common.Transform |
CollidePolygonAndCircle static
Compute the collision manifold between a polygon and a circle.
void CollidePolygonAndCircle(ref Manifold manifold, PolygonShape polygonA, ref Transform xfA, CircleShape circleB, ref Transform xfB)
Parameters:
| Name | Type | Description |
|---|---|---|
manifold |
ref tainicom.Aether.Physics2D.Collision.Manifold |
The manifold. |
polygonA |
tainicom.Aether.Physics2D.Collision.Shapes.PolygonShape |
The polygon A. |
xfA |
ref tainicom.Aether.Physics2D.Common.Transform |
The transform of A. |
circleB |
tainicom.Aether.Physics2D.Collision.Shapes.CircleShape |
The circle B. |
xfB |
ref tainicom.Aether.Physics2D.Common.Transform |
The transform of B. |
CollidePolygons static
Compute the collision manifold between two polygons.
void CollidePolygons(ref Manifold manifold, PolygonShape polyA, ref Transform transformA, PolygonShape polyB, ref Transform transformB)
Parameters:
| Name | Type | Description |
|---|---|---|
manifold |
ref tainicom.Aether.Physics2D.Collision.Manifold |
The manifold. |
polyA |
tainicom.Aether.Physics2D.Collision.Shapes.PolygonShape |
The poly A. |
transformA |
ref tainicom.Aether.Physics2D.Common.Transform |
The transform A. |
polyB |
tainicom.Aether.Physics2D.Collision.Shapes.PolygonShape |
The poly B. |
transformB |
ref tainicom.Aether.Physics2D.Common.Transform |
The transform B. |
CollideEdgeAndCircle static
Compute contact points for edge versus circle. This accounts for edge connectivity.
void CollideEdgeAndCircle(ref Manifold manifold, EdgeShape edgeA, ref Transform transformA, CircleShape circleB, ref Transform transformB)
Parameters:
| Name | Type | Description |
|---|---|---|
manifold |
ref tainicom.Aether.Physics2D.Collision.Manifold |
The manifold. |
edgeA |
tainicom.Aether.Physics2D.Collision.Shapes.EdgeShape |
The edge A. |
transformA |
ref tainicom.Aether.Physics2D.Common.Transform |
The transform A. |
circleB |
tainicom.Aether.Physics2D.Collision.Shapes.CircleShape |
The circle B. |
transformB |
ref tainicom.Aether.Physics2D.Common.Transform |
The transform B. |
CollideEdgeAndPolygon static
Collides and edge and a polygon, taking into account edge adjacency.
void CollideEdgeAndPolygon(ref Manifold manifold, EdgeShape edgeA, ref Transform xfA, PolygonShape polygonB, ref Transform xfB)
Parameters:
| Name | Type | Description |
|---|---|---|
manifold |
ref tainicom.Aether.Physics2D.Collision.Manifold |
The manifold. |
edgeA |
tainicom.Aether.Physics2D.Collision.Shapes.EdgeShape |
The edge A. |
xfA |
ref tainicom.Aether.Physics2D.Common.Transform |
The xf A. |
polygonB |
tainicom.Aether.Physics2D.Collision.Shapes.PolygonShape |
The polygon B. |
xfB |
ref tainicom.Aether.Physics2D.Common.Transform |
The xf B. |