@webviz/subsurface-viewer
Version:
3D visualization component for subsurface reservoir data
29 lines (28 loc) • 974 B
TypeScript
/**
* 2D bounding box defined as [xmin, ymin, xmax, ymax].
*/
export type BoundingBox2D = [number, number, number, number];
/**
* Returns the bounding box encompassing both boxes.
* @param box1 first box.
* @param box2 second box.
* @param defaultBox in case both boxes are undefined.
* @returns the bounding box encompassing both boxes.
*/
export declare const boxUnion: (box1: BoundingBox2D | undefined, box2: BoundingBox2D | undefined, defaultBox?: BoundingBox2D) => BoundingBox2D;
/**
* 3D point defined as [x, y].
*/
export type Point2D = [number, number];
/**
* Returns the center of the bounding box.
* @param box1 bounding box.
* @returns the center of the bounding box.
*/
export declare const boxCenter: (box: BoundingBox2D) => Point2D;
/**
* Returns true if the bounding box is not empty.
* @param box1 bounding box.
* @returns true if the bounding box is not empty.
*/
export declare const isEmpty: (box: BoundingBox2D | undefined) => boolean;