Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Struct: RT.Coordinates.SquareSummary
Represents a square cell in a 2D rectilinear grid. Constructors | Constructs a Square from an X and Y coordinate. |
Instance methodsbool | | Compares this cell to another for equality. | bool | | Refer to the documentation for object.Equals. | int | | Refer to the documentation for object.GetHashCode. | int | |
Returns the index that this coordinate would have in a rectangle of width width in which
the cells are numbered from 0 in reading order. | IEnumerable<Square> | |
Returns a collection of all of this cell’s neighbors. | bool | InRange(int width, int height, int left = 0, int top = 0) |
Tests whether this coordinate is within a given rectangular range. | bool | |
Determines whether two cells are orthogonally adjacent (not including diagonals). | int | |
Calculates the Manhattan distance between this coordinate and other. This is the number of
orthogonal steps required to reach one from the other. | Square | |
Moves the current cell dx number of spaces to the right and dy number of
spaces down. | Square | |
Moves the current cell a number of spaces in the specified direction. | Square | |
Moves the current cell dx number of spaces to the right. | Square | |
Moves the current cell dy number of spaces down. | string | | Refer to the documentation for object.ToString. |
Static methodsIEnumerable<Square> | Rectangle(int width, int height, int dx = 0, int dy = 0) |
Returns a collection of all cells in a grid of the specified size. |
OperatorsSquare | | Addition operator. | bool | | Compares two Square values for equality. | bool | | Compares two Square values for inequality. | Square | | Subtraction operator. |
Instance propertiesPointD | | Returns the center point of this cell. | IEnumerable<Link<Vertex>> | | Refer to the documentation for IHasSvgGeometry.Edges. | IEnumerable<Square> | | Returns the set of chess knight’s moves from the current cell. | IEnumerable<Square> | | Returns a collection of all of this cell’s orthogonal neighbors (no diagonals). | Vertex[] | | Returns the vertices along the perimeter of this Square, going clockwise from the top-left. | int | | Returns the X coordinate of the cell. | int | | Returns the Y coordinate of the cell. |
Static fieldsIEnumerable<Square.Direction> | | Provides a collection of all directions. | IEnumerable<Square.Direction> | | Provides a collection of all diagonal directions. | IEnumerable<Square.Direction> | | Provides a collection of all orthogonal directions. |
Nested types | Identifies a direction within a 2D rectilinear grid. | | Describes a 2D grid of square cells. | | Describes a vertex (gridline intersection) in a rectilinear grid (Square.Grid). |
|