10#define b2_defaultCategoryBits (0x00000001)
11#define b2_defaultMaskBits (0xFFFFFFFF)
20 uint32_t categoryBits;
63 int32_t rebuildCapacity;
73BOX2D_API int32_t b2DynamicTree_CreateProxy(
b2DynamicTree* tree,
b2AABB aabb, uint32_t categoryBits, int32_t userData);
76BOX2D_API
void b2DynamicTree_DestroyProxy(
b2DynamicTree* tree, int32_t proxyId);
85BOX2D_API
void b2DynamicTree_EnlargeProxy(
b2DynamicTree* tree, int32_t proxyId,
b2AABB aabb);
89typedef bool b2TreeQueryCallbackFcn(int32_t proxyId, int32_t userData,
void* context);
93BOX2D_API
void b2DynamicTree_QueryFiltered(
const b2DynamicTree* tree,
b2AABB aabb, uint32_t maskBits,
94 b2TreeQueryCallbackFcn* callback,
void* context);
98BOX2D_API
void b2DynamicTree_Query(
const b2DynamicTree* tree,
b2AABB aabb, b2TreeQueryCallbackFcn* callback,
void* context);
105typedef float b2TreeRayCastCallbackFcn(
const b2RayCastInput* input, int32_t proxyId, int32_t userData,
void* context);
115 b2TreeRayCastCallbackFcn* callback,
void* context);
122typedef float b2TreeShapeCastCallbackFcn(
const b2ShapeCastInput* input, int32_t proxyId, int32_t userData,
void* context);
132 b2TreeShapeCastCallbackFcn* callback,
void* context);
135BOX2D_API
void b2DynamicTree_Validate(
const b2DynamicTree* tree);
139BOX2D_API int32_t b2DynamicTree_GetHeight(
const b2DynamicTree* tree);
142BOX2D_API int32_t b2DynamicTree_GetMaxBalance(
const b2DynamicTree* tree);
145BOX2D_API
float b2DynamicTree_GetAreaRatio(
const b2DynamicTree* tree);
148BOX2D_API
void b2DynamicTree_RebuildBottomUp(
b2DynamicTree* tree);
151BOX2D_API int32_t b2DynamicTree_GetProxyCount(
const b2DynamicTree* tree);
154BOX2D_API int32_t b2DynamicTree_Rebuild(
b2DynamicTree* tree,
bool fullBuild);
163static inline int32_t b2DynamicTree_GetUserData(
const b2DynamicTree* tree, int32_t proxyId)
165 return tree->nodes[proxyId].userData;
171 return tree->nodes[proxyId].aabb;
Definition dynamic_tree.h:50
Definition dynamic_tree.h:16
types used by the Box2D API
Axis-aligned bounding box.
Definition types.h:75