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

Method computeIntersection

CesiumGeometry/src/Rectangle.cpp:49–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49std::optional<Rectangle>
50Rectangle::computeIntersection(const Rectangle& other) const noexcept {
51 const double left = glm::max(this->minimumX, other.minimumX);
52 const double bottom = glm::max(this->minimumY, other.minimumY);
53 const double right = glm::min(this->maximumX, other.maximumX);
54 const double top = glm::min(this->maximumY, other.maximumY);
55
56 if (bottom >= top || left >= right) {
57 return std::nullopt;
58 }
59
60 return Rectangle(left, bottom, right, top);
61}
62
63Rectangle Rectangle::computeUnion(const Rectangle& other) const noexcept {
64 return Rectangle(

Callers 9

visitIfNeededMethod · 0.45
buildQuadtreeNodeFunction · 0.45
rasterizeQuadtreeNodeFunction · 0.45
loadTileImageFunction · 0.45
blitImageFunction · 0.45
measureCombinedImageMethod · 0.45
rasterizePolygonsFunction · 0.45
loadQuadtreeTileImageMethod · 0.45

Calls 1

RectangleFunction · 0.50

Tested by

no test coverage detected