3 #include "Cartographic.h"
6 #include <CesiumGeometry/Rectangle.h>
7 #include <CesiumUtility/Math.h>
62 double north) noexcept
63 : _west(west), _south(south), _east(east), _north(north) {}
85 double northDegrees) noexcept {
96 constexpr
double getWest() const noexcept {
return this->_west; }
101 void setWest(
double value) noexcept { this->_west = value; }
106 constexpr
double getSouth() const noexcept {
return this->_south; }
111 void setSouth(
double value) noexcept { this->_south = value; }
116 constexpr
double getEast() const noexcept {
return this->_east; }
121 void setEast(
double value) noexcept { this->_east = value; }
126 constexpr
double getNorth() const noexcept {
return this->_north; }
131 void setNorth(
double value) noexcept { this->_north = value; }
178 double east = this->_east;
179 const double west = this->_west;
192 return this->_north - this->_south;
216 bool isEmpty() const noexcept;
255 splitAtAntiMeridian() const noexcept;
276 static
bool equalsEpsilon(
279 double relativeEpsilon) noexcept;
A position defined by longitude, latitude, and height.
A two-dimensional, rectangular region on a globe, specified using longitude and latitude coordinates....
constexpr double getWest() const noexcept
Returns the westernmost longitude, in radians.
constexpr double computeWidth() const noexcept
Computes the width of this rectangle.
constexpr double getNorth() const noexcept
Returns the northernmost latitude, in radians.
Cartographic computeCenter() const noexcept
Computes the Cartographic center position of this rectangle.
static const GlobeRectangle MAXIMUM
The maximum rectangle.
void setNorth(double value) noexcept
Sets the northernmost latitude, in radians.
constexpr GlobeRectangle(double west, double south, double east, double north) noexcept
Constructs a new instance.
constexpr Cartographic getSouthwest() const noexcept
Returns the Cartographic position of the south-west corner.
constexpr Cartographic getNortheast() const noexcept
Returns the Cartographic position of the north-east corner.
static constexpr GlobeRectangle fromDegrees(double westDegrees, double southDegrees, double eastDegrees, double northDegrees) noexcept
constexpr double getEast() const noexcept
Returns the easternmost longitude, in radians.
void setWest(double value) noexcept
Sets the westernmost longitude, in radians.
constexpr Cartographic getSoutheast() const noexcept
Returns the Cartographic position of the south-east corner.
constexpr CesiumGeometry::Rectangle toSimpleRectangle() const noexcept
Returns this rectangle as a CesiumGeometry::Rectangle.
void setSouth(double value) noexcept
Sets the southernmost latitude, in radians.
void setEast(double value) noexcept
Sets the easternmost longitude, in radians.
constexpr double computeHeight() const noexcept
Computes the height of this rectangle.
static const GlobeRectangle EMPTY
An empty rectangle.
constexpr Cartographic getNorthwest() const noexcept
Returns the Cartographic position of the north-west corner.
constexpr double getSouth() const noexcept
Returns the southernmost latitude, in radians.
static constexpr double degreesToRadians(double angleDegrees) noexcept
Converts degrees to radians.
static constexpr double TwoPi
two times pi
Classes for geospatial computations in Cesium.