MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / getVertices

Method getVertices

CesiumGeospatial/src/S2CellID.cpp:106–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104} // namespace
105
106std::array<Cartographic, 4> S2CellID::getVertices() const {
107 GoogleS2CellID cell(this->_id);
108 R2Rect rect = cell.GetBoundUV();
109 int face = cell.face();
110 return {
111 toCartographic(S2::FaceUVtoXYZ(face, rect.GetVertex(0, 0))),
112 toCartographic(S2::FaceUVtoXYZ(face, rect.GetVertex(1, 0))),
113 toCartographic(S2::FaceUVtoXYZ(face, rect.GetVertex(1, 1))),
114 toCartographic(S2::FaceUVtoXYZ(face, rect.GetVertex(0, 1)))};
115}
116
117S2CellID S2CellID::getParent() const {
118 return S2CellID(GoogleS2CellID(this->_id).parent().id());

Callers 6

TestS2CellID.cppFile · 0.45
rasterizePolygonsFunction · 0.45
drawPolygonMethod · 0.45

Calls 1

toCartographicFunction · 0.85

Tested by

no test coverage detected