Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: IEnumerable<Tri> LargeHexagon(int, int, int)

  • Declared in: RT.Coordinates.Tri

Declaration

public static IEnumerable<Tri> LargeHexagon(
    int sideLength,
    int dx = 0,
    int dy = 0
)

Summary

Returns a set of tris that make up a large hexagon structure.

Parameters

intsideLength Number of triangles along each side of the hexagon.
intdx Offset to shift the x-coordinates by. Default is 0.
intdy Offset to shift the y-coordinates by. Default is 0.

Exceptions

  • System.ArgumentOutOfRangeException
    sideLength was zero or negative.
  • System.ArgumentException
    The values of dx and dy are not both even or both odd.

Remarks

With dx and dy equal to 0, the tris at the leftmost corner have an x-coordinate of 0 for odd values of sideLength and 1 for even values, while the top row of tris has y-coordinates of 0.