@JsType(isNative=true,
namespace="Cesium",
name="BoundingRectangle")
public class BoundingRectangle
extends Object
| Modifier and Type | Field and Description |
|---|---|
double |
height
The height of the rectangle.
|
| Constructor and Description |
|---|
BoundingRectangle() |
BoundingRectangle(double x,
double y,
double width,
double height)
A bounding rectangle given by a corner, width and height.
|
| Modifier and Type | Method and Description |
|---|---|
BoundingRectangle |
clone()
Duplicates this BoundingRectangle instance.
|
static BoundingRectangle |
clone(BoundingRectangle rectangle)
Duplicates a BoundingRectangle instance.
|
static BoundingRectangle |
clone(BoundingRectangle rectangle,
BoundingRectangle result)
Duplicates a BoundingRectangle instance.
|
boolean |
equals(BoundingRectangle right)
Compares this BoundingRectangle against the provided BoundingRectangle componentwise and returns true if they are equal, false otherwise.
|
static boolean |
equals(BoundingRectangle left,
BoundingRectangle right)
Compares the provided BoundingRectangles componentwise and returns true if they are equal, false otherwise.
|
static BoundingRectangle |
expand(BoundingRectangle rectangle,
Cartesian2 point)
Computes a bounding rectangle by enlarging the provided rectangle until it contains the provided point.
|
static BoundingRectangle |
expand(BoundingRectangle rectangle,
Cartesian2 point,
BoundingRectangle result)
Computes a bounding rectangle by enlarging the provided rectangle until it contains the provided point.
|
static BoundingRectangle |
fromPoints(Cartesian2[] positions)
Computes a bounding rectangle enclosing the list of 2D points.
|
static BoundingRectangle |
fromPoints(Cartesian2[] positions,
BoundingRectangle result)
Computes a bounding rectangle enclosing the list of 2D points.
|
static BoundingRectangle |
fromRectangle(Rectangle rectangle,
MapProjection projection)
Computes a bounding rectangle from an rectangle.
|
static BoundingRectangle |
fromRectangle(Rectangle rectangle,
MapProjection projection,
BoundingRectangle result)
Computes a bounding rectangle from an rectangle.
|
int |
intersect(BoundingRectangle right)
Determines if this rectangle intersects with another.
|
static int |
intersect(BoundingRectangle left,
BoundingRectangle right)
Determines if two rectangles intersect.
|
static double[] |
pack(BoundingRectangle value,
double[] array)
Stores the provided instance into the provided array.
|
static double[] |
pack(BoundingRectangle value,
double[] array,
int startingIndex)
Stores the provided instance into the provided array.
|
static int |
packedLength()
The number of elements used to pack the object into an array.
|
static BoundingRectangle |
union(BoundingRectangle left,
BoundingRectangle right)
Computes a bounding rectangle that is the union of the left and right bounding rectangles.
|
static BoundingRectangle |
union(BoundingRectangle left,
BoundingRectangle right,
BoundingRectangle result)
Computes a bounding rectangle that is the union of the left and right bounding rectangles.
|
static BoundingRectangle |
unpack(double[] array)
Retrieves an instance from a packed array.
|
static BoundingRectangle |
unpack(double[] array,
int startingIndex)
Retrieves an instance from a packed array.
|
static BoundingRectangle |
unpack(double[] array,
int startingIndex,
BoundingRectangle result)
Retrieves an instance from a packed array.
|
@JsConstructor public BoundingRectangle()
@JsConstructor
public BoundingRectangle(double x,
double y,
double width,
double height)
x - The x coordinate of the rectangle.y - The y coordinate of the rectangle.width - The width of the rectangle.height - The height of the rectangle.@JsProperty(name="packedLength") public static int packedLength()
@JsMethod public static BoundingRectangle clone(BoundingRectangle rectangle)
rectangle - The bounding rectangle to duplicate.@JsMethod public static BoundingRectangle clone(BoundingRectangle rectangle, BoundingRectangle result)
rectangle - The bounding rectangle to duplicate.result - The object onto which to store the result.@JsMethod public static boolean equals(BoundingRectangle left, BoundingRectangle right)
left - The first BoundingRectangle.right - The second BoundingRectangle.@JsMethod public static BoundingRectangle expand(BoundingRectangle rectangle, Cartesian2 point)
rectangle - A rectangle to expand.point - A point to enclose in a bounding rectangle.@JsMethod public static BoundingRectangle expand(BoundingRectangle rectangle, Cartesian2 point, BoundingRectangle result)
rectangle - A rectangle to expand.point - A point to enclose in a bounding rectangle.result - The object onto which to store the result.@JsMethod public static BoundingRectangle fromPoints(Cartesian2[] positions)
positions - List of points that the bounding rectangle will enclose. Each point must have x and y properties.@JsMethod public static BoundingRectangle fromPoints(Cartesian2[] positions, BoundingRectangle result)
positions - List of points that the bounding rectangle will enclose. Each point must have x and y properties.result - The object onto which to store the result.@JsMethod public static BoundingRectangle fromRectangle(Rectangle rectangle, MapProjection projection)
rectangle - The valid rectangle used to create a bounding rectangle.projection - The projection used to project the rectangle into 2D. Default: GeographicProjection@JsMethod public static BoundingRectangle fromRectangle(Rectangle rectangle, MapProjection projection, BoundingRectangle result)
rectangle - The valid rectangle used to create a bounding rectangle.projection - The projection used to project the rectangle into 2D. Default: GeographicProjectionresult - The object onto which to store the result.@JsMethod public static int intersect(BoundingRectangle left, BoundingRectangle right)
left - A rectangle to check for intersection.right - The other rectangle to check for intersection.Intersect.INTERSECTING() if the rectangles intersect, Intersect.OUTSIDE() otherwise.@JsMethod public static double[] pack(BoundingRectangle value, double[] array)
value - The value to pack.array - The array to pack into.@JsMethod public static double[] pack(BoundingRectangle value, double[] array, int startingIndex)
value - The value to pack.array - The array to pack into.startingIndex - The index into the array at which to start packing the elements.@JsMethod public static BoundingRectangle union(BoundingRectangle left, BoundingRectangle right)
left - A rectangle to enclose in bounding rectangle.right - A rectangle to enclose in a bounding rectangle.@JsMethod public static BoundingRectangle union(BoundingRectangle left, BoundingRectangle right, BoundingRectangle result)
left - A rectangle to enclose in bounding rectangle.right - A rectangle to enclose in a bounding rectangle.result - The object onto which to store the result.@JsMethod public static BoundingRectangle unpack(double[] array)
array - The packed array.@JsMethod public static BoundingRectangle unpack(double[] array, int startingIndex)
array - The packed array.startingIndex - The starting index of the element to be unpacked.@JsMethod public static BoundingRectangle unpack(double[] array, int startingIndex, BoundingRectangle result)
array - The packed array.startingIndex - The starting index of the element to be unpacked.result - The object into which to store the result.@JsMethod public BoundingRectangle clone()
@JsMethod public boolean equals(BoundingRectangle right)
right - The right hand side BoundingRectangle.@JsMethod public int intersect(BoundingRectangle right)
right - A rectangle to check for intersection.Intersect.INTERSECTING() if the rectangles intersect, Intersect.OUTSIDE() otherwise}.Copyright © 2019. All rights reserved.