new Cesium.WallOutlineGeometry(options)

墙体轮廓简介. 墙由一系列点来定义, 将它挤到地上 可以选择,它们可以向下挤压到指定的高度.
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
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 outline that spans from ground level to 10000 meters
const wall = new Cesium.WallOutlineGeometry({
  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.WallOutlineGeometry.createGeometry(wall);
See:
  • WallGeometry#createGeometry
  • WallGeometry#fromConstantHeight

Members

packedLength : number

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

Methods

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

计算墙面轮廓的几何表示,包括其顶点、指数和边框.
Name Type Description
wallGeometry WallOutlineGeometry 墙体轮廓简介.
Returns:
计算出的顶点和指数.

static Cesium.WallOutlineGeometry.fromConstantHeights(options)WallOutlineGeometry

墙壁线的描述. 墙由一系列点来定义, 将它挤到地上 可以选择,它们可以向下挤压到指定的高度.
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
Returns:
Example:
// create a wall that spans from 10000 meters to 20000 meters
const wall = Cesium.WallOutlineGeometry.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.WallOutlineGeometry.createGeometry(wall);
See:
  • WallOutlineGeometry#createGeometry

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

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

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

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