Struct SwiftSpatialHashCellIndex
- Namespace
- SwiftCollections.Query
- Assembly
- SwiftCollections.dll
Represents an integer cell coordinate in a spatial hash grid.
public readonly struct SwiftSpatialHashCellIndex : IEquatable<SwiftSpatialHashCellIndex>
- Implements
- Inherited Members
Constructors
SwiftSpatialHashCellIndex(int, int, int)
Initializes a new instance of the SwiftSpatialHashCellIndex struct.
public SwiftSpatialHashCellIndex(int x, int y, int z)
Parameters
Properties
X
Gets the X-axis cell coordinate.
public int X { get; }
Property Value
Y
Gets the Y-axis cell coordinate.
public int Y { get; }
Property Value
Z
Gets the Z-axis cell coordinate.
public int Z { get; }
Property Value
Methods
Equals(SwiftSpatialHashCellIndex)
public bool Equals(SwiftSpatialHashCellIndex other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
Returns a string that represents the current object in the format "(X, Y, Z)".
public override string ToString()
Returns
- string
A string representation of the object, showing the values of X, Y, and Z in parentheses and separated by commas.
Remarks
This method is useful for debugging or logging purposes to quickly view the values of the object's coordinates.
Operators
operator ==(SwiftSpatialHashCellIndex, SwiftSpatialHashCellIndex)
Determines whether two SwiftSpatialHashCellIndex instances are equal.
public static bool operator ==(SwiftSpatialHashCellIndex left, SwiftSpatialHashCellIndex right)
Parameters
Returns
operator !=(SwiftSpatialHashCellIndex, SwiftSpatialHashCellIndex)
Determines whether two SwiftSpatialHashCellIndex instances are not equal.
public static bool operator !=(SwiftSpatialHashCellIndex left, SwiftSpatialHashCellIndex right)