Struct RaySource
- Namespace
- BepuPhysics.Trees
- Assembly
- BepuPhysics.dll
public struct RaySource : IRaySource
- Implements
- Inherited Members
Constructors
RaySource(TreeRay*, RayData*, ushort*, int)
public RaySource(TreeRay* treeRays, RayData* rays, ushort* rayPointerStack, int rayCount)
Parameters
Properties
RayCount
Gets the number of rays in the batch.
public int RayCount { get; }
Property Value
Methods
GetRay(int)
Gets a reference to the data for a ray.
public ref readonly RayData GetRay(int rayIndex)
Parameters
rayIndex
intIndex of the ray to grab.
Returns
- RayData
Returns a reference to the ray in the ray source.
GetRay(int, out RayData*, out float*)
Gets pointers to the data for a ray.
public void GetRay(int rayIndex, out RayData* ray, out float* maximumT)
Parameters
rayIndex
intIndex of the ray to grab.
ray
RayData*Pointer to the ray's origin and direction. Note that changing the ray's origin and direction mid-traversal will not change the path of the traversal, but it will be visible by any future leafs impacted by this ray.
maximumT
float*Pointer to the maximum length of the ray in units of the ray's length. Decreasing this value will prevent the traversal from visiting more distant nodes later in the traversal.