new WallGeometry(options)
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 | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Object with the following properties:
|
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.
- WallGeometry#createGeometry
- WallGeometry#fromConstantHeight
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);
Demo:
See:
Source:
Core/WallGeometry.js, line 84
Members
-
packedLength :Number
-
The number of elements used to pack the object into an array.Source: Core/WallGeometry.js, line 130
Methods
-
staticWallGeometry.createGeometry(wallGeometry) → Geometry|undefined
-
Computes the geometric representation of a wall, including its vertices, indices, and a bounding sphere.
Name Type Description wallGeometryWallGeometry A description of the wall. Returns:
The computed vertices and indices.Source: Core/WallGeometry.js, line 353 -
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 positionsArray.<Cartesian3> An array of Cartesian objects, which are the points of the wall. maximumHeightNumber optional A constant that defines the maximum height of the wall at positions. If undefined, the height of each position in used.minimumHeightNumber optional A constant that defines the minimum height of the wall at positions. If undefined, the height at each position is 0.0.ellipsoidEllipsoid Ellipsoid.WGS84optional The ellipsoid for coordinate manipulation options.vertexFormatVertexFormat VertexFormat.DEFAULToptional The vertex attributes to be computed. - WallGeometry#createGeometry
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:
Source: Core/WallGeometry.js, line 303 -
staticWallGeometry.pack(value, array, startingIndex)
-
Stores the provided instance into the provided array.
Name Type Default Description valueObject The value to pack. arrayArray.<Number> The array to pack into. startingIndexNumber 0optional The index into the array at which to start packing the elements. Source: Core/WallGeometry.js, line 141 -
staticWallGeometry.unpack(array, startingIndex, result)
-
Retrieves an instance from a packed array.
Name Type Default Description arrayArray.<Number> The packed array. startingIndexNumber 0optional The starting index of the element to be unpacked. resultWallGeometry optional The object into which to store the result. Source: Core/WallGeometry.js, line 210
