Метод | Описание | |
---|---|---|
ComputeHeight ( ) : int |
Compute the height of the tree.
|
|
CreateProxy ( AABB aabb, Object userData ) : int |
Create a proxy. Provide a tight fitting AABB and a userData pointer.
|
|
DestroyProxy ( int proxyId ) : void |
Destroy a proxy
|
|
DrawTree ( |
||
DrawTree ( |
||
DynamicTree ( ) : System | ||
GetFatAABB ( int proxyId ) : AABB | ||
GetUserData ( int proxyId ) : object | ||
MoveProxy ( int proxyId, AABB aabb, |
Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, then the proxy is removed from the tree and re-inserted. Otherwise the function returns immediately.
|
|
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.
|
|
RebuildBottomUp ( ) : void |
Build an optimal tree. Very expensive. For testing.
|
|
Validate ( ) : void |
Validate this tree. For testing.
|
Метод | Описание | |
---|---|---|
AllocateNode ( ) : int | ||
Balance ( int iA ) : int | ||
ComputeHeight ( int nodeId ) : int | ||
FreeNode ( int nodeId ) : void |
returns a node to the pool
|
|
InsertLeaf ( int leaf ) : void | ||
RemoveLeaf ( int leaf ) : void | ||
ValidateMetrics ( int index ) : void | ||
ValidateStructure ( int index ) : void |
public CreateProxy ( AABB aabb, Object userData ) : int | ||
aabb | AABB | |
userData | Object | |
Результат | int |
public DestroyProxy ( int proxyId ) : void | ||
proxyId | int | |
Результат | void |
public DrawTree ( |
||
argDraw | ||
Результат | void |
public DrawTree ( |
||
argDraw | ||
nodeId | int | |
spot | int | |
height | int | |
Результат | void |
public GetUserData ( int proxyId ) : object | ||
proxyId | int | |
Результат | object |
public MoveProxy ( int proxyId, AABB aabb, |
||
proxyId | int | |
aabb | AABB | |
displacement | ||
Результат | bool |
public Query ( ITreeCallback callback, AABB aabb ) : void | ||
callback | ITreeCallback | |
aabb | AABB | |
Результат | void |
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). |
Результат | void |