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
capacityintcellSizeFixed64
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
capacityintcellSizeFixed64optionsSwiftSpatialHashOptions
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
pointVector3dThe fixed-point position whose cell should be queried.
resultsICollection<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
pointVector3dThe fixed-point position to map.
Returns
- SwiftSpatialHashCellIndex
The containing spatial-hash cell.