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.

@author Daniel Murphy

Implemented types

Constructors

DefaultBroadPhaseBuffer(BroadPhaseStrategy strategy)

Properties

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

Methods

bufferMove(int proxyId) → void
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
getFatAABB(int proxyId) AABB
override
getProxyCount() int
Get the number of proxies. [...]
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
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
touchProxy(int proxyId) → void
override
treeCallback(int proxyId) bool
This is called from DynamicTree::query when we are gathering pairs.
override
unbufferMove(int proxyId) → void
updatePairs(PairCallback callback) → void
Update the pairs. This results in pair callbacks. This can only add pairs. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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