@NoOffset @Properties(inherit=liquidfun.class) public class b2DynamicTree extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
b2DynamicTree()
Constructing the tree initializes the node pool.
|
b2DynamicTree(long size)
Native array allocator.
|
b2DynamicTree(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
CreateProxy(b2AABB aabb,
Pointer userData)
Create a proxy.
|
void |
DestroyProxy(int proxyId)
Destroy a proxy.
|
float |
GetAreaRatio()
Get the ratio of the sum of the node areas to the root area.
|
b2AABB |
GetFatAABB(int proxyId)
Get the fat AABB for a proxy.
|
int |
GetHeight()
Compute the height of the binary tree in O(N) time.
|
int |
GetMaxBalance()
Get the maximum balance of an node in the tree.
|
Pointer |
GetUserData(int proxyId)
Get proxy user data.
|
boolean |
MoveProxy(int proxyId,
b2AABB aabb1,
b2Vec2 displacement)
Move a proxy with a swepted AABB.
|
b2DynamicTree |
position(long position) |
void |
Query(b2DynamicTreeQueryCallback callback,
b2AABB aabb)
Query an AABB for overlapping proxies.
|
void |
RayCast(b2DynamicTreeRayCastCallback callback,
b2RayCastInput input)
Ray-cast against the proxies in the tree.
|
void |
RebuildBottomUp()
Build an optimal tree.
|
void |
ShiftOrigin(b2Vec2 newOrigin)
Shift the world origin.
|
void |
Validate()
Validate this tree.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic b2DynamicTree(Pointer p)
Pointer.Pointer(Pointer).public b2DynamicTree(long size)
Pointer.position(long).public b2DynamicTree()
public b2DynamicTree position(long position)
@Cast(value="int32") public int CreateProxy(@Const @ByRef b2AABB aabb, Pointer userData)
public void DestroyProxy(@Cast(value="int32") int proxyId)
@Cast(value="bool") public boolean MoveProxy(@Cast(value="int32") int proxyId, @Const @ByRef b2AABB aabb1, @Const @ByRef b2Vec2 displacement)
public Pointer GetUserData(@Cast(value="int32") int proxyId)
@Const @ByRef public b2AABB GetFatAABB(@Cast(value="int32") int proxyId)
public void Query(b2DynamicTreeQueryCallback callback, @Const @ByRef b2AABB aabb)
public void RayCast(b2DynamicTreeRayCastCallback callback, @Const @ByRef b2RayCastInput input)
input - the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).callback - a callback class that is called for each proxy that is hit by the ray.public void Validate()
@Cast(value="int32") public int GetHeight()
@Cast(value="int32") public int GetMaxBalance()
@Cast(value="float32") public float GetAreaRatio()
public void RebuildBottomUp()
Copyright © 2019. All rights reserved.