WallGeometry

WallGeometry

new

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.

Parameters:
Name Type Argument Default Description
positions Array An array of Cartesian objects, which are the points of the wall.
options.granularity Number <optional>
CesiumMath.RADIANS_PER_DEGREE The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
maximumHeights Array <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 Array <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 <optional>
Ellipsoid.WGS84 The ellipsoid for coordinate manipulation
options.vertexFormat VertexFormat <optional>
VertexFormat.DEFAULT The vertex attributes to be computed.
Throws:
Example
var positions = [
  Cartographic.fromDegrees(19.0, 47.0, 10000.0),
  Cartographic.fromDegrees(19.0, 48.0, 10000.0),
  Cartographic.fromDegrees(20.0, 48.0, 10000.0),
  Cartographic.fromDegrees(20.0, 47.0, 10000.0),
  Cartographic.fromDegrees(19.0, 47.0, 10000.0)
];

// create a wall that spans from ground level to 10000 meters
var wall = new WallGeometry({
    positions : ellipsoid.cartographicArrayToCartesianArray(positions)
});
var geometry = WallGeometry.createGeometry(wall);
See:
  • WallGeometry#createGeometry
  • WallGeometry#fromConstantHeight
Source:

Methods

<static>

Computes the geometric representation of a wall, including its vertices, indices, and a bounding sphere.

Parameters:
Name Type Description
wallGeometry WallGeometry A description of the wall.
Throws:
DeveloperError : unique positions must be greater than or equal to 2.
Returns:
Geometry The computed vertices and indices.

<static>

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.

Parameters:
Name Type Argument Default Description
positions Array 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 <optional>
Ellipsoid.WGS84 The ellipsoid for coordinate manipulation
options.vertexFormat VertexFormat <optional>
VertexFormat.DEFAULT The vertex attributes to be computed.
Throws:
DeveloperError : positions is required.
Example
var positions = [
  Cartographic.fromDegrees(19.0, 47.0, 10000.0),
  Cartographic.fromDegrees(19.0, 48.0, 10000.0),
  Cartographic.fromDegrees(20.0, 48.0, 10000.0),
  Cartographic.fromDegrees(20.0, 47.0, 10000.0),
  Cartographic.fromDegrees(19.0, 47.0, 10000.0)
];

// create a wall that spans from 10000 meters to 20000 meters
var wall = WallGeometry.fromConstantHeights({
    positions : ellipsoid.cartographicArrayToCartesianArray(positions),
    minimumHeight : 20000.0,
    maximumHeight : 10000.0
});
var geometry = WallGeometry.createGeometry(wall);
See:
  • WallGeometry#createGeometry