BoxOutlineGeometry - Cesium Documentation

# BoxOutlineGeometry

#### new BoxOutlineGeometry()

  A description of the outline of a cube centered at the origin.

  Name | Type | Description
  --- | --- | ---
  `options.minimumCorner` | Cartesian3 | The minimum x, y, and z coordinates of the box.
  `options.maximumCorner` | Cartesian3 | The maximum x, y, and z coordinates of the box.

  ##### Example:

      var box = new Cesium.BoxOutlineGeometry({
        maximumCorner : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
        minimumCorner : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0)
      });
      var geometry = Cesium.BoxOutlineGeometry.createGeometry(box);

  ##### Demo:

  - Cesium Sandcastle Box Outline Demo

  ##### See:

  - BoxOutlineGeometry.fromDimensions
  - BoxOutlineGeometry.createGeometry
  - Packable
  Source: Core/BoxOutlineGeometry.js, line 50

### Members

#### staticBoxOutlineGeometry.packedLength :Number

  The number of elements used to pack the object into an array.
  Source: Core/BoxOutlineGeometry.js, line 113

### Methods

#### staticBoxOutlineGeometry.createGeometry(boxGeometry) → Geometry

  Computes the geometric representation of an outline of a box, including its vertices, indices, and a bounding sphere.

  Name | Type | Description
  --- | --- | ---
  `boxGeometry` | BoxOutlineGeometry | A description of the box outline.

  ##### Returns:

  The computed vertices and indices.
  Source: Core/BoxOutlineGeometry.js, line 181

#### staticBoxOutlineGeometry.fromDimensions()

  Creates an outline of a cube centered at the origin given its dimensions.

  Name | Type | Description
  --- | --- | ---
  `options.dimensions` | Cartesian3 | The width, depth, and height of the box stored in the x, y, and z coordinates of the `Cartesian3`, respectively.

  ##### Throws:

  - DeveloperError : All dimensions components must be greater than or equal to zero.

  ##### Example:

      var box = Cesium.BoxOutlineGeometry.fromDimensions({
        dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
      });
      var geometry = Cesium.BoxOutlineGeometry.createGeometry(box);

  ##### See:

  - BoxOutlineGeometry.createGeometry
  Source: Core/BoxOutlineGeometry.js, line 85

#### staticBoxOutlineGeometry.pack(value, array, startingIndex)

  Stores the provided instance into the provided array.

  Name | Type | Default | Description
  --- | --- | --- | ---
  `value` | Object |  | 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.

  Source: Core/BoxOutlineGeometry.js, line 123

#### staticBoxOutlineGeometry.unpack(array, startingIndex, result)

  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` | BoxOutlineGeometry |  | optional The object into which to store the result.

  Source: Core/BoxOutlineGeometry.js, line 153