GridBroadphase class

Axis aligned uniform grid broadphase. @todo Needs support for more than just planes and spheres.

Inheritance

Constructors

GridBroadphase([Vec3? aabbMin, Vec3? aabbMax, int nx = 10, int ny = 10, int nz = 10])
nx Number of boxes along x. ny Number of boxes along y. nz Number of boxes along z.

Properties

aabbMax Vec3
aabbMax
getter/setter pair
aabbMin Vec3
aabbMin
getter/setter pair
binLengths List<int>
binLengths
getter/setter pair
bins List<List<Body>>
bins
getter/setter pair
bscDist Vec3
finalinherited
dirty bool
Set to true if the objects in the world moved.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
nx int
Number of boxes along x
getter/setter pair
ny int
Number of boxes along y
getter/setter pair
nz int
Number of boxes along z
getter/setter pair
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 pairinherited
world World?
The world to search for collisions in.
getter/setter pairinherited

Methods

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

Operators

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