OrientedBoundingBox
Creates an instance of an OrientedBoundingBox. An OrientedBoundingBox of some object is a closed and convex rectangular cuboid. It can provide a tighter bounding volume than BoundingSphere or AxisAlignedBoundingBox in many cases.
// Create an OrientedBoundingBox using a transformation matrix, a position where the box will be translated, and a scale.
const center = new Cartesian3(1.0, 0.0, 0.0);
const halfAxes = Matrix3.fromScale(new Cartesian3(1.0, 3.0, 2.0), new Matrix3());
const obb = new OrientedBoundingBox(center, halfAxes);
See also
Properties
The center of the box. Default value - Cartesian3.ZERO
The three orthogonal half-axes of the bounding box. Equivalently, the transformation matrix, to rotate and scale a 2x2x2 cube centered at the origin. Default value - Matrix3.ZERO
Functions
Duplicates this OrientedBoundingBox instance.
Computes the eight corners of an oriented bounding box. The corners are ordered by (-X, -Y, -Z), (-X, -Y, +Z), (-X, +Y, -Z), (-X, +Y, +Z), (+X, -Y, -Z), (+X, -Y, +Z), (+X, +Y, -Z), (+X, +Y, +Z).
The distances calculated by the vector from the center of the bounding box to position projected onto direction.
Computes a transformation matrix from an oriented bounding box.
Computes the estimated distance squared from the closest point on a bounding box to a point.
Determines which side of a plane the oriented bounding box is located.
Determines whether or not a bounding box is hidden from view by the occluder.