A description of a cartographic rectangle on an ellipsoid centered at the origin. Rectangle geometry can be rendered with both Primitive and GroundPrimitive.
alias RectangleGeometry
{Object} options Object with the following properties:
{Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
{VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
{Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
{Number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
{Number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
{Number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
{Number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
{Number} [options.extrudedHeight] The distance in meters between the rectangle's extruded face and the ellipsoid surface.
{Boolean} [options.closeTop=true] Specifies whether the rectangle has a top cover when extruded.
{Boolean} [options.closeBottom=true] Specifies whether the rectangle has a bottom cover when extruded.
exception {DeveloperError} options.rectangle.north must be in the interval [-Pi/2, Pi/2].
exception {DeveloperError} options.rectangle.south must be in the interval [-Pi/2, Pi/2].
exception {DeveloperError} options.rectangle.east must be in the interval [-Pi, Pi].
exception {DeveloperError} options.rectangle.west must be in the interval [-Pi, Pi].
exception {DeveloperError} options.rectangle.north must be greater than options.rectangle.south.
A description of a cartographic rectangle on an ellipsoid centered at the origin. Rectangle geometry can be rendered with both Primitive and GroundPrimitive.
alias RectangleGeometry
exception {DeveloperError}
options.rectangle.north
must be in the interval [-Pi/2
,Pi/2
]. exception {DeveloperError}options.rectangle.south
must be in the interval [-Pi/2
,Pi/2
]. exception {DeveloperError}options.rectangle.east
must be in the interval [-Pi
,Pi
]. exception {DeveloperError}options.rectangle.west
must be in the interval [-Pi
,Pi
]. exception {DeveloperError}options.rectangle.north
must be greater thanoptions.rectangle.south
.// 1. create an rectangle var rectangle = new Cesium.RectangleGeometry({ ellipsoid : Cesium.Ellipsoid.WGS84, rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0), height : 10000.0 }); var geometry = Cesium.RectangleGeometry.createGeometry(rectangle); // 2. create an extruded rectangle without a top var rectangle = new Cesium.RectangleGeometry({ ellipsoid : Cesium.Ellipsoid.WGS84, rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0), height : 10000.0, extrudedHeight: 300000, closeTop: false }); var geometry = Cesium.RectangleGeometry.createGeometry(rectangle);
RectangleGeometry#createGeometry demo Sandcastle Rectangle Demo