Table of Contents

Class RectPoint

Namespace
Gamelogic.Grids2
Assembly
Assembly-CSharp.dll

Provides constants and methods for working with points in rect grids.

public static class RectPoint
Inheritance
RectPoint
Inherited Members

Fields

DiagonalDirections

A list of diagonal directions in a rect grid.

DiagonalLines

A list containing maps that represent diagonal lines.

East

The point one unit to the east of the origin.

HorizontalLine

A map that represents a horizontal line.

North

The point one unit to the north of the origin.

NorthEast

The point one unit to the north and one unit to the east of the origin.

NorthWest

The point one unit to the north and one unit to the west of the origin.

OrthogonalAndDiagonalDirections

A list of orthogonal and diagonal directions in a rect grid.

OrthogonalDirections

A list of orthogonal directions in a rect grid.

OrthogonalLines

A list containing maps that represent orthogonal lines, that is, horizontal lines and vertical lines.

South

The point one unit to the south of the origin.

SouthEast

The point one unit to the south and one unit to the east of the origin.

SouthWest

The point one unit to the south and one unit to the west of the origin.

VerticalLine

A map that represents a vertical line.

West

The point one unit to the west of the origin.

Methods

ChebychevNorm(GridPoint2)

Returns the Euclidean norm of a point, defined as the maximum of the absolute values of the coordinates.

ChebychevNorm(Vector2)

Returns the Euclidean norm of a point, defined as the maximum of the absolute values of the coordinates.

EuclideanNorm(GridPoint2)

Returns the Euclidean norm of a point, defined as the square root of the sum of the squares of the coordinates.

EuclideanNorm(Vector2)

Returns the Euclidean norm of a point, defined as the square root of the sum of the squares of the coordinates.

GetDiagonalNeighbors(GridPoint2)

Gets the diagonal neighbors of a point.

GetOrthogonalAndDiagonalNeighbors(GridPoint2)

Gets the orthogonal and diagonal neighbors of a point.

GetOrthogonalNeighbors(GridPoint2)

Gets the orthogonal neighbors of a point.

GetSpiralIterator(IImplicitShape<GridPoint2>, GridPoint2, int)

Get's an enumerable of shape points in a square spiral outwards from a given point, assuming the points represents coordinates in a rect grid.

KnightNorm(GridPoint2)

Returns the knight norm of a point, defined by the minimum number of moves a knight chess-piece will need to reach it starting at the origin.

ManhattanNorm(GridPoint2)

Returns the Manhattan norm of a point, defined as the sum of the absolute values of the coordinates.

ManhattanNorm(Vector2)

Returns the Manhattan norm of a point, defined as the sum of the absolute values of the coordinates.

ReflectAboutX(GridPoint2)

Rotates the specified point about the X axis.

ReflectAboutY(GridPoint2)

Rotates the specified point about the X axis.

Rotate180(GridPoint2)

Rotates the specified point by 180 degrees around the origin.

Rotate270(GridPoint2)

Rotates the specified point counterclockwise by 270 degrees around the origin.

Rotate90(GridPoint2)

Rotates the specified point counterclockwise by 90 degrees around the origin.

RoundToGridPoint(Vector2)

Rounds a Vector2 to a grid point by rounding each coordinate.