@kognifai/cogsengine
    Preparing search index...

    Class DBoundingBox

    BoundingBox in Double precision. World Coordinates. Used by

    • Scene.getSceneBoundingBox etc.
    • ...
    Index

    Constructors

    • Initializes a new instance of DBoundingBox passing the extents.

      Parameters

      • Optionalmin: dvec3

        Smallest xyz coordinate

      • Optionalmax: dvec3

        Largest xyz coordinate

      Returns DBoundingBox

    Properties

    _max: dvec3
    _min: dvec3

    Accessors

    • get center(): dvec3

      Gets the center position of the bounding box.

      Returns dvec3

    • get data(): Float64Array

      Gets the DBoundingBox as Float64Array length=6, min + max

      Returns Float64Array

    • get extents(): dvec3

      Gets the extents of the bounding box, negative if empty.

      Returns dvec3

    • get max(): dvec3

      Return max coordinate.

      Returns dvec3

      Extents max

    • set max(value: dvec3): void

      Set max coordinate.

      Parameters

      Returns void

    • get min(): dvec3

      Return min coordinate.

      Returns dvec3

      Extents min

    • set min(value: dvec3): void

      Set min coordinate.

      Parameters

      Returns void

    Methods

    • Returns true if empty DBoundingBox (e.g. min[x/y/z] > max)

      Returns boolean

    • Returns true if DBoundingBoxes are equal

      Parameters

      Returns boolean

    • Returns true if bounding box hax max > min in all directions

      Returns boolean

    • Convert to string. Returns "empty" or "{ min[0], min[1] etc. }"

      Returns string

    • Creates a new DBoundingBox passing the extents.

      Parameters

      • Optionalmin: dvec3

        Smallest xyz coordinate

      • Optionalmax: dvec3

        Largest xyz coordinate

      Returns DBoundingBox

      Created Bounding box

    • Create a new DBoundingBox.

      Parameters

      • array: number[] | Float64Array<ArrayBufferLike>

        Array of six numbers: min and max xyz coordinates

      Returns DBoundingBox

      Created instance.