# CoplanarPolygonGeometry

#### new Cesium.CoplanarPolygonGeometry(options)
Core/CoplanarPolygonGeometry.js 235

A description of a polygon composed of arbitrary coplanar positions.

Name | Type | Description
--- | --- | ---

`options`

Object

Object with the following properties:

Name | Type | Default | Description
--- | --- | --- | ---
`polygonHierarchy` | PolygonHierarchy |  | A polygon hierarchy that can include holes.
`stRotation` | Number | `0.0` | optional The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
`vertexFormat` | VertexFormat | `VertexFormat.DEFAULT` | optional The vertex attributes to be computed.
`ellipsoid` | Ellipsoid | `Ellipsoid.WGS84` | optional The ellipsoid to be used as a reference.

##### Example:

    var polygonGeometry = new Cesium.CoplanarPolygonGeometry({
     polygonHierarchy: new Cesium.PolygonHierarchy(
        Cesium.Cartesian3.fromDegreesArrayHeights([
         -90.0, 30.0, 0.0,
         -90.0, 30.0, 300000.0,
         -80.0, 30.0, 300000.0,
         -80.0, 30.0, 0.0
      ]))
    });

### Members

#### packedLength : Number
Core/CoplanarPolygonGeometry.js 255

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

### Methods

#### static Cesium.CoplanarPolygonGeometry.createGeometry(polygonGeometry) → Geometry|undefined
Core/CoplanarPolygonGeometry.js 398

Computes the geometric representation of an arbitrary coplanar polygon, including its vertices, indices, and a bounding sphere.

Name | Type | Description
--- | --- | ---
`polygonGeometry` | CoplanarPolygonGeometry | A description of the polygon.

##### Returns:

The computed vertices and indices.

#### static Cesium.CoplanarPolygonGeometry.fromPositions(options) → CoplanarPolygonGeometry
Core/CoplanarPolygonGeometry.js 287

A description of a coplanar polygon from an array of positions.

Name | Type | Description
--- | --- | ---

`options`

Object

Object with the following properties:

Name | Type | Default | Description
--- | --- | --- | ---
`positions` | Array.<Cartesian3> |  | An array of positions that defined the corner points of the polygon.
`vertexFormat` | VertexFormat | `VertexFormat.DEFAULT` | optional The vertex attributes to be computed.
`stRotation` | Number | `0.0` | optional The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
`ellipsoid` | Ellipsoid | `Ellipsoid.WGS84` | optional The ellipsoid to be used as a reference.

##### Returns:

##### Example:

    // create a polygon from points
    var polygon = Cesium.CoplanarPolygonGeometry.fromPositions({
      positions : Cesium.Cartesian3.fromDegreesArray([
        -72.0, 40.0,
        -70.0, 35.0,
        -75.0, 30.0,
        -70.0, 30.0,
        -68.0, 40.0
      ])
    });
    var geometry = Cesium.PolygonGeometry.createGeometry(polygon);

##### See:

- PolygonGeometry#createGeometry

#### static Cesium.CoplanarPolygonGeometry.pack(value, array, startingIndex) → Array.<Number>
Core/CoplanarPolygonGeometry.js 314

Stores the provided instance into the provided array.

Name | Type | Default | Description
--- | --- | --- | ---
`value` | CoplanarPolygonGeometry |  | The value to pack.
`array` | Array.<Number> |  | The array to pack into.
`startingIndex` | Number | `0` | optional The index into the array at which to start packing the elements.

##### Returns:

The array that was packed into

#### static Cesium.CoplanarPolygonGeometry.unpack(array, startingIndex, result) → CoplanarPolygonGeometry
Core/CoplanarPolygonGeometry.js 353

Retrieves an instance from a packed array.

Name | Type | Default | Description
--- | --- | --- | ---
`array` | Array.<Number> |  | The packed array.
`startingIndex` | Number | `0` | optional The starting index of the element to be unpacked.
`result` | CoplanarPolygonGeometry |  | optional The object into which to store the result.

##### Returns:

The modified result parameter or a new CoplanarPolygonGeometry instance if one was not provided.