Selva Compute API Reference - v2.1.0
    Preparing search index...
    Index

    Constructors

    • Parameters

      • from: number[]
      • to: number[]

      Returns Line

    Properties

    direction: number[]

    Gets the direction of this line segment. The length of the direction vector equals the length of the line segment.

    from: number[]

    Start point of line segment.

    isValid: boolean

    Gets a value indicating whether or not this line is valid. Valid lines must have valid start and end points, and the points must not be equal.

    length: number

    Gets or sets the length of this line segment. Note that a negative length will invert the line segment without making the actual length negative. The line From point will remain fixed when a new Length is set.

    to: number[]

    End point of line segment.

    unitTangent: number[]

    Gets the tangent of the line segment. Note that tangent vectors are always unit vectors.

    Methods

    • Parameters

      • t: number

        Parameter to evaluate line segment at. Line parameters are normalized parameters.

      Returns number[]

      The point at the specified parameter.

      Evaluates the line at the specified parameter.

    • Parameters

      • xform: Transform

        Transform to apply to this line.

      Returns boolean

      true on success, false on failure.

      Transform the line using a Transformation matrix.