import Vector3 from './Vector3'; import * as vec3 from '../glmatrix/vec3'; import Matrix4 from './Matrix4'; /** * Axis aligned bounding box */ declare class BoundingBox { /** * Minimum coords of bounding box */ min: Vector3; /** * Maximum coords of bounding box */ max: Vector3; vertices?: vec3.Vec3Array[]; constructor(min?: Vector3, max?: Vector3); /** * Update min and max coords from a vertices array * @param vertices */ updateFromVertices(vertices: vec3.Vec3Array[]): void; /** * Union operation with another bounding box * @param bbox */ union(bbox: BoundingBox): this; /** * Intersection operation with another bounding box * @param bbox */ intersection(bbox: BoundingBox): this; /** * If intersect with another bounding box * @param bbox */ intersectBoundingBox(bbox: BoundingBox): boolean; /** * If contain another bounding box entirely * @param bbox */ containBoundingBox(bbox: BoundingBox): boolean; /** * If contain point entirely * @param point */ containPoint(p: Vector3): boolean; /** * If bounding box is finite */ isFinite(): boolean; /** * Apply an affine transform matrix to the bounding box * @param matrix */ applyTransform(matrix: Matrix4): void; /** * Get from another bounding box and an affine transform matrix. * @param source * @param matrix */ transformFrom(source: BoundingBox, matrix: Matrix4): this; /** * Apply a projection matrix to the bounding box * @param matrix */ applyProjection(matrix: Matrix4): this; updateVertices(): this; /** * Copy values from another bounding box * @param bbox */ copy(bbox: BoundingBox): this; /** * Clone a new bounding box */ clone(): BoundingBox; } export default BoundingBox;