C# Class Box2D.Collision.Broadphase.BroadPhase

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.
Inheritance: TreeCallback
Afficher le fichier Open project: gerich-home/box2dnet Class Usage Examples

Méthodes publiques

Méthode Description
BroadPhase ( ) : System
CreateProxy ( AABB aabb, object userData ) : int

Create a proxy with an initial AABB. Pairs are not reported until updatePairs is called.

DestroyProxy ( int proxyId ) : void

Destroy a proxy. It is up to the client to remove any pairs.

DrawTree ( DebugDraw argDraw ) : void
GetFatAABB ( int proxyId ) : AABB
GetUserData ( int proxyId ) : object
MoveProxy ( int proxyId, AABB aabb, Vec2 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).

Query ( ITreeCallback callback, AABB aabb ) : void

Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB.

Raycast ( ITreeRayCastCallback 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.

TestOverlap ( int proxyIdA, int proxyIdB ) : bool
TouchProxy ( int proxyId ) : void
TreeCallback ( int proxyId ) : bool

This is called from DynamicTree::query when we are gathering pairs.

UpdatePairs ( IPairCallback callback ) : void

Update the pairs. This results in pair callbacks. This can only add pairs.

Méthodes protégées

Méthode Description
BufferMove ( int proxyId ) : void
UnbufferMove ( int proxyId ) : void

Method Details

BroadPhase() public méthode

public BroadPhase ( ) : System
Résultat System

BufferMove() protected méthode

protected BufferMove ( int proxyId ) : void
proxyId int
Résultat void

CreateProxy() public méthode

Create a proxy with an initial AABB. Pairs are not reported until updatePairs is called.
public CreateProxy ( AABB aabb, object userData ) : int
aabb AABB
userData object
Résultat int

DestroyProxy() public méthode

Destroy a proxy. It is up to the client to remove any pairs.
public DestroyProxy ( int proxyId ) : void
proxyId int
Résultat void

DrawTree() public méthode

public DrawTree ( DebugDraw argDraw ) : void
argDraw Box2D.Callbacks.DebugDraw
Résultat void

GetFatAABB() public méthode

public GetFatAABB ( int proxyId ) : AABB
proxyId int
Résultat AABB

GetUserData() public méthode

public GetUserData ( int proxyId ) : object
proxyId int
Résultat object

MoveProxy() public méthode

Call MoveProxy as many times as you like, then when you are done call UpdatePairs to finalized the proxy pairs (for your time step).
public MoveProxy ( int proxyId, AABB aabb, Vec2 displacement ) : void
proxyId int
aabb AABB
displacement Box2D.Common.Vec2
Résultat void

Query() public méthode

Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB.
public Query ( ITreeCallback callback, AABB aabb ) : void
callback ITreeCallback
aabb AABB
Résultat void

Raycast() public méthode

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.
public Raycast ( ITreeRayCastCallback callback, RayCastInput input ) : void
callback ITreeRayCastCallback a callback class that is called for each proxy that is hit by the ray.
input RayCastInput the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).
Résultat void

TestOverlap() public méthode

public TestOverlap ( int proxyIdA, int proxyIdB ) : bool
proxyIdA int
proxyIdB int
Résultat bool

TouchProxy() public méthode

public TouchProxy ( int proxyId ) : void
proxyId int
Résultat void

TreeCallback() public méthode

This is called from DynamicTree::query when we are gathering pairs.
public TreeCallback ( int proxyId ) : bool
proxyId int
Résultat bool

UnbufferMove() protected méthode

protected UnbufferMove ( int proxyId ) : void
proxyId int
Résultat void

UpdatePairs() public méthode

Update the pairs. This results in pair callbacks. This can only add pairs.
public UpdatePairs ( IPairCallback callback ) : void
callback IPairCallback
Résultat void