public sealed class Bucket
Represents a single spatial bucket in a raycaster lookup grid.

Constructors

Bucket

#
public Bucket(Box box, ShapeShaderPair[] shapes)
Create a new, empty bucket.
box (Box)Bounding box.
shapes (ShapeShaderPair[])Shapes to test for coverage.

Properties

Box

#
public Box Box { get; }
Gets the bounding box of this bucket.

Count

#
public int Count { get; }
Gets the number of indices associated with this bucket.

Methods

NextIndex

#
public bool NextIndex(double x, double y, int startIndex, out int index, out bool partial)
Find the index of the next potential object underneath the coordinate.
x (double)Coordinate x component.
y (double)Coordinate y component.
startIndex (int)Start index (will be included).
index (out int)Next potential index will be returned here.
partial (out bool)Partiality of next index will be returned here.
True if a potential index was found.

ObjectIndexAt

#
public int ObjectIndexAt(int index)
Gets an object index.
index (int)Index of object index.

ObjectPartialAt

#
public bool ObjectPartialAt(int index)
Gets an object partial coverage.
index (int)Partiality of object index.