DefaultBroadPhaseBuffer class

The broad-phase is used for computing pairs and performing volume queries and ray casts. This broad-phase does not persist pairs. Instead, this reports potentially new pairs. It is up to the client to consume the new pairs and to track subsequent overlap.

Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
proxyCount int
Get the number of proxies.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createProxy(AABB aabb, Object? userData) int
Create a proxy with an initial AABB. Pairs are not reported until updatePairs is called.
override
destroyProxy(int proxyId) → void
Destroy a proxy. It is up to the client to remove any pairs.
override
drawTree(DebugDraw argDraw) → void
override
fatAABB(int proxyId) AABB
override
getTreeBalance() int
override
getTreeHeight() int
Get the height of the embedded tree.
override
getTreeQuality() double
override
getUserData(int proxyId) Object?
override
moveProxy(int proxyId, AABB aabb, Vector2 displacement) → void
Call MoveProxy as many times as you like, then when you are done call updatePairs to finalized the proxy pairs (for your time step).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(TreeCallback callback, AABB aabb) → void
Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB.
override
raycast(TreeRayCastCallback callback, RayCastInput input) → void
Ray-cast against the proxies in the tree. This relies on the callback to perform a exact ray-cast in the case were the proxy contains a shape. The callback also performs the any collision filtering. This has performance roughly equal to k * log(n), where k is the number of collisions and n is the number of proxies in the tree.
override
testOverlap(int proxyIdA, int proxyIdB) bool
override
toString() String
A string representation of this object.
inherited
touchProxy(int proxyId) → void
override
treeCallback(int proxyId) bool
This is called from DynamicTree.query when we are gathering pairs.
override
updatePairs(PairCallback callback) → void
Update the pairs. This results in pair callbacks. This can only add pairs.
override

Operators

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