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:
Members
-
The number of elements used to pack the object into an array.
-
The height of the rectangle.
-
Default Value:
0.0 -
The width of the rectangle.
-
Default Value:
0.0 -
The x coordinate of the rectangle.
-
Default Value:
0.0 -
The y coordinate of the rectangle.
-
Default Value:
0.0
Methods
-
staticCesium.BoundingRectangle.clone(rectangle, result) → BoundingRectangle
-
Duplicates a BoundingRectangle instance.
Name Type Description rectangleBoundingRectangle The bounding rectangle to duplicate. resultBoundingRectangle 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) -
Compares the provided BoundingRectangles componentwise and returns
trueif they are equal,falseotherwise.Name Type Description leftBoundingRectangle optional The first BoundingRectangle. rightBoundingRectangle optional The second BoundingRectangle. Returns:
trueif left and right are equal,falseotherwise. -
staticCesium.BoundingRectangle.expand(rectangle, point, result) → BoundingRectangle
-
Computes a bounding rectangle by enlarging the provided rectangle until it contains the provided point.
Name Type Description rectangleBoundingRectangle A rectangle to expand. pointCartesian2 A point to enclose in a bounding rectangle. resultBoundingRectangle 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
-
Computes a bounding rectangle enclosing the list of 2D points. The rectangle is oriented with the corner at the bottom left.
Name Type Description positionsArray.<Cartesian2> List of points that the bounding rectangle will enclose. Each point must have xandyproperties.resultBoundingRectangle 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
-
Computes a bounding rectangle from an rectangle.
Name Type Default Description rectangleRectangle The valid rectangle used to create a bounding rectangle. projectionObject GeographicProjectionoptional The projection used to project the rectangle into 2D. resultBoundingRectangle 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
-
Determines if two rectangles intersect.
Name Type Description leftBoundingRectangle A rectangle to check for intersection. rightBoundingRectangle The other rectangle to check for intersection. Returns:
Intersect.INTESECTINGif the rectangles intersect,Intersect.OUTSIDEotherwise. -
Stores the provided instance into the provided array.
Name Type Default Description valueBoundingRectangle 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. Returns:
The array that was packed into -
staticCesium.BoundingRectangle.union(left, right, result) → BoundingRectangle
-
Computes a bounding rectangle that is the union of the left and right bounding rectangles.
Name Type Description leftBoundingRectangle A rectangle to enclose in bounding rectangle. rightBoundingRectangle A rectangle to enclose in a bounding rectangle. resultBoundingRectangle 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.unpack(array, startingIndex, result) → BoundingRectangle
-
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. resultBoundingRectangle optional The object into which to store the result. Returns:
The modified result parameter or a new BoundingRectangle instance if one was not provided. -
clone(result) → BoundingRectangle
-
Duplicates this BoundingRectangle instance.
Name Type Description resultBoundingRectangle optional The object onto which to store the result. Returns:
The modified result parameter or a new BoundingRectangle instance if one was not provided. -
Compares this BoundingRectangle against the provided BoundingRectangle componentwise and returns
trueif they are equal,falseotherwise.Name Type Description rightBoundingRectangle optional The right hand side BoundingRectangle. Returns:
trueif they are equal,falseotherwise. -
intersect(right) → Intersect
-
Determines if this rectangle intersects with another.
Name Type Description rightBoundingRectangle A rectangle to check for intersection. Returns:
Intersect.INTESECTINGif the rectangles intersect,Intersect.OUTSIDEotherwise.
