WallGeometry

new WallGeometry(positions, maximumHeights, minimumHeights, ellipsoid)

A description of a wall, which is similar to a KML line string. A wall is defined by a series of points, which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
Name Type Default Description
positions Cartesian3[] An array of Cartesian objects, which are the points of the wall.
options.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 Number[] optional 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 Number[] optional 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.WGS84 optional The ellipsoid for coordinate manipulation
options.vertexFormat VertexFormat VertexFormat.DEFAULT optional The vertex attributes to be computed.
Throws:
  • 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
var 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
  ])
});
var geometry = Cesium.WallGeometry.createGeometry(wall);
See:
  • WallGeometry#createGeometry
  • WallGeometry#fromConstantHeight

Methods

staticWallGeometry.createGeometry(wallGeometry)Geometry

Computes the geometric representation of a wall, including its vertices, indices, and a bounding sphere.
Name Type Description
wallGeometry WallGeometry A description of the wall.
Returns:
The computed vertices and indices.
Throws:
  • DeveloperError : unique positions must be greater than or equal to 2.

staticWallGeometry.fromConstantHeights(positions, maximumHeight, minimumHeight, ellipsoid)

A description of a wall, which is similar to a KML line string. A wall is defined by a series of points, which extrude down to the ground. Optionally, they can extrude downwards to a specified height.
Name Type Default Description
positions Cartesian3[] An array of Cartesian objects, which are the points of the wall.
maximumHeight Number optional A constant that defines the maximum height of the wall at positions. If undefined, the height of each position in used.
minimumHeight Number optional 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.WGS84 optional The ellipsoid for coordinate manipulation
options.vertexFormat VertexFormat VertexFormat.DEFAULT optional The vertex attributes to be computed.
Example:
// create a wall that spans from 10000 meters to 20000 meters
var 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
});
var geometry = Cesium.WallGeometry.createGeometry(wall);
See:
  • WallGeometry#createGeometry