Method b3DynamicTree_QueryClosest
- Namespace
- Box3D.Native
- Assembly
- Box3D.NET.Native.dll
b3DynamicTree_QueryClosest(b3DynamicTree*, Vector3, ulong, NativeBool, delegate* unmanaged[Cdecl]<float, int, ulong, void*, float>, void*, float*)
Query an AABB for the closest object. The callback function is called for each proxy that might be closest to the supplied point.
public static extern b3TreeStats b3DynamicTree_QueryClosest(b3DynamicTree* tree, Vector3 point, ulong maskBits, NativeBool requireAllBits, delegate* unmanaged[Cdecl]<float, int, ulong, void*, float> callback, void* context, float* minDistanceSqr)Parameters
treeb3DynamicTree*-
the dynamic tree to query
pointVector3-
the query point
maskBitsulong-
nodes are skipped if the bit-wise AND with the node category bits is zero
requireAllBitsNativeBool-
nodes are skipped if the bit-wise AND with the node category bits does not equal the maskBits
callbackdelegate* unmanaged[Cdecl]<float, int, ulong, void*, float>-
a user provided instance of b3TreeQueryClosestCallbackFcn
contextvoid*-
a user context object that is provided to the callback
minDistanceSqrfloat*-
the initial and final minimum squared distance. Provide a small initial to restrict the search and improve performance. If the value is large this query has performance that scales linearly with the number of proxies and would be slower than a brute force search.
Returns
- b3TreeStats
-
performance data