Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 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
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
@@ -0,0 +1,43 @@
#include "CesiumVectorData/VectorStyle.h"

#include <Cesium3DTilesSelection/TilesetContentLoader.h>
#include <CesiumRasterOverlays/RasterOverlay.h>

namespace Cesium3DTilesSelection {
class TilesetContentManager;

/**
* @brief A raster overlay made from rasterizing a \ref
* CesiumVectorData::GeoJsonDocument.
*/
class CESIUMRASTEROVERLAYS_API VectorTilesRasterOverlay final
: public CesiumRasterOverlays::RasterOverlay {

public:
/**
* @brief Creates a new EmbeddedTilesetRasterOverlayTest.
*
* @param asyncSystem The async system to use.
* @param name The user-given name of this polygon layer.
* @param document The GeoJSON document to use for the overlay.
* @param vectorOverlayOptions Options to configure this
* GeoJsonDocumentRasterOverlay.
* @param overlayOptions Options to use for this RasterOverlay.
*/
VectorTilesRasterOverlay(
const std::string& name,
const std::string& url, // todo: accept factory instead of url
const CesiumVectorData::VectorStyle& defaultStyle = {},
const CesiumRasterOverlays::RasterOverlayOptions& overlayOptions = {});

virtual ~VectorTilesRasterOverlay() override = default;

virtual CesiumAsync::Future<CreateTileProviderResult> createTileProvider(
const CesiumRasterOverlays::CreateRasterOverlayTileProviderParameters&
parameters) const override;

private:
std::string _url;
CesiumVectorData::VectorStyle _defaultStyle;
};
} // namespace Cesium3DTilesSelection
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
6 changes: 6 additions & 0 deletions Cesium3DTilesSelection/src/Tileset.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "CesiumRasterOverlays/ActivatedRasterOverlay.h"
#include "TilesetContentManager.h"
#include "TilesetHeightQuery.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
Loading
Loading