Struct GlobalChunkPivot
- Namespace
- Game.Core.Coordinates
- Assembly
- Game.Core.Coordinates.dll
public readonly struct GlobalChunkPivot : IPivot<GlobalChunkCoordinate, ChunkDirection, GlobalChunkPivot>, IPositionalPivot<GlobalChunkCoordinate, GlobalChunkPivot>, IDirectionalPivot<ChunkDirection, GlobalChunkPivot>, IPivot<GlobalChunkPivot>, IConvertibleToLocalPivot<GlobalChunkTransform, LocalChunkPivot>
- Implements
- Extension Methods
Constructors
GlobalChunkPivot(GlobalChunkCoordinate, ChunkDirection)
public GlobalChunkPivot(GlobalChunkCoordinate position, ChunkDirection direction)
Parameters
positionGlobalChunkCoordinatedirectionChunkDirection
Fields
Direction
public readonly ChunkDirection Direction
Field Value
Position
public readonly GlobalChunkCoordinate Position
Field Value
Methods
Equals(GlobalChunkPivot)
public bool Equals(GlobalChunkPivot other)
Parameters
otherGlobalChunkPivot
Returns
- bool
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
Rotate(GridRotation)
public GlobalChunkPivot Rotate(GridRotation rotation)
Parameters
rotationGridRotation
Returns
ToLocal(in GlobalChunkTransform)
public LocalChunkPivot ToLocal(in GlobalChunkTransform transform)
Parameters
transformGlobalChunkTransform
Returns
ToString()
public override string ToString()
Returns
- string
Translate(int)
public GlobalChunkPivot Translate(int chunks = 1)
Parameters
chunksint
Returns
Operators
operator +(in GlobalChunkPivot, ChunkVector)
public static GlobalChunkPivot operator +(in GlobalChunkPivot lhs, ChunkVector rhs)
Parameters
lhsGlobalChunkPivotrhsChunkVector
Returns
operator ==(in GlobalChunkPivot, in GlobalChunkPivot)
public static bool operator ==(in GlobalChunkPivot lhs, in GlobalChunkPivot rhs)
Parameters
lhsGlobalChunkPivotrhsGlobalChunkPivot
Returns
- bool
operator !=(in GlobalChunkPivot, in GlobalChunkPivot)
public static bool operator !=(in GlobalChunkPivot lhs, in GlobalChunkPivot rhs)
Parameters
lhsGlobalChunkPivotrhsGlobalChunkPivot
Returns
- bool
operator -(in GlobalChunkPivot, ChunkVector)
public static GlobalChunkPivot operator -(in GlobalChunkPivot lhs, ChunkVector rhs)
Parameters
lhsGlobalChunkPivotrhsChunkVector