RaycasterBuckets

public sealed class RaycasterBuckets
Raycasting speed-up for quickly rejecting the bulk of objects.

Constructors

RaycasterBuckets

#
Create a new blank bucket grid.
public RaycasterBuckets(
width,
Minimum width (in pixels) this grid must cover.
height,
Minimum height (in pixels) this grid must cover.
size,
Desired size for each bucket.
shapes
shape collection to bucket.
)

Properties

Buckets

#
Enumerate over all buckets.
public IEnumerable<Bucket> Buckets { get; }

Size

#
Gets the size of each bucket.
public int Size { get; }

X0

#
Gets the minimum x coordinate still covered by the grid.
public int X0 { get; }

X1

#
Gets the maximum x coordinate still covered by the grid.
public int X1 { get; }

XCount

#
Gets the number of buckets along the X direction.
public int XCount { get; }

Y0

#
Gets the minimum y coordinate still covered by the grid.
public int Y0 { get; }

Y1

#
Gets the maximum y coordinate still covered by the grid.
public int Y1 { get; }

YCount

#
Gets the number of buckets along the Y direction.
public int YCount { get; }

Methods

BucketAt

#
Gets the bucket, if any, at the given location.
public Bucket BucketAt(
x,
X coordinate.
y
Y coordinate.
)
Bucket at (x,y).