Table of Contents

Class SwiftFixedSpatialHash<T>

Namespace
SwiftCollections.Query
Assembly
SwiftCollections.FixedMathSharp.dll

Represents a fixed-point spatial hash optimized for deterministic broad-phase spatial queries.

public class SwiftFixedSpatialHash<T> : SwiftSpatialHash<T, FixedBoundVolume>

Type Parameters

T
Inheritance
SwiftFixedSpatialHash<T>
Inherited Members

Constructors

SwiftFixedSpatialHash(int, Fixed64)

Initializes a new instance of the SwiftFixedSpatialHash<T> class with the specified capacity and cell size.

public SwiftFixedSpatialHash(int capacity, Fixed64 cellSize)

Parameters

capacity int
cellSize Fixed64

SwiftFixedSpatialHash(int, Fixed64, SwiftSpatialHashOptions)

Initializes a new instance of the SwiftFixedSpatialHash<T> class with the specified capacity, cell size, and options.

public SwiftFixedSpatialHash(int capacity, Fixed64 cellSize, SwiftSpatialHashOptions options)

Parameters

capacity int
cellSize Fixed64
options SwiftSpatialHashOptions

Methods

CollectPointCandidates(Vector3d, ICollection<T>)

Collects broad-phase candidates registered in the spatial-hash cell containing a point. Callers remain responsible for exact filtering.

public void CollectPointCandidates(Vector3d point, ICollection<T> results)

Parameters

point Vector3d

The fixed-point position whose cell should be queried.

results ICollection<T>

The caller-owned result collection.

GetCellIndex(Vector3d)

Maps a fixed-point position to its exact spatial-hash cell.

public SwiftSpatialHashCellIndex GetCellIndex(Vector3d point)

Parameters

point Vector3d

The fixed-point position to map.

Returns

SwiftSpatialHashCellIndex

The containing spatial-hash cell.