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

    Constructors

    Properties

    area: number

    Gets the total surface area of this box.

    center: number[]

    Gets the point that is in the center of the box.

    isValid: boolean

    Gets the validity of this Box. Boxes are invalid when the base plane or any of the dimension intervals are invalid or decreasing.

    volume: number

    Gets the total volume of this box.

    Methods

    • Parameters

      • point: number[]

        Sample point.

      Returns number[]

      The point on or in the box that is closest to the sample point.

      Finds the closest point on or in the Box. The box should be Valid for this to work.

    • Parameters

      • x: number

        Unitized parameter (between 0 and 1 is inside the box) along box X direction.

      • y: number

        Unitized parameter (between 0 and 1 is inside the box) along box Y direction.

      • z: number

        Unitized parameter (between 0 and 1 is inside the box) along box Z direction.

      Returns number[]

      The point at (x,y,z).

      Evaluates the box volume at the given unitized parameters. The box has idealized side length of 1x1x1.

    • Parameters

      • xform: Transform

        Transformation matrix to apply to this Box.

      Returns boolean

      true if the Box was successfully transformed, false if otherwise.

      Transforms this Box using a Transformation matrix. If the Transform does not preserve Similarity, the dimensions of the resulting box cannot be trusted.