Skip to main content

LineUtil

Contains utility functions for lines.

Index

Constructors

constructor

Methods

publicstaticcameraScaledLineOnPlaneToRef

  • cameraScaledLineOnPlaneToRef<T>(center: Vertex3, normal: Vertex3, camera: Camera, scale: number, dst: [T, T]): [T, T]

  • Type parameters

    Parameters

    • center: Vertex3

      Center point on the plane to create the line from

    • normal: Vertex3

      The normal of the plane

    • camera: Camera

      The camera used to scale the line size

    • scale: number

      The scale with which to scale the line with

    • dst: [T, T]

      An array of Vertex3 to put the result in

    Returns [T, T]

    The array dst, populated by the two new points making up a line on the plane

publicstaticcameraScaledLineWithParentOnPlaneToRef

  • cameraScaledLineWithParentOnPlaneToRef<T>(center: Vertex3, normal: Vertex3, camera: Camera, scale: number, parent: TransformNode, dst: [T, T]): [T, T]
  • Creates a line from a center that is scaled with the camera distance to the plane


    Type parameters

    Parameters

    • center: Vertex3

      Center point on the plane to create the line from

    • normal: Vertex3

      The normal of the plane

    • camera: Camera

      The camera used to scale the line size

    • scale: number

      The scale with which to scale the line with

    • parent: TransformNode

      The parent of which the parents world matrix is used to transform the points on the line with

    • dst: [T, T]

      An array of Vertex3 to put the result in

    Returns [T, T]

    The array dst, populated by the two new points making up a line on the plane

publicstaticlineOnPlaneToRef

  • lineOnPlaneToRef<T>(centerOnPlane: Vertex3, size: number, dst: [T, T]): [T, T]
  • Creates two points on a plane to form a line, from a point on that plane


    Type parameters

    Parameters

    • centerOnPlane: Vertex3

      The center between the two points on the plane

    • size: number

      the size of the line, so the distance between the two points

    • dst: [T, T]

      An array of two vertex3 where the result is stored

    Returns [T, T]

    The same thing as the param dtys