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 {@link SingletonPool}. Should not be finalructed.


Collision(IWorldPool _pool)


results2 → _EdgeResults
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


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. [...]
testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB) bool
Determine if two generic shapes overlap. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.


operator ==(dynamic other) bool
The equality operator. [...]

Static Methods

clipSegmentToLine(List<ClipVertex> vOut, List<ClipVertex> vIn, Vector2 normal, double offset, int vertexIndexA) int
Clipping for contact manifolds. Sutherland-Hodgman clipping. [...]
getPointStates(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. [...]


NULL_FEATURE → const int