Skip to main content

b3DynamicTree_QueryClosest

Function b3DynamicTree_QueryClosest 

Source
pub unsafe extern "C" fn b3DynamicTree_QueryClosest(
    tree: *const b3DynamicTree,
    point: b3Vec3,
    maskBits: u64,
    requireAllBits: bool,
    callback: b3TreeQueryClosestCallbackFcn,
    context: *mut c_void,
    minDistanceSqr: *mut f32,
) -> b3TreeStats
Expand description

Query an AABB for the closest object. The callback function is called for each proxy that might be closest to the supplied point. @param tree the dynamic tree to query @param point the query point @param maskBits nodes are skipped if the bit-wise AND with the node category bits is zero @param requireAllBits nodes are skipped if the bit-wise AND with the node category bits does not equal the maskBits @param callback a user provided instance of b3TreeQueryClosestCallbackFcn @param context a user context object that is provided to the callback @param minDistanceSqr 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. @return performance data