Broadphase class

Base class for broadphase implementations @author schteppe

Implementers

Constructors

Broadphase({World? world, bool useBoundingBoxes = false, bool dirty = true})

Properties

bscDist Vec3
final
dirty bool
Set to true if the objects in the world moved.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useBoundingBoxes bool
If set to true, the broadphase uses bounding boxes for intersection tests, else it uses bounding spheres.
getter/setter pair
world World?
The world to search for collisions in.
getter/setter pair

Methods

aabbQuery(World world, AABB aabb, List<Body> result) List<Body>
Returns all the bodies within the AABB.
boundingSphereCheck(Body bodyA, Body bodyB) bool
Check if the bounding spheres of two bodies overlap.
collisionPairs(World world, List<Body> p1, List<Body> p2) → void
Get the collision pairs from the world world The world to search in p1 Empty array to be filled with body objects p2 Empty array to be filled with body objects
doBoundingBoxBroadphase(Body bodyA, Body bodyB, List<Body> pairs1, List<Body> pairs2) → void
Check if the bounding boxes of two bodies are intersecting.
doBoundingSphereBroadphase(Body bodyA, Body bodyB, List<Body> pairs1, List<Body> pairs2) → void
Check if the bounding spheres of two bodies are intersecting. pairs1 bodyA is appended to this array if intersection pairs2 bodyB is appended to this array if intersection
intersectionTest(Body bodyA, Body bodyB, List<Body> pairs1, List<Body> pairs2) → void
Check if the bounding volumes of two bodies intersect.
makePairsUnique(List<Body> pairs1, List<Body> pairs2) → void
Removes duplicate pairs from the pair arrays.
needBroadphaseCollision(Body bodyA, Body bodyB) bool
Check if a body pair needs to be intersection tested at all.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setWorld(World world) → void
To be implemented by subcasses
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited