Options
All
  • Public
  • Public/Protected
  • All
Menu

A 3D line.

Hierarchy

  • Line3

Index

Constructors

Properties

end: Vector3
start: Vector3

Accessors

Methods

  • Return a vector that represents a certain point of the line. Same as start at t = 0, same as end at t = 1.

    Parameters

    • t: number

      A parameter t

    Returns Vector3

  • Return a point that is on the line which is closest to the given point.

    If segment is true, it will treat the line as a segment which has start and end. Otherwise it will treat the line is infinite.

    Parameters

    • point: Vector3

      A point

    • segment: boolean

      Is the line a segment?

    Returns Vector3

  • distanceToPoint(point: Vector3, segment: boolean): number
  • Return a distance from the line to the given point.

    If segment is true, it will treat the line as a segment which has start and end. Otherwise it will treat the line is infinite.

    Parameters

    • point: Vector3

      A point

    • segment: boolean

      Is the line a segment?

    Returns number

  • length(): number

Generated using TypeDoc