TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class GridLine in Tinman.Terrain.Tools

Represents a projected grid line on a rectangular map.

sealed class GridLine implements IComparable<GridLine>

See also:

IMapProjection
GridLineBuilder

Public / Attributes

Coordinate

The map coordinate that is associated with this grid line.

public readonly field Coordinate
type float64

Face

The cubemap face.

public readonly field Face
type CubemapFace

Horizontal

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 field Horizontal
type bool

Indices

The line segments of the grid line.

public readonly field Indices
type int32[]

Remarks:

Each index pair refers to a vertex in Vertices.

Size

The cubemap size.

public readonly field Size
type int32

Remarks:

This value is always a power of two.

Vertices

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

public readonly field Vertices
type Vec2D[]

Public / Methods

CompareTo

Compares this object with the given one.

[Pure]
public method CompareTo (GridLine other)
type int32
params other The object to compare to.
returns < 0 : if this object is less than other,
= 0 : if this object is equal to other,
> 0 : if this object is greater than other.
implements IComparable.CompareTo

IntersectionWithLineSegment

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

public method IntersectionWithLineSegment (Vec2D a, Vec2D b, bool rightAngles = true)
type Vec2D[]
params a Start point of line segment.
  b End point of line segment.
  rightAngles Report intersections only for line segments that intersect at nearly right angles? Defaults to true.
returns [not-null] The list of intersections points. Will be empty if no intersection occurs.

TangentPoint

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

public method TangentPoint (Vec2D tangent, float64 delta = 10)
type Vec2D
params tangent The tangent direction vector.
  delta [>0] The allowed difference between the direction vectors, in degrees. Defaults to 10.
returns The tangent point or Undefined if there is no tangent point.