Some review changes

This commit is contained in:
Ashley Rogers 2025-07-30 15:51:47 -04:00
parent 81323b6dec
commit e686d69ee3
3 changed files with 19 additions and 15 deletions

View File

@ -78,7 +78,7 @@ public:
*
* @param rectangle The rectangle to be included in the region.
* @returns True if the region was modified, or false if the region already
* contained the position.
* contained the rectangle.
*/
bool expandToIncludeGlobeRectangle(const GlobeRectangle& rectangle);

View File

@ -65,16 +65,20 @@ public:
* @brief Constructs a new `GlobeRectangle` from the provided `Rectangle`.
*
* The rectangle's minimum coordinates will be interpreted as the southwest
* position and the maximum coordinates as the northeast.
* position in radians and the maximum coordinates as the northeast in
* radians.
*
* @param rectangle The rectangle defining the bounds of the new
* `GlobeRectangle`.
*/
constexpr GlobeRectangle(const CesiumGeometry::Rectangle& rectangle) noexcept
: _west(rectangle.minimumX),
_south(rectangle.minimumY),
_east(rectangle.maximumX),
_north(rectangle.maximumY) {}
static constexpr GlobeRectangle
fromRectangleRadians(const CesiumGeometry::Rectangle& rectangle) noexcept {
return GlobeRectangle(
rectangle.minimumX,
rectangle.minimumY,
rectangle.maximumX,
rectangle.maximumY);
}
/**
* Creates a rectangle given the boundary longitude and latitude in degrees.

View File

@ -317,8 +317,8 @@ uint32_t buildQuadtreeNode(
southWestTile.x + 1,
southWestTile.y + 1);
const GlobeRectangle southWestRect{
tilingScheme.tileToRectangle(southWestTile)};
const GlobeRectangle southWestRect = GlobeRectangle::fromRectangleRadians(
tilingScheme.tileToRectangle(southWestTile));
tree.nodes[resultId].children[0][0] = buildQuadtreeNode(
tree,
tilingScheme,
@ -334,8 +334,8 @@ uint32_t buildQuadtreeNode(
}),
southWestTile);
const GlobeRectangle southEastRect{
tilingScheme.tileToRectangle(southEastTile)};
const GlobeRectangle southEastRect = GlobeRectangle::fromRectangleRadians(
tilingScheme.tileToRectangle(southEastTile));
tree.nodes[resultId].children[0][1] = buildQuadtreeNode(
tree,
tilingScheme,
@ -351,8 +351,8 @@ uint32_t buildQuadtreeNode(
}),
southEastTile);
const GlobeRectangle northWestRect{
tilingScheme.tileToRectangle(northWestTile)};
const GlobeRectangle northWestRect = GlobeRectangle::fromRectangleRadians(
tilingScheme.tileToRectangle(northWestTile));
tree.nodes[resultId].children[1][0] = buildQuadtreeNode(
tree,
tilingScheme,
@ -368,8 +368,8 @@ uint32_t buildQuadtreeNode(
}),
northWestTile);
const GlobeRectangle northEastRect{
tilingScheme.tileToRectangle(northEastTile)};
const GlobeRectangle northEastRect = GlobeRectangle::fromRectangleRadians(
tilingScheme.tileToRectangle(northEastTile));
tree.nodes[resultId].children[1][1] = buildQuadtreeNode(
tree,
tilingScheme,