Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Struct: RT.Coordinates.Tri

Summary

Represents a tile in a 2D triangular grid.

Remarks

Represents a triangular tile in a two-dimensional grid in which the tiles alternative between being up-pointing and down-pointing triangles. Each tri is represented as a pair of coordinates (X, Y), where X counts the tris in a row and Y identifies the row. The (0, 0) tri is an up-pointing one.

Constructors

Tri(int x, int y)
Constructor.

Instance methods

bool
Equals(Tri other)
  • Implements: IEquatable<Tri>.Equals(Tri)
Refer to the documentation for IEquatable<Tri>.Equals.
bool
Equals(object obj)
  • Overrides: object.Equals(object)
Refer to the documentation for object.Equals.
int
  • Overrides: object.GetHashCode()
Refer to the documentation for object.GetHashCode.
string
  • Overrides: object.ToString()
Refer to the documentation for object.ToString.

Static methods

IEnumerable<Tri>
LargeDownPointingTriangle(int sideLength, int dx = 0, int dy = 0)
Returns a set of tris that make up a large down-pointing triangle structure. (see also remarks)
IEnumerable<Tri>
LargeHexagon(int sideLength, int dx = 0, int dy = 0)
Returns a set of tris that make up a large hexagon structure. (see also remarks)
IEnumerable<Tri>
LargeUpPointingTriangle(int sideLength, int dx = 0, int dy = 0)
Returns a set of tris that make up a large up-pointing triangle structure. (see also remarks)

Instance properties

PointDRefer to the documentation for IHasSvgGeometry.Center.
IEnumerable<Link<Vertex>>Refer to the documentation for IHasSvgGeometry.Edges.
boolDetermines whether this tri is up-pointing (true) or down-pointing (false).
IEnumerable<Tri>Refer to the documentation for INeighbor<Tri>.Neighbors.
Vertex[] Returns the vertices along the perimeter of this Tri, going clockwise from the top (up-pointing) or top-left (down-pointing).
intReturns the position of the tri within its row.
intReturns the row containing this tri.

Nested types

Describes a 2D grid of triangular cells.
Describes a vertex (gridline intersection) in a triangular grid (Tri.Grid).