GridLine

Description

sealed class Tinman.Terrain.Tools.GridLine

Derived from

IComparable<GridLine>

Represents a projected grid line on a rectangular map.

Public / Methods

Intersection​With​Line​Segment


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.

Tangent​Point


public method TangentPoint → (2)

tangent in : Vec2D

The tangent direction vector.

delta opt : float64 = 10

[>0]
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

Coordinate


public readonly attribute Coordinate → (float64)

The map coordinate that is associated with this grid line.

Face


public readonly attribute Face → (CubemapFace)

The cubemap face.

Horizontal


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)?

Indices


public readonly attribute Indices → (int32 [ ])

The line segments of the grid line.

Each index pair refers to a vertex in Vertices.

Size


public readonly attribute Size → (int32)

The cubemap size.

This value is always a power of two.

Vertices


public readonly attribute Vertices → (Vec2D [ ])

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