Struct WorldVoxelIndex
Represents the world-scoped runtime identity of a voxel. Used for uniquely identifying voxels across multiple grids and world instances.
public struct WorldVoxelIndex : IEquatable<WorldVoxelIndex>
- Implements
- Inherited Members
Constructors
WorldVoxelIndex(long, ushort, long, VoxelIndex)
Initializes a new instance of WorldVoxelIndex, linking a voxel to a specific world and grid instance.
public WorldVoxelIndex(long worldSpawnToken, ushort gridIndex, long gridSpawnToken, VoxelIndex coord)
Parameters
worldSpawnTokenlonggridIndexushortgridSpawnTokenlongcoordVoxelIndex
Fields
GridIndex
The world-local slot index of the grid in ActiveGrids.
public ushort GridIndex
Field Value
GridSpawnToken
The 64-bit world-local allocation generation assigned to the grid during initialization. Used to ensure the correct instance is at the assigned GridIndex.
public long GridSpawnToken
Field Value
VoxelIndex
The local coordinate of a voxel within the grid at GridIndex.
public VoxelIndex VoxelIndex
Field Value
WorldSpawnToken
The process-unique 64-bit runtime allocation token of the owning GridWorld instance. Used to reject stale or cross-world identities safely.
public long WorldSpawnToken
Field Value
Methods
Equals(WorldVoxelIndex)
public readonly bool Equals(WorldVoxelIndex other)
Parameters
otherWorldVoxelIndex
Returns
Equals(object?)
public override readonly bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
Computes a hash code for hash-based lookup. Exact equality remains authoritative.
public override readonly int GetHashCode()
Returns
ToString()
Returns a string representation of the world-scoped voxel identity.
public override readonly string ToString()
Returns
Operators
operator ==(WorldVoxelIndex, WorldVoxelIndex)
public static bool operator ==(WorldVoxelIndex left, WorldVoxelIndex right)
Parameters
leftWorldVoxelIndexrightWorldVoxelIndex
Returns
operator !=(WorldVoxelIndex, WorldVoxelIndex)
public static bool operator !=(WorldVoxelIndex left, WorldVoxelIndex right)
Parameters
leftWorldVoxelIndexrightWorldVoxelIndex