Options
All
  • Public
  • Public/Protected
  • All
Menu

Static helper functions for bounding boxes

Hierarchy

  • BBox

Index

Properties

Static none

none: number[] = [Number.MAX_VALUE/2, Number.MAX_VALUE/2, Number.MAX_VALUE/2, -Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE]

Methods

Static areDisjoint

  • areDisjoint(a: ArrayLike<number>, b: ArrayLike<number>): boolean
  • Checks if bounding boxes are disjoint

    Parameters

    • a: ArrayLike<number>

      Bounding box A

    • b: ArrayLike<number>

      Bounding box B

    Returns boolean

    Returns true when bounding boxes are disjoint

Static centre

  • centre(a: ArrayLike<number>): number[]

Static getSizeInView

  • getSizeInView(bBox: number[] | Float32Array, viewDirection: vec3, upDirection: vec3): { depth: number; height: number; width: number }
  • Transforms axis aligned bounding box into current model view and returns width and height

    Parameters

    • bBox: number[] | Float32Array

      Axis aligned bounding box

    • viewDirection: vec3

      Direction of the view

    • upDirection: vec3

      Up direction of the camera

    Returns { depth: number; height: number; width: number }

    • depth: number
    • height: number
    • width: number

Static intersection

  • intersection(a: ArrayLike<number>, b: ArrayLike<number>): number[]
  • Parameters

    • a: ArrayLike<number>
    • b: ArrayLike<number>

    Returns number[]

Static union

  • union(a: ArrayLike<number>, b: ArrayLike<number>): number[]
  • Parameters

    • a: ArrayLike<number>
    • b: ArrayLike<number>

    Returns number[]

Generated using TypeDoc