RSX Code Reference
    Preparing search index...

    Class Plane

    The Plane implements a plane represented by a normal and a distance. The class follows the 'copy-on-write' pattern, which means that every operation returns a copy of the plane with updates values. It also implies that the values of the plane cannot be directly modified.

    The concept of immutability improves sharing of objects as all types in TypeScript are assigned by identity, instead of by-value (e.g. a copy) as in other programming languages like C.

    Index
    _d: number
    _normal: Vector3
    • get d(): number

      Returns number

    • set d(value: number): void

      Parameters

      • value: number

      Returns void

    • Copies all properties defined by the prototype of Plane from other to this instance.

      Parameters

      Returns Plane

    • Clones this instance and returns a new Plane with identical values.

      Returns Plane

    • Returns a distance from point to plane.

      Parameters

      Returns number

      Distance to the plane. Will be positive if the point is on the positive side of the plane, negative if on the negative side of the plane, or zero if the point is on the plane.

    • Returns the side of the plane where the point is located on. No side signifies the point is on the plane.

      Parameters

      • point: Immutable<Vector3>

        Point to test.

      • Optionalepsilon: number

        Extra depth of the plane to help with precision issues.

      Returns EnumValue<PlaneSide>

      Side on the plane the point is located on.

    • Returns a string representation of an object.

      Returns string

    • Creates a plane from a normal and a distance from the plane.

      Parameters

      • normal: Immutable<Vector3>

        Plane normal pointing in the positive half-space.

      • distance: number

        Distance of the plane from the origin, along the normal.

      Returns Plane