@NoOffset @Properties(inherit=liquidfun.class) public class b2DynamicTree extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
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.
|
b2DynamicTree |
getPointer(long i) |
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, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public b2DynamicTree(Pointer p)
Pointer(Pointer)
.public b2DynamicTree(long size)
Pointer.position(long)
.public b2DynamicTree()
public b2DynamicTree position(long position)
public b2DynamicTree getPointer(long i)
getPointer
in class Pointer
@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)
@Name(value="Query<b2DynamicTreeQueryCallback>") public void Query(b2DynamicTreeQueryCallback callback, @Const @ByRef b2AABB aabb)
@Name(value="RayCast<b2DynamicTreeRayCastCallback>") 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 © 2022. All rights reserved.