AxisAlignedBoundingBox

new Cesium.AxisAlignedBoundingBox(minimum, maximum, center)

Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
参数名称 类型 默认值 描述信息
minimum Cartesian3 Cartesian3.ZERO 可选 The minimum point along the x, y, and z axes.
maximum Cartesian3 Cartesian3.ZERO 可选 The maximum point along the x, y, and z axes.
center Cartesian3 可选 The center of the box; automatically computed if not supplied.
参考:

成员(属性)

The center point of the bounding box.
The maximum point defining the bounding box.
默认值: Cartesian3.ZERO
The minimum point defining the bounding box.
默认值: Cartesian3.ZERO

方法

static Cesium.AxisAlignedBoundingBox.clone(box, result)AxisAlignedBoundingBox

Duplicates a AxisAlignedBoundingBox instance.
参数名称 类型 描述信息
box AxisAlignedBoundingBox The bounding box to duplicate.
result AxisAlignedBoundingBox 可选 The object onto which to store the result.
返回值:
The modified result parameter or a new AxisAlignedBoundingBox instance if none was provided. (Returns undefined if box is undefined)

static Cesium.AxisAlignedBoundingBox.equals(left, right)boolean

Compares the provided AxisAlignedBoundingBox componentwise and returns true if they are equal, false otherwise.
参数名称 类型 描述信息
left AxisAlignedBoundingBox 可选 The first AxisAlignedBoundingBox.
right AxisAlignedBoundingBox 可选 The second AxisAlignedBoundingBox.
返回值:
true if left and right are equal, false otherwise.

static Cesium.AxisAlignedBoundingBox.fromCorners(minimum, maximum, result)AxisAlignedBoundingBox

Creates an instance of an AxisAlignedBoundingBox from its corners.
参数名称 类型 描述信息
minimum Cartesian3 The minimum point along the x, y, and z axes.
maximum Cartesian3 The maximum point along the x, y, and z axes.
result AxisAlignedBoundingBox 可选 The object onto which to store the result.
返回值:
The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
使用示例:
// Compute an axis aligned bounding box from the two corners.
const box = Cesium.AxisAlignedBoundingBox.fromCorners(new Cesium.Cartesian3(-1, -1, -1), new Cesium.Cartesian3(1, 1, 1));

static Cesium.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.
参数名称 类型 描述信息
positions Array.<Cartesian3> List of points that the bounding box will enclose. Each point must have a x, y, and z properties.
result AxisAlignedBoundingBox 可选 The object onto which to store the result.
返回值:
The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
使用示例:
// Compute an axis aligned bounding box enclosing two points.
const box = Cesium.AxisAlignedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);

static Cesium.AxisAlignedBoundingBox.intersectPlane(box, plane)Intersect

Determines which side of a plane a box is located.
参数名称 类型 描述信息
box AxisAlignedBoundingBox The bounding box to test.
plane Plane The plane to test against.
返回值:
Intersect.INSIDE if the entire box is on the side of the plane the normal is pointing, Intersect.OUTSIDE if the entire box is on the opposite side, and Intersect.INTERSECTING if the box intersects the plane.
Duplicates this AxisAlignedBoundingBox instance.
参数名称 类型 描述信息
result AxisAlignedBoundingBox 可选 The object onto which to store the result.
返回值:
The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns true if they are equal, false otherwise.
参数名称 类型 描述信息
right AxisAlignedBoundingBox 可选 The right hand side AxisAlignedBoundingBox.
返回值:
true if they are equal, false otherwise.
Determines which side of a plane this box is located.
参数名称 类型 描述信息
plane Plane The plane to test against.
返回值:
Intersect.INSIDE if the entire box is on the side of the plane the normal is pointing, Intersect.OUTSIDE if the entire box is on the opposite side, and Intersect.INTERSECTING if the box intersects the plane.