Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
| Name | Type | Default | Description |
|---|---|---|---|
minimum |
Cartesian3 |
Cartesian3.ZERO
|
optional The minimum point along the x, y, and z axes. |
maximum |
Cartesian3 |
Cartesian3.ZERO
|
optional The maximum point along the x, y, and z axes. |
center |
Cartesian3 | optional The center of the box; automatically computed if not supplied. |
Members
-
The center point of the bounding box.
-
maximum : Cartesian3
-
The maximum point defining the bounding box.
-
Default Value:
Cartesian3.ZERO -
minimum : Cartesian3
-
The minimum point defining the bounding box.
-
Default Value:
Cartesian3.ZERO
Methods
-
staticCesium.AxisAlignedBoundingBox.clone(box, result) → AxisAlignedBoundingBox
-
Duplicates a AxisAlignedBoundingBox instance.
Name Type Description boxAxisAlignedBoundingBox The bounding box to duplicate. resultAxisAlignedBoundingBox optional The object onto which to store the result. Returns:
The modified result parameter or a new AxisAlignedBoundingBox instance if none was provided. (Returns undefined if box is undefined) -
Compares the provided AxisAlignedBoundingBox componentwise and returns
trueif they are equal,falseotherwise.Name Type Description leftAxisAlignedBoundingBox optional The first AxisAlignedBoundingBox. rightAxisAlignedBoundingBox optional The second AxisAlignedBoundingBox. Returns:
trueif left and right are equal,falseotherwise. -
staticCesium.AxisAlignedBoundingBox.fromPoints(positions, result) → AxisAlignedBoundingBox
-
Computes an instance of an AxisAlignedBoundingBox. The box is determined by finding the points spaced the farthest apart on the x, y, and z axes.
Name Type Description positionsArray.<Cartesian3> List of points that the bounding box will enclose. Each point must have a x,y, andzproperties.resultAxisAlignedBoundingBox optional The object onto which to store the result. Returns:
The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.Example:
// Compute an axis aligned bounding box enclosing two points. var box = Cesium.AxisAlignedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]); -
staticCesium.AxisAlignedBoundingBox.intersectPlane(box, plane) → Intersect
-
Determines which side of a plane a box is located.
Name Type Description boxAxisAlignedBoundingBox The bounding box to test. planePlane The plane to test against. Returns:
Intersect.INSIDEif the entire box is on the side of the plane the normal is pointing,Intersect.OUTSIDEif the entire box is on the opposite side, andIntersect.INTERSECTINGif the box intersects the plane. -
clone(result) → AxisAlignedBoundingBox
-
Duplicates this AxisAlignedBoundingBox instance.
Name Type Description resultAxisAlignedBoundingBox optional The object onto which to store the result. Returns:
The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided. -
Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns
trueif they are equal,falseotherwise.Name Type Description rightAxisAlignedBoundingBox optional The right hand side AxisAlignedBoundingBox. Returns:
trueif they are equal,falseotherwise. -
intersectPlane(plane) → Intersect
-
Determines which side of a plane this box is located.
Name Type Description planePlane The plane to test against. Returns:
Intersect.INSIDEif the entire box is on the side of the plane the normal is pointing,Intersect.OUTSIDEif the entire box is on the opposite side, andIntersect.INTERSECTINGif the box intersects the plane.
