new Cesium.WallGeometry(options)

墙壁的描述,与 NT 0 线条字符串类似. 墙由一系列点来定义, 将它挤到地上 可以选择,它们可以向下挤压到指定的高度.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
positions Array.<Cartesian3> 一系列笛卡尔天体,即壁的点.
granularity number CesiumMath.RADIANS_PER_DEGREE optional The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
maximumHeights Array.<number> optional 与 NT 0 位置 NT 1 平行的阵列,赋予最大高度 墙壁位于 NT 0 位置 NT 1 . 如果未定义,则使用每个位置的高度 .
minimumHeights Array.<number> optional An array parallel to positions that give the minimum height of the 墙壁位于 NT 0 位置 NT 1 . 如果未定义,则每个位置的高度为0.0.
ellipsoid Ellipsoid Ellipsoid.default optional The ellipsoid for coordinate manipulation
vertexFormat VertexFormat VertexFormat.DEFAULT optional The vertex attributes to be computed.
Throws:
  • DeveloperError : positions length must be greater than or equal to 2.
  • DeveloperError : positions and maximumHeights must have the same length.
  • DeveloperError : positions and minimumHeights must have the same length.
Example:
// create a wall that spans from ground level to 10000 meters
const wall = new Cesium.WallGeometry({
  positions : Cesium.Cartesian3.fromDegreesArrayHeights([
    19.0, 47.0, 10000.0,
    19.0, 48.0, 10000.0,
    20.0, 48.0, 10000.0,
    20.0, 47.0, 10000.0,
    19.0, 47.0, 10000.0
  ])
});
const geometry = Cesium.WallGeometry.createGeometry(wall);
Demo:
See:
  • WallGeometry#createGeometry
  • WallGeometry#fromConstantHeight

Members

packedLength : number

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

Methods

static Cesium.WallGeometry.createGeometry(wallGeometry)Geometry|undefined

计算一面墙的几何代表,包括它的顶点,指数,以及边框.
Name Type Description
wallGeometry WallGeometry 城墙简介.
Returns:
计算出的顶点和指数.

static Cesium.WallGeometry.fromConstantHeights(options)WallGeometry

墙壁的描述,与 NT 0 线条字符串类似. 墙由一系列点来定义, 将它挤到地上 可以选择,它们可以向下挤压到指定的高度.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
positions Array.<Cartesian3> 一系列笛卡尔天体,即壁的点.
maximumHeight number optional 定义最大高度的常数 墙壁位于 NT 0 位置 NT 1 . 如果未定义,则使用每个位置的高度 .
minimumHeight number optional 定义最小高度的常数 墙壁位于 NT 0 位置 NT 1 . 如果未定义,则每个位置的高度为0.0.
ellipsoid Ellipsoid Ellipsoid.default optional The ellipsoid for coordinate manipulation
vertexFormat VertexFormat VertexFormat.DEFAULT optional The vertex attributes to be computed.
Returns:
Example:
// create a wall that spans from 10000 meters to 20000 meters
const wall = Cesium.WallGeometry.fromConstantHeights({
  positions : Cesium.Cartesian3.fromDegreesArray([
    19.0, 47.0,
    19.0, 48.0,
    20.0, 48.0,
    20.0, 47.0,
    19.0, 47.0,
  ]),
  minimumHeight : 20000.0,
  maximumHeight : 10000.0
});
const geometry = Cesium.WallGeometry.createGeometry(wall);
See:
  • WallGeometry#createGeometry

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

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

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

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