WallOutlineGeometry

new Cesium.WallOutlineGeometry(options)

对墙的轮廓的描述。墙是由一系列的点构成的,这些点向下延伸到地面。 可选地,它们可以向下挤压到指定的高度。
Name Type Description
options Object 对象,具有以下属性:
Name Type Default Description
positions Array.<Cartesian3> 笛卡尔对象数组,它们是墙的点。
granularity Number CesiumMath.RADIANS_PER_DEGREE optional 每个经度和纬度之间的距离,以弧度表示。确定缓冲区中的位置数。
maximumHeights Array.<Number> optionalpositions并行的数组,给出了在positions处墙的最大高度。如果未定义,则使用每个位置的高度。
minimumHeights Array.<Number> optionalpositions并行的数组,给出了在positions处墙的最小高度。如果未定义,则每个位置的高度为0.0。
ellipsoid Ellipsoid Ellipsoid.WGS84 optional 用于坐标操作的椭球体。
Throws:
Example:
// 创建一个从地面到10000米的墙的轮廓
var 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
  ])
});
var geometry = Cesium.WallOutlineGeometry.createGeometry(wall);
See:
  • WallGeometry#createGeometry
  • WallGeometry#fromConstantHeight

Members

packedLength : Number

用于将对象打包成数组的元素数。

Methods

staticCesium.WallOutlineGeometry.createGeometry(wallGeometry)Geometry|undefined

计算墙的轮廓的几何表示,包括其顶点、索引和包围球。
Name Type Description
wallGeometry WallOutlineGeometry 墙的轮廓的描述。
Returns:
计算的顶点和索引。

staticCesium.WallOutlineGeometry.fromConstantHeights(options)WallOutlineGeometry

对墙的轮廓的描述。墙是由一系列的点构成的,这些点向下延伸到地面。 可选地,它们可以向下挤压到指定的高度。
Name Type Description
options Object 对象,具有以下属性:
Name Type Default Description
positions Array.<Cartesian3> 笛卡尔对象数组,它们是墙的点。
maximumHeight Number optionalpositions并行的数组,给出了在positions处墙的最大高度。如果未定义,则使用每个位置的高度。
minimumHeight Number optionalpositions并行的数组,给出了在positions处墙的最小高度。如果未定义,则每个位置的高度为0.0。
ellipsoid Ellipsoid Ellipsoid.WGS84 optional 用于坐标操作的椭球体。
Returns:
Example:
// 建造一堵从10000米到20000米的墙
var 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
});
var geometry = Cesium.WallOutlineGeometry.createGeometry(wall);
See:
  • WallOutlineGeometry#createGeometry

staticCesium.WallOutlineGeometry.pack(value, array, startingIndex)Array.<Number>

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

staticCesium.WallOutlineGeometry.unpack(array, startingIndex, result)WallOutlineGeometry

从已包装的数组中检索实例。
Name Type Default Description
array Array.<Number> 包装的数组。
startingIndex Number 0 optional 要解包的元素的起始索引。
result WallOutlineGeometry optional 存储结果的对象。
Returns:
修改后的结果参数或新的WallOutlineGeometry实例(如果没有提供)。