Click or drag to resize

RectPoint Class

Provides constants and methods for working with points in rect grids.
Inheritance Hierarchy
SystemObject
  Gamelogic.Grids2RectPoint

Namespace:  Gamelogic.Grids2
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static class RectPoint

The RectPoint type exposes the following members.

Methods
  NameDescription
Public methodStatic memberChebychevNorm
Returns the Euclidean norm of a point, defined as the maximum of the absolute values of the coordinates.
Public methodStatic memberEuclideanNorm
Returns the Euclidean norm of a point, defined as the square root of the sum of the squares of the coordinates.
Public methodStatic memberGetDiagonalNeighbors
Gets the diagonal neighbors of a point.
Public methodStatic memberGetOrthogonalAndDiagonalNeighbors
Gets the orthogonal and diagonal neighbors of a point.
Public methodStatic memberGetOrthogonalNeighbors
Gets the orthogonal neighbors of a point.
Public methodStatic memberGetSpiralIterator
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.
Public methodStatic memberKnightNorm
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.
Public methodStatic memberManhattanNorm
Returns the Manhattan norm of a point, defined as the sum of the absolute values of the coordinates.
Public methodStatic memberReflectAboutX
Rotates the specified point about the X axis.
Public methodStatic memberReflectAboutY
Rotates the specified point about the X axis.
Public methodStatic memberRotate180
Rotates the specified point by 180 degrees around the origin.
Public methodStatic memberRotate270
Rotates the specified point counterclockwise by 270 degrees around the origin.
Public methodStatic memberRotate90
Rotates the specified point counterclockwise by 90 degrees around the origin.
Public methodStatic memberRoundToGridPoint
Rounds a Vector2 to a grid point by rounding each coordinate.
Top
Fields
  NameDescription
Public fieldStatic memberDiagonalDirections
A list of diagonal directions in a rect grid.
Public fieldStatic memberDiagonalLines
A list containing maps that represent diagonal lines.
Public fieldStatic memberEast
The point one unit to the east of the origin.
Public fieldStatic memberHorizontalLine
A map that represents a horizontal line.
Public fieldStatic memberNorth
The point one unit to the north of the origin.
Public fieldStatic memberNorthEast
The point one unit to the north and one unit to the east of the origin.
Public fieldStatic memberNorthWest
The point one unit to the north and one unit to the west of the origin.
Public fieldStatic memberOrthogonalAndDiagonalDirections
A list of orthogonal and diagonal directions in a rect grid.
Public fieldStatic memberOrthogonalDirections
A list of orthogonal directions in a rect grid.
Public fieldStatic memberOrthogonalLines
A list containing maps that represent orthogonal lines, that is, horizontal lines and vertical lines.
Public fieldStatic memberSouth
The point one unit to the south of the origin.
Public fieldStatic memberSouthEast
The point one unit to the south and one unit to the east of the origin.
Public fieldStatic memberSouthWest
The point one unit to the south and one unit to the west of the origin.
Public fieldStatic memberVerticalLine
A map that represents a vertical line.
Public fieldStatic memberWest
The point one unit to the west of the origin.
Top
See Also