Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8da5554
First sketches of vector tiles overlay
azrogers Apr 22, 2026
30bbd16
Basic tile selection that doesn't yet work...
azrogers Apr 29, 2026
5f06efd
It works... I think
azrogers May 1, 2026
4a94e9e
It's rasterizing something!
azrogers May 6, 2026
997680e
Primitive restart support
azrogers May 6, 2026
c22f0b9
Fix mutex, add tick
azrogers May 6, 2026
7be2262
Formatting
azrogers May 8, 2026
b9f956b
Merge branch 'main' of github.com:CesiumGS/cesium-native into vector-…
azrogers May 8, 2026
99da4eb
Remove concurrentqueue
azrogers May 8, 2026
9f152d1
Actual test dataset
azrogers May 8, 2026
2d158c2
Improved (?) tick behavior
azrogers May 8, 2026
537b608
Fix I forgot to commit
azrogers May 8, 2026
224f7a5
Add additional constructor to VectorStyle
azrogers May 8, 2026
0e0d06a
thenInWorkerThread crashes... not sure why
azrogers May 8, 2026
693eecd
Algorithm for finding edge loops for triangulated polygon.
azrogers May 12, 2026
94a0b9e
More efficient edge algorithm, still no match for this many polygons
azrogers May 12, 2026
8e70bfb
Generate EXT_mesh_polygon
azrogers May 12, 2026
2a1446f
Working with EXT_mesh_polygon
azrogers May 12, 2026
f7ac37d
Fix duplicate variable name
azrogers May 13, 2026
03dad83
Use raw pointer instead of intrusive pointer for requestedTiles set
azrogers May 13, 2026
11c4120
Reorganize into new library
azrogers May 14, 2026
1eac54c
Real test data for polygons, ion vector tiles loading, format
azrogers May 15, 2026
01f8d1d
Re-privatize TilesetContentManager, address some review comments
azrogers May 22, 2026
b7b59db
More review comments
azrogers May 22, 2026
2a0e295
Remove unused tick behaviors
azrogers May 22, 2026
6225227
Linting and documentation fixes for CI
azrogers May 22, 2026
b321e08
Merge from main
azrogers May 22, 2026
5491182
Fix incorrectly removing CesiumVectorData from Cesium3DTilesSelection…
azrogers May 22, 2026
ff0b152
Fix CI
azrogers May 22, 2026
b37dba3
Fix CI again
azrogers May 22, 2026
6f71bbf
Linting fixes again...
azrogers May 26, 2026
4a4c6da
Add registerAllTileContentTypes
azrogers May 26, 2026
23757c6
Use parent content if no renderable children
azrogers May 27, 2026
6e0816b
Merge branch 'vector-tiles-overlay' of github.com:CesiumGS/cesium-nat…
azrogers May 27, 2026
4f8b75d
Update from review
azrogers May 28, 2026
7fd368a
Don't override constructor
azrogers May 28, 2026
97d6f37
Merge branch 'main' into vector-tiles-overlay
azrogers May 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

### ? - ?

##### Breaking Changes :mega:

- `CesiumRasterOverlays::GeoJsonDocumentRasterOverlay` has been moved to the `CesiumVectorOverlays` library and namespace.

##### Additions :tada:

