3 #include "GlobeRectangle.h"
6 #include <glm/vec2.hpp>
41 constexpr
const std::vector<glm::dvec2>&
getVertices()
const {
42 return this->_vertices;
52 constexpr
const std::vector<uint32_t>&
getIndices()
const {
53 return this->_indices;
62 constexpr
const std::optional<CesiumGeospatial::GlobeRectangle>&
64 return this->_boundingRectangle;
78 const std::vector<CesiumGeospatial::CartographicPolygon>&
79 cartographicPolygons) noexcept;
92 const std::vector<CesiumGeospatial::CartographicPolygon>&
93 cartographicPolygons) noexcept;
96 std::vector<glm::dvec2> _vertices;
97 std::vector<uint32_t> _indices;
98 std::optional<CesiumGeospatial::GlobeRectangle> _boundingRectangle;
A 2D polygon expressed as a list of longitude/latitude coordinates in radians.
static bool rectangleIsOutsidePolygons(const CesiumGeospatial::GlobeRectangle &rectangle, const std::vector< CesiumGeospatial::CartographicPolygon > &cartographicPolygons) noexcept
Determines whether a globe rectangle is completely outside all the polygons in a list.
CartographicPolygon(const std::vector< glm::dvec2 > &polygon)
Constructs a 2D polygon that can be rasterized onto Tileset objects.
constexpr const std::vector< uint32_t > & getIndices() const
Returns the triangulated indices representing a triangle decomposition of the polygon....
constexpr const std::vector< glm::dvec2 > & getVertices() const
Returns the longitude-latitude vertices that define the perimeter of the selected polygon.
constexpr const std::optional< CesiumGeospatial::GlobeRectangle > & getBoundingRectangle() const
Returns a GlobeRectangle that represents the bounding rectangle of the polygon.
static bool rectangleIsWithinPolygons(const CesiumGeospatial::GlobeRectangle &rectangle, const std::vector< CesiumGeospatial::CartographicPolygon > &cartographicPolygons) noexcept
Determines whether a globe rectangle is completely inside any of the polygons in a list.
A two-dimensional, rectangular region on a globe, specified using longitude and latitude coordinates....
Classes for geospatial computations in Cesium.