Class FrustumCulling¶
Namespace: Apogee.Core.Numerics
Assembly: Apogee.Core.dll
Tests boxes against a k of byte b is box 8b + k.
There are three kernels with the same arithmetic in the same order, so they give the same bits:
public static class FrustumCulling
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Fields¶
Block¶
The boxes are processed (and padded) in blocks of this many.
public const int Block = 8
Field Value¶
Methods¶
CountVisible(ReadOnlySpan<byte>, int)¶
The number of boxes among the first
public static int CountVisible(ReadOnlySpan<byte> visible, int count)
Parameters¶
visible ReadOnlySpan<byte>
count int
Returns¶
Cull(in Frustum, BoxSet, Span<byte>)¶
public static void Cull(in Frustum frustum, BoxSet boxes, Span<byte> visible)
Parameters¶
frustum Frustum
boxes BoxSet
CullScalar(in Frustum, BoxSet, Span<byte>)¶
public static void CullScalar(in Frustum frustum, BoxSet boxes, Span<byte> visible)
Parameters¶
frustum Frustum
boxes BoxSet
CullVector128(in Frustum, BoxSet, Span<byte>)¶
public static void CullVector128(in Frustum frustum, BoxSet boxes, Span<byte> visible)
Parameters¶
frustum Frustum
boxes BoxSet
CullVector256(in Frustum, BoxSet, Span<byte>)¶
public static void CullVector256(in Frustum frustum, BoxSet boxes, Span<byte> visible)
Parameters¶
frustum Frustum
boxes BoxSet
IsVisible(ReadOnlySpan<byte>, int)¶
public static bool IsVisible(ReadOnlySpan<byte> visible, int index)
Parameters¶
visible ReadOnlySpan<byte>
index int