BoxOutlineGeometry

new Cesium.BoxOutlineGeometry(options)

以原点为中心的立方体轮廓的描述。
Name Type Description
options object 对象,具有以下属性:
Name Type Description
minimum Cartesian3 最小x, y, z坐标来自 box.
maximum Cartesian3 最大x, y, z坐标来自 box.
Example:
const box = new Cesium.BoxOutlineGeometry({
  maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
  minimum : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0)
});
const geometry = Cesium.BoxOutlineGeometry.createGeometry(box);
See:

Members

static Cesium.BoxOutlineGeometry.packedLength : number

用于将对象打包到数组中的元素数量。

Methods

static Cesium.BoxOutlineGeometry.createGeometry(boxGeometry)Geometry|undefined

计算框的轮廓的几何表示,包括其顶点、索引和边界球。
Name Type Description
boxGeometry BoxOutlineGeometry 盒子轮廓的描述。
Returns:
计算的顶点和索引。

static Cesium.BoxOutlineGeometry.fromAxisAlignedBoundingBox(boundingBox)BoxOutlineGeometry

根据AxisAlignedBoundingBox的尺寸创建立方体的轮廓。
Name Type Description
boundingBox AxisAlignedBoundingBox A description of the AxisAlignedBoundingBox.
Returns:
Example:
const aabb = Cesium.AxisAlignedBoundingBox.fromPoints(Cesium.Cartesian3.fromDegreesArray([
     -72.0, 40.0,
     -70.0, 35.0,
     -75.0, 30.0,
     -70.0, 30.0,
     -68.0, 40.0
]));
const box = Cesium.BoxOutlineGeometry.fromAxisAlignedBoundingBox(aabb);

 
See:

static Cesium.BoxOutlineGeometry.fromDimensions(options)BoxOutlineGeometry

创建给定尺寸的以原点为中心的立方体的轮廓。
Name Type Description
options object 对象,具有以下属性:
Name Type Description
dimensions Cartesian3 盒子的宽度、深度和高度分别存储在Cartesian3的x、y和z坐标中。
Returns:
Throws:
  • DeveloperError : All dimensions components must be greater than or equal to zero.
Example:
const box = Cesium.BoxOutlineGeometry.fromDimensions({
  dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
});
const geometry = Cesium.BoxOutlineGeometry.createGeometry(box);
See:

static Cesium.BoxOutlineGeometry.pack(value, array, startingIndex)Array.<number>

将提供的实例存储到提供的数组中。
Name Type Default Description
value BoxOutlineGeometry 要打包的值。
array Array.<number> 要装入的数组。
startingIndex number 0 optional 开始打包元素的数组的索引。
Returns:
被装入的数组

static Cesium.BoxOutlineGeometry.unpack(array, startingIndex, result)BoxOutlineGeometry

从打包数组中检索实例。
Name Type Default Description
array Array.<number> 打包数组。
startingIndex number 0 optional 要解压缩的元素的起始索引。
result BoxOutlineGeometry optional 要在其中存储结果的对象。
Returns:
修改后的结果参数 or a new BoxOutlineGeometry instance if one was not provided.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.