sealed class Tinman.Terrain.Tools.GridLine

Derived from


Represents a projected grid line on a rectangular map.

Public / Methods


public method IntersectionWithLineSegment → (3)

in : Vec2D

Start point of line segment.

in : Vec2D

End point of line segment.

rightAngles opt : bool = true

Report intersections only for line segments that intersect at nearly right angles?

returns → Vec2D [ ]

The list of intersections points. Will be empty if no intersection occurs.

Computes the intersection points of this grid line with the given line segment.


public method TangentPoint → (2)

tangent in : Vec2D

The tangent direction vector.

delta opt : float64 = 10

The allowed difference between the direction vectors, in degrees.

returns → Vec2D

The tangent point or Vec2D.Undefined if there is no tangent point.

Computes the coordinates of the point on this grid line that is aligned with the given tangent direction.

Public / Attributes


public readonly attribute Coordinate → (float64)

The map coordinate that is associated with this grid line.


public readonly attribute Face → (CubemapFace)

The cubemap face.


public readonly attribute Horizontal → (bool)

Is this a horizontal grid line along the projected map X-axis (true), or a vertical grid line along the projected map Y-axis (false)?


public readonly attribute Indices → (int32 [ ])

The line segments of the grid line.

Each index pair refers to a vertex in Vertices.


public readonly attribute Size → (int32)

The cubemap size.

This value is always a power of two.


public readonly attribute Vertices → (Vec2D [ ])

The vertices of the grid line, given as cubemap face coordinates.