# BoundingRectangle

#### new Cesium.BoundingRectangle(x, y, width, height)
Core/BoundingRectangle.js 34

  A bounding rectangle given by a corner, width and height.

  Name | Type | Default | Description
  --- | --- | --- | ---
  `x` | Number | `0.0` | optional The x coordinate of the rectangle.
  `y` | Number | `0.0` | optional The y coordinate of the rectangle.
  `width` | Number | `0.0` | optional The width of the rectangle.
  `height` | Number | `0.0` | optional The height of the rectangle.

  ##### See:

  - BoundingSphere

### Members

#### height : Number
Core/BoundingRectangle.js 61

  The height of the rectangle.
  Default Value: `0.0`

#### width : Number
Core/BoundingRectangle.js 54

  The width of the rectangle.
  Default Value: `0.0`

#### x : Number
Core/BoundingRectangle.js 40

  The x coordinate of the rectangle.
  Default Value: `0.0`

#### y : Number
Core/BoundingRectangle.js 47

  The y coordinate of the rectangle.
  Default Value: `0.0`

### Methods

#### staticCesium.BoundingRectangle.clone(rectangle, result) → BoundingRectangle
Core/BoundingRectangle.js 156

  Duplicates a BoundingRectangle instance.

  Name | Type | Description
  --- | --- | ---
  `rectangle` | BoundingRectangle | The bounding rectangle to duplicate.
  `result` | BoundingRectangle | optional The object onto which to store the result.

  ##### Returns:

  The modified result parameter or a new BoundingRectangle instance if one was not provided. (Returns undefined if rectangle is undefined)

#### staticCesium.BoundingRectangle.equals(left, right) → Boolean
Core/BoundingRectangle.js 285

  Compares the provided BoundingRectangles componentwise and returns `true` if they are equal, `false` otherwise.

  Name | Type | Description
  --- | --- | ---
  `left` | BoundingRectangle | optional The first BoundingRectangle.
  `right` | BoundingRectangle | optional The second BoundingRectangle.

  ##### Returns:

  `true` if left and right are equal, `false` otherwise.

#### staticCesium.BoundingRectangle.expand(rectangle, point, result) → BoundingRectangle
Core/BoundingRectangle.js 214

  Computes a bounding rectangle by enlarging the provided rectangle until it contains the provided point.

  Name | Type | Description
  --- | --- | ---
  `rectangle` | BoundingRectangle | A rectangle to expand.
  `point` | Cartesian2 | A point to enclose in a bounding rectangle.
  `result` | BoundingRectangle | optional The object onto which to store the result.

  ##### Returns:

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

#### staticCesium.BoundingRectangle.fromPoints(positions, result) → BoundingRectangle
Core/BoundingRectangle.js 72

  Computes a bounding rectangle enclosing the list of 2D points. The rectangle is oriented with the corner at the bottom left.

  Name | Type | Description
  --- | --- | ---
  `positions` | Array.<Cartesian2> | List of points that the bounding rectangle will enclose. Each point must have `x` and `y` properties.
  `result` | BoundingRectangle | optional The object onto which to store the result.

  ##### Returns:

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

#### staticCesium.BoundingRectangle.fromRectangle(rectangle, projection, result) → BoundingRectangle
Core/BoundingRectangle.js 122

  Computes a bounding rectangle from an rectangle.

  Name | Type | Default | Description
  --- | --- | --- | ---
  `rectangle` | Rectangle |  | The valid rectangle used to create a bounding rectangle.
  `projection` | Object | `GeographicProjection` | optional The projection used to project the rectangle into 2D.
  `result` | BoundingRectangle |  | optional The object onto which to store the result.

  ##### Returns:

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

#### staticCesium.BoundingRectangle.intersect(left, right) → Intersect
Core/BoundingRectangle.js 253

  Determines if two rectangles intersect.

  Name | Type | Description
  --- | --- | ---
  `left` | BoundingRectangle | A rectangle to check for intersection.
  `right` | BoundingRectangle | The other rectangle to check for intersection.

  ##### Returns:

  `Intersect.INTESECTING` if the rectangles intersect, `Intersect.OUTSIDE` otherwise.

#### staticCesium.BoundingRectangle.union(left, right, result) → BoundingRectangle
Core/BoundingRectangle.js 180

  Computes a bounding rectangle that is the union of the left and right bounding rectangles.

  Name | Type | Description
  --- | --- | ---
  `left` | BoundingRectangle | A rectangle to enclose in bounding rectangle.
  `right` | BoundingRectangle | A rectangle to enclose in a bounding rectangle.
  `result` | BoundingRectangle | optional The object onto which to store the result.

  ##### Returns:

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

#### clone(result) → BoundingRectangle
Core/BoundingRectangle.js 301

  Duplicates this BoundingRectangle instance.

  Name | Type | Description
  --- | --- | ---
  `result` | BoundingRectangle | optional The object onto which to store the result.

  ##### Returns:

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

#### equals(right) → Boolean
Core/BoundingRectangle.js 322

  Compares this BoundingRectangle against the provided BoundingRectangle componentwise and returns `true` if they are equal, `false` otherwise.

  Name | Type | Description
  --- | --- | ---
  `right` | BoundingRectangle | optional The right hand side BoundingRectangle.

  ##### Returns:

  `true` if they are equal, `false` otherwise.

#### intersect(right) → Intersect
Core/BoundingRectangle.js 311

  Determines if this rectangle intersects with another.

  Name | Type | Description
  --- | --- | ---
  `right` | BoundingRectangle | A rectangle to check for intersection.

  ##### Returns:

  `Intersect.INTESECTING` if the rectangles intersect, `Intersect.OUTSIDE` otherwise.