Collision class
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 SingletonPool. Should not be finalructed.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- results2 → EdgeResults
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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.
-
findIncidentEdge(
List< 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.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
testOverlap(
Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB) → bool - Determine if two generic shapes overlap.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clipSegmentToLine(
List< ClipVertex> vOut, List<ClipVertex> vIn, Vector2 normal, double offset, int vertexIndexA) → int - Clipping for contact manifolds. Sutherland-Hodgman clipping.
-
computePointStates(
List< PointState> state1, List<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.
Constants
- nullFeature → const int