Creates an extent from a coordinate system and a pair of coordinates.
The coordinate system to use.
The bottom-left corner of the extent.
The top-right corner of the extent.
Creates an extent from an object containing the min/max XY values.
The coordinate system to use.
The extent limits.
Creates an extent from the min/max XY values.
The coordinate system to use.
The extent limits.
Creates an extent from the min/max XY values
The coordinate system to use.
The X coordinate of the left side of this extent.
The X coordinate of the righ side of this extent.
The Y coordinate of the bottom side of this extent.
The Y coordinate of the top side of this extent.
Gets the coordinate reference system of this extent.
The maximum X value of this extent (the X coordinate of the right side).
The maximum Y value of this extent (the Y coordinate of the top side).
The minimum X value of this extent (the X coordinate of the left side).
The minimum Y value of this extent (the Y coordinate of the bottom side).
Returns the internal value array in this order: [minX, maxX, minY, maxY]
StaticfullThe bounds of the whole sphere in the 'equirectangular' projection.
StaticwebThe bounds of the Web Mercator (EPSG:3857) projection.
StaticWGS84The bounds of the whole world in the EPSG:4326 projection.
Converts this extent into another CRS.
If crs is the same as the current CRS, the original object is returned.
the new CRS
the converted extent.
the coordinates of the bottom right corner
the coordinates of the bottom right corner
Sets target with the center of this extent.
Optionaltarget: Coordinatesthe coordinate to set with the center's coordinates. If none provided, a new one is created.
the modified object passed in argument.
Sets target with the center of this extent.
Optionaltarget: Vector2the vector to set with the center's coordinates. If none provided, a new one is created.
the modified object passed in argument.
Sets target with the center of this extent.
Note: The z coordinate of the resulting vector will be set to zero.
Optionaltarget: Vector3the vector to set with the center's coordinates. If none provided, a new one is created.
the modified object passed in argument.
Tests whether this extent contains entirely another extent.
the other extent to test
the precision delta (+/- epsilon). If this value is not provided, a reasonable epsilon will be computed.
true if this extent contains the other extent.
Sets the target with the width and height of this extent.
The x property will be set with the width,
and the y property will be set with the height.
the optional target to set with the result.
the modified object passed in argument, or a new object if none was provided.
Returns true if the two extents are equal.
The extent to compare.
The optional comparison epsilon.
true if the extents are equal, otherwise false.
Expands the extent to contain the specified coordinates.
The coordinates to include
Returns an extent that is adjusted so that its edges land exactly at the border of the grid pixels. Optionally, you can specify the minimum pixel size of the resulting extent.
The grid extent.
The grid width, in pixels.
The grid height, in pixels.
OptionalminPixWidth: numberThe minimum width, in pixels, of the resulting extent.
OptionalminPixHeight: numberThe minimum height, in pixels, of the resulting extent.
The adjusted extent and pixel size of the adjusted extent.
Set this extent to the intersection of itself and other
the bounding box to intersect
the modified extent
Returns true if this extent intersects with the specified extent.
the extent to test
true if this extent intersects with the provided extent, false otherwise.
Tests whether this extent is contained in another extent.
the other extent to test
the precision delta (+/- epsilon). If this value is not provided, a reasonable epsilon will be computed.
true if this extent is contained in the other extent.
Checks whether the specified coordinate is inside this extent.
the coordinate to test
the precision delta (+/- epsilon)
true if the coordinate is inside the bounding box
Checks the validity of the extent. Valid extents must not have infinite or NaN values.
true if the extent is valid, false otherwise.
Returns the normalized offset from bottom-left in extent of this Coordinates
the coordinate
optional Vector2 target.
If not present a new one will be created.
normalized offset in extent
Returns the coordinate of the location on the extent that matches U and V, where U and V are normalized (in the range [0, 1]), and U = 0 and V = 0 are the bottom/left corner of the extent, and U = 1 and V = 1 are to top right corner.
The normalized coordinate over the X-axis.
The normalized coordinate over the Y-axis.
Optionaltarget: CoordinatesThe target to store the result. If unspecified, one will be created.
The sampled coordinate.
Sets the values of this extent from a coordinate system and a pair of coordinates.
The coordinate system to use.
The bottom-left corner of the extent.
The top-right corner of the extent.
Sets the values of this extent from an object containing the min/max XY values.
The coordinate system to use.
The extent limits.
Sets the values of this extent from the min/max XY values.
The coordinate system to use.
The extent limits.
Sets the values of this extent from the min/max XY values
The coordinate system to use.
The X coordinate of the left side of this extent.
The X coordinate of the righ side of this extent.
The Y coordinate of the bottom side of this extent.
The Y coordinate of the top side of this extent.
Moves the extent by the provided x and y values.
the horizontal shift
the vertical shift
the modified extent.
Subdivides this extents into x and y subdivisions.
Notes:
1, an array of one element is returned,
containing a copy of this extent.The number of subdivisions on the X/longitude axis.
The number of subdivisions on the Y/latitude axis.
the resulting extents.
Returns a Box3 that matches this extent.
The min height of the box.
The max height of the box.
The box.
Divides this extent into a regular grid. The number of points in each direction is equal to the number of subdivisions + 1. The points are laid out row-wise, from west to east, and north to south:
1 -- 2
| |
3 -- 4
The number of grid subdivisions in the x-axis.
The number of grid subdivisions in the y-axis.
The array to fill.
The number of elements per item (2 for XY, 3 for XYZ).
the target.
the coordinates of the top left corner
the coordinates of the top right corner
Returns an extent grown or shrinked with the specified margin. If the margin is positive, the new extent is bigger, and if the margin is negative the new extent is smaller.
The horizontal margin, in CRS units.
The vertical margin, in CRS units.
a new extent with a specified margin applied.
Returns an extent grown the specified relative margin. The margin is relative to the width or height of the extent.
The margin, in normalized value ([0, 1]). A margin of 1 means 100% of the width or height of the extent.
a new extent with a specified margin applied.
StaticfromConstructs an extent from the specified box.
the coordinate reference system of the new extent.
the box to read values from
the constructed extent.
StaticfromReturns an extent centered at the specified coordinate, and with the specified size.
The CRS identifier.
The center.
The width, in CRS units.
The height, in CRS units.
The produced extent.
StaticfromCreates an extent from parameters of a photosphere in the 'equirectangular' projection for the given image parameters.
See the Google Street View documentation for additional information.
Optionalparams: {The parameters of the image. If undefined, then it returns the extent for the full sphere equivalent to fullEquirectangularProjection
The extent of the image in the 'equirectangular' projection.
A rectangular extent in a specific coordinate system.