new Cesium.BoxGeometry(options)

描述以原产地为中心的立方体.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
minimum Cartesian3 框的最低x,y,和z坐标.
maximum Cartesian3 框的最大x,y,和z坐标.
vertexFormat VertexFormat VertexFormat.DEFAULT optional The vertex attributes to be computed.
Example:
const box = new Cesium.BoxGeometry({
  vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
  maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
  minimum : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0)
});
const geometry = Cesium.BoxGeometry.createGeometry(box);
Demo:
See:

Members

static Cesium.BoxGeometry.packedLength : number

用于将对象组合成数组的元素数量.

Methods

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

计算一个盒子的几何表示,包括它的顶点,指数,以及一个边框.
Name Type Description
boxGeometry BoxGeometry 盒子的描述.
Returns:
计算出的顶点和指数.

static Cesium.BoxGeometry.fromAxisAlignedBoundingBox(boundingBox)BoxGeometry

从 AxisacondingBox 的尺寸创建立方体.
Name Type Description
boundingBox AxisAlignedBoundingBox Axisacent BondingBox的描述. 星洲网.
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.BoxGeometry.fromAxisAlignedBoundingBox(aabb);
See:

static Cesium.BoxGeometry.fromDimensions(options)BoxGeometry

创建以原点为中心的立方体,以大小为准.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
dimensions Cartesian3 存储在x,y,和z坐标的框的宽度,深度和高度分别是 Cartesian3 .
vertexFormat VertexFormat VertexFormat.DEFAULT optional The vertex attributes to be computed.
Returns:
Throws:
  • DeveloperError : All dimensions components must be greater than or equal to zero.
Example:
const box = Cesium.BoxGeometry.fromDimensions({
  vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
  dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
});
const geometry = Cesium.BoxGeometry.createGeometry(box);
See:

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

将所提供的实例存储到所提供的数组中.
Name Type Default Description
value BoxGeometry 包装的价值.
array Array.<number> 装入的阵列.
startingIndex number 0 optional The index into the array at which to start packing the elements.
Returns:
装入的阵列

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

从组合的数组中获取实例 .
Name Type Default Description
array Array.<number> 装填的阵列.
startingIndex number 0 optional The starting index of the element to be unpacked.
result BoxGeometry optional 存储结果的对象.
Returns:
如果未提供修改的结果参数或一个新的BoxGeometry实例.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.