WallOutlineGeometry

new Cesium.WallOutlineGeometry(options)

A description of a wall outline. A wall is defined by a series of points, which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
参数名称 类型 描述信息
options object Object with the following properties:
参数名称 类型 默认值 描述信息
positions Array.<Cartesian3> An array of Cartesian objects, which are the points of the wall.
granularity number CesiumMath.RADIANS_PER_DEGREE 可选 The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
maximumHeights Array.<number> 可选 An array parallel to positions that give the maximum height of the wall at positions. If undefined, the height of each position in used.
minimumHeights Array.<number> 可选 An array parallel to positions that give the minimum height of the wall at positions. If undefined, the height at each position is 0.0.
ellipsoid Ellipsoid Ellipsoid.default 可选 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.
使用示例:
// 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);
参考:
  • WallGeometry#createGeometry
  • WallGeometry#fromConstantHeight

成员(属性)

The number of elements used to pack the object into an array.

方法

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

Computes the geometric representation of a wall outline, including its vertices, indices, and a bounding sphere.
参数名称 类型 描述信息
wallGeometry WallOutlineGeometry A description of the wall outline.
返回值:
The computed vertices and indices.

static Cesium.WallOutlineGeometry.fromConstantHeights(options)WallOutlineGeometry

A description of a walloutline. A wall is defined by a series of points, which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
参数名称 类型 描述信息
options object Object with the following properties:
参数名称 类型 默认值 描述信息
positions Array.<Cartesian3> An array of Cartesian objects, which are the points of the wall.
maximumHeight number 可选 A constant that defines the maximum height of the wall at positions. If undefined, the height of each position in used.
minimumHeight number 可选 A constant that defines the minimum height of the wall at positions. If undefined, the height at each position is 0.0.
ellipsoid Ellipsoid Ellipsoid.default 可选 The ellipsoid for coordinate manipulation
返回值:
使用示例:
// 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);
参考:
  • WallOutlineGeometry#createGeometry

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

Stores the provided instance into the provided array.
参数名称 类型 默认值 描述信息
value WallOutlineGeometry The value to pack.
array Array.<number> The array to pack into.
startingIndex number 0 可选 The index into the array at which to start packing the elements.
返回值:
The array that was packed into

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

Retrieves an instance from a packed array.
参数名称 类型 默认值 描述信息
array Array.<number> The packed array.
startingIndex number 0 可选 The starting index of the element to be unpacked.
result WallOutlineGeometry 可选 The object into which to store the result.
返回值:
The modified result parameter or a new WallOutlineGeometry instance if one was not provided.