Represents a bounds.
More...
#include <luciad/geometries/Bounds.h>
|
static Bounds | boundsUnion (const Bounds &bounds1, const Bounds &bounds2) |
| Returns the union of the two bounds objects, provided they are defined in the same coordinate reference. More...
|
|
static bool | contains2D (const Bounds &bounds, Coordinate coordinate, double eps=0) |
| Checks if this bounds contains the specified coordinate, considering only the x and y values. More...
|
|
static bool | contains2D (const Bounds &bounds1, const Bounds &bounds2, double eps=0) |
| Checks if the first bounds contains the second bounds, only considering x and y values. More...
|
|
static bool | contains3D (const Bounds &bounds, Coordinate coordinate, double eps=0) |
| Checks if the first bounds contains the second bounds. More...
|
|
static bool | interacts2D (const Bounds &bounds1, const Bounds &bounds2, double eps=0) |
| Checks of two given bounds geometries have an interaction, only considering x and y values. More...
|
|
static std::optional< Bounds > | intersection2D (const Bounds &bounds1, const Bounds &bounds2) |
| Returns the intersection of the two given bounds geometries. More...
|
|
|
size_t | getHash () const override |
| Returns the hash value for this geometry. More...
|
|
virtual size_t | getHash () const =0 |
| Returns the hash value for this geometry. More...
|
|
◆ ~Bounds()
luciad::Bounds::~Bounds |
( |
| ) |
|
|
override |
◆ Bounds() [1/4]
luciad::Bounds::Bounds |
( |
const Bounds & |
other | ) |
|
◆ Bounds() [2/4]
luciad::Bounds::Bounds |
( |
Bounds && |
other | ) |
|
|
noexcept |
◆ Bounds() [3/4]
Creates a new bounds instance based on a point, and the width, height and depth with respect to that point.
- Parameters
-
reference | the coordinate reference |
location | the lower left location of the bounds |
width | the width |
height | the height |
depth | the depth |
◆ Bounds() [4/4]
Creates a new bounds instance based on lower left and upper right corners.
This method takes wrap-around the 180° meridian into account when the coordinate reference is geodetic.
- Parameters
-
reference | the coordinate reference |
lowerLeft | the lower left corner of the bounds |
upperRight | the upper right corner of the bounds |
◆ boundsUnion()
static Bounds luciad::Bounds::boundsUnion |
( |
const Bounds & |
bounds1, |
|
|
const Bounds & |
bounds2 |
|
) |
| |
|
static |
Returns the union of the two bounds objects, provided they are defined in the same coordinate reference.
- Parameters
-
bounds1 | the first bounds. |
bounds2 | the second bounds. |
- Returns
- the union of the two bounds objects.
- Exceptions
-
◆ contains2D() [1/2]
static bool luciad::Bounds::contains2D |
( |
const Bounds & |
bounds, |
|
|
Coordinate |
coordinate, |
|
|
double |
eps = 0 |
|
) |
| |
|
static |
Checks if this bounds contains the specified coordinate, considering only the x and y values.
- Returns
- true if this bounds contains the specified coordinate, considering only the x and y values.
◆ contains2D() [2/2]
static bool luciad::Bounds::contains2D |
( |
const Bounds & |
bounds1, |
|
|
const Bounds & |
bounds2, |
|
|
double |
eps = 0 |
|
) |
| |
|
static |
Checks if the first bounds contains the second bounds, only considering x and y values.
- Parameters
-
bounds1 | a bounds instance. |
bounds2 | an other bounds instance. |
eps | a tolerance for the contains check. |
- Returns
- if the first bounds contains the second bounds.
- Exceptions
-
◆ contains3D()
static bool luciad::Bounds::contains3D |
( |
const Bounds & |
bounds, |
|
|
Coordinate |
coordinate, |
|
|
double |
eps = 0 |
|
) |
| |
|
static |
Checks if the first bounds contains the second bounds.
- Parameters
-
bounds | a bounds instance. |
coordinate | a coordinate. |
eps | a tolerance for the contains check. |
- Returns
- true if this bounds contains the specified coordinate.
◆ getBounds()
Bounds luciad::Bounds::getBounds |
( |
| ) |
const |
|
overridevirtual |
Returns the bounds for the geometry object.
- Returns
- the bounds for the geometry object.
- Exceptions
-
Implements luciad::Geometry.
◆ getCenter()
Returns the center of this bounds instance.
When this bounds uses a geodetic reference, this method normalizes the result.
- Returns
- the center of this bounds instance.
◆ getDepth()
double luciad::Bounds::getDepth |
( |
| ) |
const |
Returns the depth of this bounds instance.
- Returns
- the depth of this bounds instance.
◆ getHash()
size_t luciad::Bounds::getHash |
( |
| ) |
const |
|
overrideprotectedvirtual |
Returns the hash value for this geometry.
- Returns
- the hash value for this geometry.
Implements luciad::Geometry.
◆ getHeight()
double luciad::Bounds::getHeight |
( |
| ) |
const |
Returns the height of this bounds instance.
- Returns
- the height of this bounds instance.
◆ getLocation()
Returns the lower left corner of this bounds instance.
- Returns
- the lower left corner of this bounds instance.
◆ getLowerLeftCorner()
Coordinate luciad::Bounds::getLowerLeftCorner |
( |
| ) |
const |
Returns the lower left corner of this bounds instance.
When this bounds uses a geodetic reference, this method normalizes the result.
- Returns
- the lower left corner of this bounds instance.
◆ getLowerRightCorner()
Coordinate luciad::Bounds::getLowerRightCorner |
( |
| ) |
const |
Returns the lower right corner of this bounds instance.
When this bounds uses a geodetic reference, this method normalizes the result.
- Returns
- the lower right corner of this bounds instance.
◆ getReference()
Returns the coordinate reference of the geometry.
- Returns
- the coordinate reference of the geometry.
Implements luciad::Geometry.
◆ getUpperLeftCorner()
Coordinate luciad::Bounds::getUpperLeftCorner |
( |
| ) |
const |
Returns the upper left corner of this bounds instance.
When this bounds uses a geodetic reference, this method normalizes the result.
- Returns
- the upper left corner of this bounds instance.
◆ getUpperRightCorner()
Coordinate luciad::Bounds::getUpperRightCorner |
( |
| ) |
const |
Returns the upper right corner of this bounds instance.
When this bounds uses a geodetic reference, this method normalizes the result.
- Returns
- the upper right corner of this bounds instance.
◆ getWidth()
double luciad::Bounds::getWidth |
( |
| ) |
const |
Returns the width of this bounds instance.
- Returns
- the width of this bounds instance.
◆ interacts2D()
static bool luciad::Bounds::interacts2D |
( |
const Bounds & |
bounds1, |
|
|
const Bounds & |
bounds2, |
|
|
double |
eps = 0 |
|
) |
| |
|
static |
Checks of two given bounds geometries have an interaction, only considering x and y values.
- Parameters
-
bounds1 | the first bounds. |
bounds2 | the second bounds. |
eps | a tolerance for the interaction check. |
- Returns
- true if the two bounds interact in 2D.
- Exceptions
-
◆ intersection2D()
static std::optional< Bounds > luciad::Bounds::intersection2D |
( |
const Bounds & |
bounds1, |
|
|
const Bounds & |
bounds2 |
|
) |
| |
|
static |
Returns the intersection of the two given bounds geometries.
- Parameters
-
bounds1 | a bounds instance |
bounds2 | an other bounds instance |
- Returns
- the intersection of the given bounds geometries. If geodetic bounds, the result is normalized.
◆ operator!=()
bool luciad::Bounds::operator!= |
( |
const Bounds & |
other | ) |
const |
◆ operator=()
◆ operator==()
bool luciad::Bounds::operator== |
( |
const Bounds & |
other | ) |
const |