- Added support for [`EXT_mesh_primitive_edge_visibility`](https://github.com/KhronosGroup/glTF/pull/2479) in `CesiumGltf`, `CesiumGltfReader`, and `CesiumGltfWriter`.
- Added support for [`3DTILES_content_conditional`](https://github.com/CesiumGS/3d-tiles/pull/834) in `Cesium3DTiles`, `Cesium3DTilesReader`, and `Cesium3DTilesWriter`.
- Added `CesiumVectorOverlays::VectorTilesRasterOverlay` supporting vector data loaded from 3D Tiles tilesets.
Comment thread
azrogers marked this conversation as resolved.

### v0.60.0 - 2026-05-01

Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ add_subdirectory(CesiumIonClient)
add_subdirectory(CesiumITwinClient)
add_subdirectory(CesiumQuantizedMeshTerrain)
add_subdirectory(CesiumVectorData)
add_subdirectory(CesiumVectorOverlays)

if(NOT CESIUM_DISABLE_CURL)
add_subdirectory(CesiumCurl)
Expand Down
1 change: 0 additions & 1 deletion Cesium3DTilesSelection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ target_link_libraries(Cesium3DTilesSelection
CesiumQuantizedMeshTerrain
CesiumRasterOverlays
CesiumUtility
CesiumVectorData
spdlog::spdlog
# PRIVATE
libmorton::libmorton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ class CESIUM3DTILESSELECTION_API RasterOverlayCollection final {
*/
size_t size() const noexcept;

void tick() noexcept;
Comment thread
azrogers marked this conversation as resolved.
Outdated

private:
struct GetOverlayFunctor {
CesiumUtility::IntrusivePointer<const CesiumRasterOverlays::RasterOverlay>
Expand All @@ -244,6 +246,9 @@ class CESIUM3DTILESSELECTION_API RasterOverlayCollection final {
std::vector<CesiumUtility::IntrusivePointer<
CesiumRasterOverlays::ActivatedRasterOverlay>>
_activatedOverlays;
std::vector<CesiumUtility::IntrusivePointer<
CesiumRasterOverlays::ActivatedRasterOverlay>>
_tickableOverlays;

CESIUM_TRACE_DECLARE_TRACK_SET(_loadingSlots, "Raster Overlay Loading Slot")
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#pragma once

#include "RasterOverlayUpsampler.h"

#include <Cesium3DTilesSelection/CesiumIonTilesetContentLoaderFactory.h>
Comment thread
azrogers marked this conversation as resolved.
#include <Cesium3DTilesSelection/RasterOverlayCollection.h>
#include <Cesium3DTilesSelection/RasterOverlayUpsampler.h>
#include <Cesium3DTilesSelection/Tile.h>
#include <Cesium3DTilesSelection/TileContent.h>
#include <Cesium3DTilesSelection/TilesetContentLoader.h>
Expand All @@ -18,6 +17,7 @@

#include <vector>


namespace Cesium3DTilesSelection {

/**
Expand Down
4 changes: 2 additions & 2 deletions Cesium3DTilesSelection/src/GltfModifier.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#include "TilesetContentManager.h"

#include <Cesium3DTilesSelection/GltfModifier.h>
#include <Cesium3DTilesSelection/GltfModifierState.h>
#include <Cesium3DTilesSelection/GltfModifierVersionExtension.h>
#include <Cesium3DTilesSelection/LoadedTileEnumerator.h>
#include <Cesium3DTilesSelection/Tile.h>
#include <Cesium3DTilesSelection/TileContent.h>
#include <Cesium3DTilesSelection/TileLoadRequester.h>
#include <Cesium3DTilesSelection/TilesetContentManager.h>
#include <Cesium3DTilesSelection/TilesetExternals.h>
#include <CesiumAsync/AsyncSystem.h>
#include <CesiumAsync/Future.h>
Expand All @@ -20,6 +19,7 @@
#include <optional>
#include <vector>


namespace Cesium3DTilesSelection {

GltfModifier::GltfModifier()
Expand Down
23 changes: 22 additions & 1 deletion Cesium3DTilesSelection/src/RasterOverlayCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ RasterOverlayCollection::RasterOverlayCollection(
: _loadedTiles(loadedTiles),
_externals{externals},
_ellipsoid(ellipsoid),
_activatedOverlays() {}
_activatedOverlays(),
_tickableOverlays() {}

RasterOverlayCollection::~RasterOverlayCollection() noexcept {
for (int64_t i = static_cast<int64_t>(this->_activatedOverlays.size()) - 1;
Expand Down Expand Up @@ -64,6 +65,10 @@ void RasterOverlayCollection::add(
.pLogger = this->_externals.pLogger},
this->_ellipsoid));

if (this->_activatedOverlays.back()->isTickable()) {
this->_tickableOverlays.emplace_back(this->_activatedOverlays.back());
}

CesiumRasterOverlays::RasterOverlayTile* pPlaceholderTile =
this->_activatedOverlays.back()->getPlaceholderTile();

Expand Down Expand Up @@ -151,6 +156,16 @@ void RasterOverlayCollection::remove(
}

this->_activatedOverlays.erase(it);

it = std::find(
this->_tickableOverlays.begin(),
this->_tickableOverlays.end(),
pActivated);
if (it == this->_tickableOverlays.end()) {
return;
}

this->_tickableOverlays.erase(it);
}

std::vector<CesiumGeospatial::Projection>
Expand Down Expand Up @@ -259,4 +274,10 @@ size_t RasterOverlayCollection::size() const noexcept {
return this->_activatedOverlays.size();
}

void RasterOverlayCollection::tick() noexcept {
for (const auto& pOverlay : this->_tickableOverlays) {
pOverlay->tick();
}
}

} // namespace Cesium3DTilesSelection
4 changes: 2 additions & 2 deletions Cesium3DTilesSelection/src/RasterOverlayUpsampler.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "RasterOverlayUpsampler.h"

#include <Cesium3DTilesSelection/RasterMappedTo3DTile.h>
#include <Cesium3DTilesSelection/RasterOverlayUpsampler.h>
#include <Cesium3DTilesSelection/Tile.h>
#include <Cesium3DTilesSelection/TileContent.h>
#include <Cesium3DTilesSelection/TileLoadResult.h>
Expand All @@ -23,6 +22,7 @@
#include <variant>
#include <vector>


using namespace CesiumRasterOverlays;

namespace Cesium3DTilesSelection {
Expand Down
3 changes: 1 addition & 2 deletions Cesium3DTilesSelection/src/Tile.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "TilesetContentManager.h"

#include <Cesium3DTilesSelection/TilesetContentManager.h>
#include <Cesium3DTilesSelection/GltfModifier.h>
#include <Cesium3DTilesSelection/GltfModifierVersionExtension.h>
#include <Cesium3DTilesSelection/RasterMappedTo3DTile.h>
Expand Down
3 changes: 1 addition & 2 deletions Cesium3DTilesSelection/src/TileLoadRequester.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "TilesetContentManager.h"

#include <Cesium3DTilesSelection/TilesetContentManager.h>
#include <Cesium3DTilesSelection/TileLoadRequester.h>
#include <CesiumUtility/Assert.h>

Expand Down
8 changes: 7 additions & 1 deletion Cesium3DTilesSelection/src/Tileset.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "TilesetContentManager.h"
#include "TilesetHeightQuery.h"

#include <CesiumRasterOverlays/ActivatedRasterOverlay.h>
#include <Cesium3DTilesSelection/TilesetContentManager.h>
#include <Cesium3DTilesSelection/BoundingVolume.h>
#include <Cesium3DTilesSelection/ITileExcluder.h>
#include <Cesium3DTilesSelection/LoadedTileEnumerator.h>
Expand Down Expand Up @@ -472,6 +473,11 @@ void Tileset::loadTiles() {
this->_pTilesetContentManager->processWorkerThreadLoadRequests(
this->_options);
this->_pTilesetContentManager->processMainThreadLoadRequests(this->_options);
for (const IntrusivePointer<ActivatedRasterOverlay>& pOverlay :
this->_pTilesetContentManager->getRasterOverlayCollection()
.getActivatedOverlays()) {
pOverlay->tick();
}
}

void Tileset::registerLoadRequester(TileLoadRequester& requester) {
Expand Down
3 changes: 1 addition & 2 deletions Cesium3DTilesSelection/src/TilesetContentLoader.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "TilesetContentManager.h"

#include <Cesium3DTilesSelection/TilesetContentManager.h>
#include <Cesium3DTilesSelection/TileContent.h>
#include <Cesium3DTilesSelection/TileLoadResult.h>
#include <Cesium3DTilesSelection/TilesetContentLoader.h>
Expand Down
5 changes: 2 additions & 3 deletions Cesium3DTilesSelection/src/TilesetContentManager.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include "TilesetContentManager.h"

#include "LayerJsonTerrainLoader.h"
#include "RasterOverlayUpsampler.h"
#include "TileContentLoadInfo.h"
#include "TilesetJsonLoader.h"

#include <Cesium3DTilesSelection/RasterOverlayUpsampler.h>
#include <Cesium3DTilesSelection/TilesetContentManager.h>
#include <Cesium3DTilesSelection/BoundingVolume.h>
#include <Cesium3DTilesSelection/GltfModifier.h>
#include <Cesium3DTilesSelection/GltfModifierState.h>
Expand Down
2 changes: 1 addition & 1 deletion Cesium3DTilesSelection/src/TilesetHeightQuery.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "TilesetHeightQuery.h"

#include "TilesetContentManager.h"
#include <Cesium3DTilesSelection/TilesetContentManager.h>

#include <Cesium3DTilesSelection/BoundingVolume.h>
#include <Cesium3DTilesSelection/ITilesetHeightSampler.h>
Expand Down
2 changes: 1 addition & 1 deletion Cesium3DTilesSelection/test/TestGltfModifier.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "MockTilesetContentManager.h"
#include "TilesetContentManager.h"
#include <Cesium3DTilesSelection/TilesetContentManager.h>

#include <Cesium3DTilesSelection/EllipsoidTilesetLoader.h>
#include <Cesium3DTilesSelection/GltfModifier.h>
Expand Down
2 changes: 1 addition & 1 deletion Cesium3DTilesSelection/test/TestTilesetContentManager.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "SimplePrepareRendererResource.h"
#include "TestTilesetJsonLoader.h"
#include "TilesetContentManager.h"
#include "TilesetJsonLoader.h"

#include <Cesium3DTilesSelection/TilesetContentManager.h>
#include <Cesium3DTilesContent/registerAllTileContentTypes.h>
#include <Cesium3DTilesSelection/GltfModifier.h>
#include <Cesium3DTilesSelection/GltfModifierVersionExtension.h>
Expand Down
13 changes: 13 additions & 0 deletions CesiumGeospatial/include/CesiumGeospatial/CartographicPolygon.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ class CESIUMGEOSPATIAL_API CartographicPolygon final {
*/
CartographicPolygon(const std::vector<glm::dvec2>& polygon);

/**
* @brief Constructs a 2D polygon that can be rasterized onto {@link Cesium3DTilesSelection::Tileset}
* objects.
*
* @param vertices An array of longitude-latitude points in radians defining
* the perimeter of the 2D polygon.
* @param indices An array of indices representing a triangle decomposition of
* the polygon. The indices are in reference to the `vertices` array.
*/
CartographicPolygon(
std::vector<glm::dvec2>&& vertices,
std::vector<uint32_t>&& indices);

/**
* @brief Returns the longitude-latitude vertices that define the
* perimeter of the selected polygon.
Expand Down
7 changes: 7 additions & 0 deletions CesiumGeospatial/src/CartographicPolygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ CartographicPolygon::CartographicPolygon(const std::vector<glm::dvec2>& polygon)
_indices(triangulatePolygon(polygon)),
_boundingRectangle(computeBoundingRectangle(polygon)) {}

CartographicPolygon::CartographicPolygon(
std::vector<glm::dvec2>&& polygon,
std::vector<uint32_t>&& indices)
: _vertices(std::move(polygon)),
_indices(std::move(indices)),
_boundingRectangle(computeBoundingRectangle(this->_vertices)) {}

/*static*/ bool CartographicPolygon::rectangleIsWithinPolygons(
const CesiumGeospatial::GlobeRectangle& rectangle,
const std::vector<CartographicPolygon>& cartographicPolygons) noexcept {
Expand Down
65 changes: 65 additions & 0 deletions CesiumGltf/generated/include/CesiumGltf/ExtensionExtMeshPolygon.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <CesiumGltf/Library.h>
#include <CesiumUtility/ExtensibleObject.h>

#include <cstdint>

namespace CesiumGltf {
/**
* @brief glTF extension adding an encoding of polygon primitive topology
*/
struct CESIUMGLTF_API ExtensionExtMeshPolygon final
: public CesiumUtility::ExtensibleObject {
/**
* @brief The original name of this type.
*/
static constexpr const char* TypeName = "ExtensionExtMeshPolygon";
/** @brief The official name of the extension. This should be the same as its
* key in the `extensions` object. */
static constexpr const char* ExtensionName = "EXT_mesh_polygon";

/**
* @brief Integer number of polygons encoded in the mesh primitive.
*/
int32_t count = -1;

/**
* @brief Index of an accessor containing indices of the polygons' exterior
* and interior loops. The accessor MUST have SCALAR type and an unsigned
* integer component type.
*/
int32_t loopIndices = -1;

/**
* @brief Index of an accessor containing one integer offset per polygon in
* the primitive, indicating the first index of the first linear ring
* associated with that polygon.
*/
int32_t loopIndicesOffsets = -1;

/**
* @brief Index of an accessor containing one integer offset per polygon in
* the primitive, indicating the first index of the first triangle associated
* with that polygon.
*/
int32_t indicesOffsets = -1;

/**
* @brief Calculates the size in bytes of this object, including the contents
* of all collections, pointers, and strings. This will NOT include the size
* of any extensions attached to the object. Calling this method may be slow
* as it requires traversing the object's entire structure.
*/
int64_t getSizeBytes() const {
int64_t accum = 0;
accum += int64_t(sizeof(ExtensionExtMeshPolygon));
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
int64_t(sizeof(CesiumUtility::ExtensibleObject));

return accum;
}
};
} // namespace CesiumGltf
Loading
Loading