Table of Contents

Struct GlobalChunkCoordinate

Namespace
Game.Core.Coordinates
Assembly
Game.Core.Coordinates.dll
public struct GlobalChunkCoordinate : IDiscreteCoordinate<GlobalChunkCoordinate, ChunkVector, ChunkDirection>, IDiscreteCoordinateTranslatableByVector<GlobalChunkCoordinate, ChunkVector>, IDiscreteCoordinateTranslatableByDirection<GlobalChunkCoordinate, ChunkDirection>, IDiscreteCoordinate<GlobalChunkCoordinate>, IConvertibleToWorldPosition, IConvertibleToLocalPosition<GlobalChunkTransform, ChunkVector>
Implements
Extension Methods

Constructors

GlobalChunkCoordinate(int, int, short)

public GlobalChunkCoordinate(int x, int y, short z)

Parameters

x int
y int
z short

Fields

Origin

public static readonly GlobalChunkCoordinate Origin

Field Value

GlobalChunkCoordinate

x

public int x

Field Value

int

y

public int y

Field Value

int

z

public short z

Field Value

short

Methods

ComponentWiseMax(GlobalChunkCoordinate)

public GlobalChunkCoordinate ComponentWiseMax(GlobalChunkCoordinate other)

Parameters

other GlobalChunkCoordinate

Returns

GlobalChunkCoordinate

ComponentWiseMin(GlobalChunkCoordinate)

public GlobalChunkCoordinate ComponentWiseMin(GlobalChunkCoordinate other)

Parameters

other GlobalChunkCoordinate

Returns

GlobalChunkCoordinate

Equals(GlobalChunkCoordinate)

public readonly bool Equals(GlobalChunkCoordinate other)

Parameters

other GlobalChunkCoordinate

Returns

bool

Equals(object)

public override readonly bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override readonly int GetHashCode()

Returns

int

HorizontalDistance(GlobalChunkCoordinate)

public readonly int HorizontalDistance(GlobalChunkCoordinate other)

Parameters

other GlobalChunkCoordinate

Returns

int

ManhattanDistance(GlobalChunkCoordinate)

public readonly int ManhattanDistance(GlobalChunkCoordinate other)

Parameters

other GlobalChunkCoordinate

Returns

int

Move(ChunkDirection, int)

public readonly GlobalChunkCoordinate Move(ChunkDirection direction, int movements = 1)

Parameters

direction ChunkDirection
movements int

Returns

GlobalChunkCoordinate

MoveHorizontally(int)

public GlobalChunkCoordinate MoveHorizontally(int steps)

Parameters

steps int

Returns

GlobalChunkCoordinate

MoveVertically(int)

public GlobalChunkCoordinate MoveVertically(int steps)

Parameters

steps int

Returns

GlobalChunkCoordinate

Subtract(GlobalChunkCoordinate)

public ChunkVector Subtract(GlobalChunkCoordinate rhs)

Parameters

rhs GlobalChunkCoordinate

Returns

ChunkVector

ToCenter_W()

public readonly WorldCoordinate ToCenter_W()

Returns

WorldCoordinate

ToCenter_W(float)

public readonly WorldCoordinate ToCenter_W(float verticalOffset)

Parameters

verticalOffset float

Returns

WorldCoordinate

ToLocal(GlobalChunkTransform)

public ChunkVector ToLocal(GlobalChunkTransform originTransform)

Parameters

originTransform GlobalChunkTransform

Returns

ChunkVector

ToOrigin_G()

public readonly GlobalTileCoordinate ToOrigin_G()

Returns

GlobalTileCoordinate

ToOrigin_W()

public readonly WorldCoordinate ToOrigin_W()

Returns

WorldCoordinate

ToString()

public override string ToString()

Returns

string

To_IC(GlobalChunkCoordinate)

public readonly IslandChunkCoordinate To_IC(GlobalChunkCoordinate islandOrigin)

Parameters

islandOrigin GlobalChunkCoordinate

Returns

IslandChunkCoordinate

To_SC()

public readonly SuperChunkCoordinate To_SC()

Returns

SuperChunkCoordinate

Translate(ChunkVector)

public GlobalChunkCoordinate Translate(ChunkVector translation)

Parameters

translation ChunkVector

Returns

GlobalChunkCoordinate

VerticalDistance(GlobalChunkCoordinate)

public readonly int VerticalDistance(GlobalChunkCoordinate other)

Parameters

other GlobalChunkCoordinate

Returns

int

Operators

operator +(GlobalChunkCoordinate, ChunkVector)

public static GlobalChunkCoordinate operator +(GlobalChunkCoordinate lhs, ChunkVector rhs)

Parameters

lhs GlobalChunkCoordinate
rhs ChunkVector

Returns

GlobalChunkCoordinate

operator ==(GlobalChunkCoordinate, GlobalChunkCoordinate)

public static bool operator ==(GlobalChunkCoordinate lhs, GlobalChunkCoordinate rhs)

Parameters

lhs GlobalChunkCoordinate
rhs GlobalChunkCoordinate

Returns

bool

explicit operator int3(GlobalChunkCoordinate)

public static explicit operator int3(GlobalChunkCoordinate v)

Parameters

v GlobalChunkCoordinate

Returns

int3

operator !=(GlobalChunkCoordinate, GlobalChunkCoordinate)

public static bool operator !=(GlobalChunkCoordinate lhs, GlobalChunkCoordinate rhs)

Parameters

lhs GlobalChunkCoordinate
rhs GlobalChunkCoordinate

Returns

bool

operator -(GlobalChunkCoordinate, ChunkVector)

public static GlobalChunkCoordinate operator -(GlobalChunkCoordinate lhs, ChunkVector rhs)

Parameters

lhs GlobalChunkCoordinate
rhs ChunkVector

Returns

GlobalChunkCoordinate

operator -(GlobalChunkCoordinate, GlobalChunkCoordinate)

public static ChunkVector operator -(GlobalChunkCoordinate lhs, GlobalChunkCoordinate rhs)

Parameters

lhs GlobalChunkCoordinate
rhs GlobalChunkCoordinate

Returns

ChunkVector