Table of Contents

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

x int
y int
z int

Properties

X

Gets the X-axis cell coordinate.

public int X { get; }

Property Value

int

Y

Gets the Y-axis cell coordinate.

public int Y { get; }

Property Value

int

Z

Gets the Z-axis cell coordinate.

public int Z { get; }

Property Value

int

Methods

Equals(SwiftSpatialHashCellIndex)

public bool Equals(SwiftSpatialHashCellIndex other)

Parameters

other SwiftSpatialHashCellIndex

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

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

left SwiftSpatialHashCellIndex
right SwiftSpatialHashCellIndex

Returns

bool

operator !=(SwiftSpatialHashCellIndex, SwiftSpatialHashCellIndex)

Determines whether two SwiftSpatialHashCellIndex instances are not equal.

public static bool operator !=(SwiftSpatialHashCellIndex left, SwiftSpatialHashCellIndex right)

Parameters

left SwiftSpatialHashCellIndex
right SwiftSpatialHashCellIndex

Returns

bool