Method b3World_CastRay
- Namespace
- Box3D.Native
- Assembly
- Box3D.NET.Native.dll
b3World_CastRay(b3WorldId, Vector3, Vector3, b3QueryFilter, delegate* unmanaged[Cdecl]<b3ShapeId, Vector3, Vector3, float, ulong, int, int, void*, float>, void*)
Cast a ray into the world to collect shapes in the path of the ray. Your callback function controls whether you get the closest point, any point, or n-points.
public static extern b3TreeStats b3World_CastRay(b3WorldId worldId, Vector3 origin, Vector3 translation, b3QueryFilter filter, delegate* unmanaged[Cdecl]<b3ShapeId, Vector3, Vector3, float, ulong, int, int, void*, float> fcn, void* context)Parameters
worldIdb3WorldId-
The world to cast the ray against
originVector3-
The start point of the ray
translationVector3-
The translation of the ray from the start point to the end point
filterb3QueryFilter-
Contains bit flags to filter unwanted shapes from the results
fcndelegate* unmanaged[Cdecl]<b3ShapeId, Vector3, Vector3, float, ulong, int, int, void*, float>-
A user implemented callback function
contextvoid*-
A user context that is passed along to the callback function
Returns
- b3TreeStats
-
traversal performance counters
Remarks
Note: The callback function may receive shapes in any order @note The callback function may receive shapes in any order