cesium-native
0.41.0
|
A 2D polygon expressed as a list of longitude/latitude coordinates in radians. More...
#include <CesiumGeospatial/CartographicPolygon.h>
Public Member Functions | |
CartographicPolygon (const std::vector< glm::dvec2 > &polygon) | |
Constructs a 2D polygon that can be rasterized onto Tileset objects. More... | |
constexpr const std::vector< glm::dvec2 > & | getVertices () const |
Returns the longitude-latitude vertices that define the perimeter of the selected polygon. More... | |
constexpr const std::vector< uint32_t > & | getIndices () const |
Returns the triangulated indices representing a triangle decomposition of the polygon. The indices are in reference to the polygon's perimeter vertices. More... | |
constexpr const std::optional< CesiumGeospatial::GlobeRectangle > & | getBoundingRectangle () const |
Returns a GlobeRectangle that represents the bounding rectangle of the polygon. More... | |
Static Public Member Functions | |
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. More... | |
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. More... | |
A 2D polygon expressed as a list of longitude/latitude coordinates in radians.
The Ellipsoid associated with the coordinates is not specified directly by this instance, but it is assumed that the longitude values range from -PI to PI radians and the latitude values range from -PI/2 to PI/2 radians. Longitude values outside this range are wrapped to be inside the range. Latitude values are clamped to the range.
Definition at line 24 of file CartographicPolygon.h.
CesiumGeospatial::CartographicPolygon::CartographicPolygon | ( | const std::vector< glm::dvec2 > & | polygon | ) |
Constructs a 2D polygon that can be rasterized onto Tileset objects.
polygon | An array of longitude-latitude points in radians defining the perimeter of the 2D polygon. |
|
inlineconstexpr |
Returns a GlobeRectangle that represents the bounding rectangle of the polygon.
Definition at line 63 of file CartographicPolygon.h.
|
inlineconstexpr |
Returns the triangulated indices representing a triangle decomposition of the polygon. The indices are in reference to the polygon's perimeter vertices.
Definition at line 52 of file CartographicPolygon.h.
|
inlineconstexpr |
Returns the longitude-latitude vertices that define the perimeter of the selected polygon.
Definition at line 41 of file CartographicPolygon.h.
|
staticnoexcept |
Determines whether a globe rectangle is completely outside all the polygons in a list.
rectangle | The CesiumGeospatial::GlobeRectangle of the tile. |
cartographicPolygons | The list of polygons to check. |
|
staticnoexcept |
Determines whether a globe rectangle is completely inside any of the polygons in a list.
rectangle | The CesiumGeospatial::GlobeRectangle of the tile. |
cartographicPolygons | The list of polygons to check. |