diff --git a/CHANGES.md b/CHANGES.md index 441ec56e58..30aa066d68 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,10 +2,16 @@ ### ? - ? +##### 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. +- `GeoJsonDocumentRasterOverlay` and `VectorTilesRasterOverlay` can now display points. - Added support for feature IDs in glTF translated from `MAXAR_content_geojson` tiles. ### v0.60.0 - 2026-05-01 diff --git a/CMakeLists.txt b/CMakeLists.txt index f16184f392..16e90cd1ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/Cesium3DTilesSelection/include/Cesium3DTilesSelection/Tileset.h b/Cesium3DTilesSelection/include/Cesium3DTilesSelection/Tileset.h index 3e85b90037..c0b275d35e 100644 --- a/Cesium3DTilesSelection/include/Cesium3DTilesSelection/Tileset.h +++ b/Cesium3DTilesSelection/include/Cesium3DTilesSelection/Tileset.h @@ -205,6 +205,13 @@ class CESIUM3DTILESSELECTION_API Tileset final { */ const Tile* getRootTile() const noexcept; + /** + * @brief Gets the root tile of this tileset. + * + * This may be `nullptr` if there is currently no root tile. + */ + Tile* getRootTile() noexcept; + /** * @brief Returns the {@link RasterOverlayCollection} of this tileset. */ @@ -438,6 +445,21 @@ class CESIUM3DTILESSELECTION_API Tileset final { */ void loadTiles(); + /** + * @brief Updates the content of the given tile based on its current state. + * + * This may involve steps such as updating tile properties based on content, + * creating tile children, handling tile unloading, and more. + * + * @note This is automatically called as part of the normal tile selection + * process, such as when using \ref updateViewGroup or \ref + * updateViewGroupOffline. This method should only be called manually when + * tile selection is being driven by code external to the `Tileset`. + * + * @param tile The tile to update. + */ + void updateTileContent(Tile& tile); + /** * @brief Registers a tile load requester with this Tileset. Registered tile * load requesters get to influence which tiles are loaded when diff --git a/Cesium3DTilesSelection/src/Tileset.cpp b/Cesium3DTilesSelection/src/Tileset.cpp index e8050118a0..82576d831a 100644 --- a/Cesium3DTilesSelection/src/Tileset.cpp +++ b/Cesium3DTilesSelection/src/Tileset.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -170,6 +171,10 @@ const Tile* Tileset::getRootTile() const noexcept { return this->_pTilesetContentManager->getRootTile(); } +Tile* Tileset::getRootTile() noexcept { + return this->_pTilesetContentManager->getRootTile(); +} + RasterOverlayCollection& Tileset::getOverlays() noexcept { return this->_pTilesetContentManager->getRasterOverlayCollection(); } @@ -472,6 +477,15 @@ void Tileset::loadTiles() { this->_pTilesetContentManager->processWorkerThreadLoadRequests( this->_options); this->_pTilesetContentManager->processMainThreadLoadRequests(this->_options); + for (const IntrusivePointer& pOverlay : + this->_pTilesetContentManager->getRasterOverlayCollection() + .getActivatedOverlays()) { + pOverlay->tick(); + } +} + +void Tileset::updateTileContent(Tile& tile) { + this->_pTilesetContentManager->updateTileContent(tile, this->_options); } void Tileset::registerLoadRequester(TileLoadRequester& requester) { diff --git a/CesiumGltf/generated/include/CesiumGltf/ExtensionExtMeshPolygon.h b/CesiumGltf/generated/include/CesiumGltf/ExtensionExtMeshPolygon.h new file mode 100644 index 0000000000..40abe2d26f --- /dev/null +++ b/CesiumGltf/generated/include/CesiumGltf/ExtensionExtMeshPolygon.h @@ -0,0 +1,65 @@ +// This file was generated by generate-classes. +// DO NOT EDIT THIS FILE! +#pragma once + +#include +#include + +#include + +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 diff --git a/CesiumGltf/generated/include/CesiumGltf/ExtensionKhrGaussianSplatting.h b/CesiumGltf/generated/include/CesiumGltf/ExtensionKhrGaussianSplatting.h index 40f83fddf1..01d5a3c83a 100644 --- a/CesiumGltf/generated/include/CesiumGltf/ExtensionKhrGaussianSplatting.h +++ b/CesiumGltf/generated/include/CesiumGltf/ExtensionKhrGaussianSplatting.h @@ -22,8 +22,7 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final static constexpr const char* ExtensionName = "KHR_gaussian_splatting"; /** - * @brief Known values for Property specifying parameters regarding the kernel - * used to generate the Gaussians. + * @brief Known values for The kernel used to generate the Gaussians. */ struct Kernel { /** @brief `ellipse` */ @@ -31,8 +30,7 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final }; /** - * @brief Known values for Property specifying the color space of the - * spherical harmonics. + * @brief Known values for The color space of the reconstructed color values. */ struct ColorSpace { /** @brief `srgb_rec709_display` */ @@ -43,9 +41,7 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final }; /** - * @brief Known values for Optional property specifying how to project the - * Gaussians to achieve a perspective correct value. This property defaults to - * perspective. + * @brief Known values for The projection method for rendering the Gaussians. */ struct Projection { /** @brief `perspective` */ @@ -53,8 +49,7 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final }; /** - * @brief Known values for Optional property specifying how to sort the - * Gaussians during rendering. This property defaults to cameraDistance. + * @brief Known values for The sorting method for rendering the Gaussians. */ struct SortingMethod { /** @brief `cameraDistance` */ @@ -62,8 +57,7 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final }; /** - * @brief Property specifying parameters regarding the kernel used to generate - * the Gaussians. + * @brief The kernel used to generate the Gaussians. * * Known values are defined in {@link Kernel}. * @@ -71,7 +65,7 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final std::string kernel = Kernel::ellipse; /** - * @brief Property specifying the color space of the spherical harmonics. + * @brief The color space of the reconstructed color values. * * Known values are defined in {@link ColorSpace}. * @@ -79,8 +73,7 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final std::string colorSpace = ColorSpace::srgb_rec709_display; /** - * @brief Optional property specifying how to project the Gaussians to achieve - * a perspective correct value. This property defaults to perspective. + * @brief The projection method for rendering the Gaussians. * * Known values are defined in {@link Projection}. * @@ -88,8 +81,7 @@ struct CESIUMGLTF_API ExtensionKhrGaussianSplatting final std::string projection = Projection::perspective; /** - * @brief Optional property specifying how to sort the Gaussians during - * rendering. This property defaults to cameraDistance. + * @brief The sorting method for rendering the Gaussians. * * Known values are defined in {@link SortingMethod}. * diff --git a/CesiumGltf/include/CesiumGltf/AccessorUtility.h b/CesiumGltf/include/CesiumGltf/AccessorUtility.h index 3cc23a96cc..a18589035c 100644 --- a/CesiumGltf/include/CesiumGltf/AccessorUtility.h +++ b/CesiumGltf/include/CesiumGltf/AccessorUtility.h @@ -154,6 +154,49 @@ typedef std::variant< IndexAccessorType getIndexAccessorView(const Model& model, const MeshPrimitive& primitive); +/** + * Retrieves an indices accessor view of the accessor at the given index. + */ +IndexAccessorType getIndexAccessorView(const Model& model, int32_t index); + +/** + * Visitor that returns the number of indices contained in an IndexAccessorType + * variant. + */ +struct NumIndicesFromAccessor { + /** + * @brief Attempts to obtain a number of indices from an empty + * IndexAccessorType, resulting in 0. + */ + int64_t operator()(std::monostate) { return 0; } + + /** + * @brief Attempts to obtain a number of indices from an \ref AccessorView. + */ + template int64_t operator()(const AccessorView& value) { + return value.size(); + } +}; + +/** + * @brief Returns the maximum possible index value for the given + * IndexAccessorType. + */ +struct MaxIndexValueFromAccessor { + /** + * @brief Attempts to obtain a maximum index value from an empty + * IndexAccessorType, resulting in -1. + */ + int64_t operator()(std::monostate) { return -1; } + + /** + * @brief Attempts to obtain a maximum index value from an \ref AccessorView. + */ + template int64_t operator()(const AccessorView& /*value*/) { + return static_cast(std::numeric_limits::max()); + } +}; + /** * Visitor that retrieves the vertex indices from the given accessor type * corresponding to a given face index. These indices are returned as an array diff --git a/CesiumGltf/src/AccessorUtility.cpp b/CesiumGltf/src/AccessorUtility.cpp index db5443b87b..8cb84c29fb 100644 --- a/CesiumGltf/src/AccessorUtility.cpp +++ b/CesiumGltf/src/AccessorUtility.cpp @@ -117,12 +117,15 @@ FeatureIdAccessorType getFeatureIdAccessorView( IndexAccessorType getIndexAccessorView(const Model& model, const MeshPrimitive& primitive) { - if (primitive.indices < 0) { + return getIndexAccessorView(model, primitive.indices); +} + +IndexAccessorType getIndexAccessorView(const Model& model, int32_t index) { + if (index < 0) { return IndexAccessorType(); } - const Accessor* pAccessor = - model.getSafe(&model.accessors, primitive.indices); + const Accessor* pAccessor = model.getSafe(&model.accessors, index); if (!pAccessor || pAccessor->type != Accessor::Type::SCALAR || pAccessor->normalized) { return AccessorView(); diff --git a/CesiumGltfReader/generated/include/CesiumGltfReader/ExtensionExtMeshPolygonReader.h b/CesiumGltfReader/generated/include/CesiumGltfReader/ExtensionExtMeshPolygonReader.h new file mode 100644 index 0000000000..489d60350a --- /dev/null +++ b/CesiumGltfReader/generated/include/CesiumGltfReader/ExtensionExtMeshPolygonReader.h @@ -0,0 +1,76 @@ +// This file was generated by generate-classes. +// DO NOT EDIT THIS FILE! +#pragma once + +#include +#include +#include +#include + +#include + +#include +#include + +namespace CesiumGltf { +struct ExtensionExtMeshPolygon; +} // namespace CesiumGltf + +namespace CesiumGltfReader { + +/** + * @brief Reads \ref CesiumGltf::ExtensionExtMeshPolygon + * "ExtensionExtMeshPolygon" instances from JSON. + */ +class CESIUMGLTFREADER_API ExtensionExtMeshPolygonReader { +public: + /** + * @brief Constructs a new instance. + */ + ExtensionExtMeshPolygonReader(); + + /** + * @brief Gets the options controlling how the JSON is read. + */ + CesiumJsonReader::JsonReaderOptions& getOptions(); + + /** + * @brief Gets the options controlling how the JSON is read. + */ + const CesiumJsonReader::JsonReaderOptions& getOptions() const; + + /** + * @brief Reads an instance of ExtensionExtMeshPolygon from a byte buffer. + * + * @param data The buffer from which to read the instance. + * @return The result of reading the instance. + */ + CesiumJsonReader::ReadJsonResult + readFromJson(const std::span& data) const; + + /** + * @brief Reads an instance of ExtensionExtMeshPolygon from a + * rapidJson::Value. + * + * @param value The value from which to read the instance. + * @return The result of reading the instance. + */ + CesiumJsonReader::ReadJsonResult + readFromJson(const rapidjson::Value& value) const; + + /** + * @brief Reads an array of instances of ExtensionExtMeshPolygon from a + * rapidJson::Value. + * + * @param value The value from which to read the array of instances. + * @return The result of reading the array of instances. + */ + CesiumJsonReader::ReadJsonResult< + std::vector> + readArrayFromJson(const rapidjson::Value& value) const; + +private: + CesiumJsonReader::JsonReaderOptions _options; +}; + +} // namespace CesiumGltfReader diff --git a/CesiumGltfReader/generated/src/ExtensionExtMeshPolygonJsonHandler.h b/CesiumGltfReader/generated/src/ExtensionExtMeshPolygonJsonHandler.h new file mode 100644 index 0000000000..2c54d88757 --- /dev/null +++ b/CesiumGltfReader/generated/src/ExtensionExtMeshPolygonJsonHandler.h @@ -0,0 +1,50 @@ +// This file was generated by generate-classes. +// DO NOT EDIT THIS FILE! +#pragma once + +#include +#include +#include + +namespace CesiumJsonReader { +class JsonReaderOptions; +} // namespace CesiumJsonReader + +namespace CesiumGltfReader { +class ExtensionExtMeshPolygonJsonHandler + : public CesiumJsonReader::ExtensibleObjectJsonHandler, + public CesiumJsonReader::IExtensionJsonHandler { +public: + using ValueType = CesiumGltf::ExtensionExtMeshPolygon; + + static constexpr const char* ExtensionName = "EXT_mesh_polygon"; + + explicit ExtensionExtMeshPolygonJsonHandler( + const CesiumJsonReader::JsonReaderOptions& options) noexcept; + void reset( + IJsonHandler* pParentHandler, + CesiumGltf::ExtensionExtMeshPolygon* pObject); + + IJsonHandler* readObjectKey(const std::string_view& str) override; + + void reset( + IJsonHandler* pParentHandler, + CesiumUtility::ExtensibleObject& o, + const std::string_view& extensionName) override; + + IJsonHandler& getHandler() override { return *this; } + +protected: + IJsonHandler* readObjectKeyExtensionExtMeshPolygon( + const std::string& objectType, + const std::string_view& str, + CesiumGltf::ExtensionExtMeshPolygon& o); + +private: + CesiumGltf::ExtensionExtMeshPolygon* _pObject = nullptr; + CesiumJsonReader::IntegerJsonHandler _count; + CesiumJsonReader::IntegerJsonHandler _loopIndices; + CesiumJsonReader::IntegerJsonHandler _loopIndicesOffsets; + CesiumJsonReader::IntegerJsonHandler _indicesOffsets; +}; +} // namespace CesiumGltfReader diff --git a/CesiumGltfReader/generated/src/GeneratedJsonHandlers.cpp b/CesiumGltfReader/generated/src/GeneratedJsonHandlers.cpp index 77f4458cb3..12e3fe0462 100644 --- a/CesiumGltfReader/generated/src/GeneratedJsonHandlers.cpp +++ b/CesiumGltfReader/generated/src/GeneratedJsonHandlers.cpp @@ -3367,6 +3367,135 @@ ExtensionExtMeshPrimitiveEdgeVisibilityReader::readArrayFromJson( return CesiumJsonReader::JsonReader::readJson(value, handler); } +} // namespace CesiumGltfReader +// This file was generated by generate-classes. +// DO NOT EDIT THIS FILE! +// NOLINTBEGIN(readability-duplicate-include) +#include "ExtensionExtMeshPolygonJsonHandler.h" +#include "registerReaderExtensions.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +// NOLINTEND(readability-duplicate-include) + +namespace CesiumGltfReader { + +ExtensionExtMeshPolygonJsonHandler::ExtensionExtMeshPolygonJsonHandler( + const CesiumJsonReader::JsonReaderOptions& options) noexcept + : CesiumJsonReader::ExtensibleObjectJsonHandler(options), + _count(), + _loopIndices(), + _loopIndicesOffsets(), + _indicesOffsets() {} + +void ExtensionExtMeshPolygonJsonHandler::reset( + CesiumJsonReader::IJsonHandler* pParentHandler, + CesiumGltf::ExtensionExtMeshPolygon* pObject) { + CesiumJsonReader::ExtensibleObjectJsonHandler::reset(pParentHandler, pObject); + this->_pObject = pObject; +} + +CesiumJsonReader::IJsonHandler* +ExtensionExtMeshPolygonJsonHandler::readObjectKey(const std::string_view& str) { + CESIUM_ASSERT(this->_pObject); + return this->readObjectKeyExtensionExtMeshPolygon( + CesiumGltf::ExtensionExtMeshPolygon::TypeName, + str, + *this->_pObject); +} + +void ExtensionExtMeshPolygonJsonHandler::reset( + CesiumJsonReader::IJsonHandler* pParentHandler, + CesiumUtility::ExtensibleObject& o, + const std::string_view& extensionName) { + std::any& value = + o.extensions.emplace(extensionName, CesiumGltf::ExtensionExtMeshPolygon()) + .first->second; + this->reset( + pParentHandler, + &std::any_cast(value)); +} + +CesiumJsonReader::IJsonHandler* +ExtensionExtMeshPolygonJsonHandler::readObjectKeyExtensionExtMeshPolygon( + const std::string& objectType, + const std::string_view& str, + CesiumGltf::ExtensionExtMeshPolygon& o) { + using namespace std::string_literals; + + if ("count"s == str) { + return property("count", this->_count, o.count); + } + if ("loopIndices"s == str) { + return property("loopIndices", this->_loopIndices, o.loopIndices); + } + if ("loopIndicesOffsets"s == str) { + return property( + "loopIndicesOffsets", + this->_loopIndicesOffsets, + o.loopIndicesOffsets); + } + if ("indicesOffsets"s == str) { + return property("indicesOffsets", this->_indicesOffsets, o.indicesOffsets); + } + + return this->readObjectKeyExtensibleObject(objectType, str, *this->_pObject); +} + +ExtensionExtMeshPolygonReader::ExtensionExtMeshPolygonReader() { + registerReaderExtensions(this->_options); +} + +CesiumJsonReader::JsonReaderOptions& +ExtensionExtMeshPolygonReader::getOptions() { + return this->_options; +} + +const CesiumJsonReader::JsonReaderOptions& +ExtensionExtMeshPolygonReader::getOptions() const { + return this->_options; +} + +CesiumJsonReader::ReadJsonResult +ExtensionExtMeshPolygonReader::readFromJson( + const std::span& data) const { + ExtensionExtMeshPolygonJsonHandler handler(this->_options); + return CesiumJsonReader::JsonReader::readJson(data, handler); +} + +CesiumJsonReader::ReadJsonResult +ExtensionExtMeshPolygonReader::readFromJson( + const rapidjson::Value& value) const { + ExtensionExtMeshPolygonJsonHandler handler(this->_options); + return CesiumJsonReader::JsonReader::readJson(value, handler); +} + +CesiumJsonReader::ReadJsonResult< + std::vector> +ExtensionExtMeshPolygonReader::readArrayFromJson( + const rapidjson::Value& value) const { + CesiumJsonReader::ArrayJsonHandler< + CesiumGltf::ExtensionExtMeshPolygon, + ExtensionExtMeshPolygonJsonHandler> + handler(this->_options); + return CesiumJsonReader::JsonReader::readJson(value, handler); +} + } // namespace CesiumGltfReader // This file was generated by generate-classes. // DO NOT EDIT THIS FILE! diff --git a/CesiumGltfReader/generated/src/registerReaderExtensions.cpp b/CesiumGltfReader/generated/src/registerReaderExtensions.cpp index d6e4becf56..b5089a4829 100644 --- a/CesiumGltfReader/generated/src/registerReaderExtensions.cpp +++ b/CesiumGltfReader/generated/src/registerReaderExtensions.cpp @@ -13,6 +13,7 @@ #include "ExtensionExtInstanceFeaturesJsonHandler.h" #include "ExtensionExtMeshFeaturesJsonHandler.h" #include "ExtensionExtMeshGpuInstancingJsonHandler.h" +#include "ExtensionExtMeshPolygonJsonHandler.h" #include "ExtensionExtMeshPrimitiveEdgeVisibilityJsonHandler.h" #include "ExtensionExtPrimitiveVoxelsJsonHandler.h" #include "ExtensionExtStructuralMetadataJsonHandler.h" @@ -91,6 +92,9 @@ void registerReaderExtensions(CesiumJsonReader::JsonReaderOptions& options) { options.registerExtension< CesiumGltf::MeshPrimitive, ExtensionExtMeshPrimitiveEdgeVisibilityJsonHandler>(); + options.registerExtension< + CesiumGltf::MeshPrimitive, + ExtensionExtMeshPolygonJsonHandler>(); options.registerExtension< CesiumGltf::Node, ExtensionExtInstanceFeaturesJsonHandler>(); diff --git a/CesiumGltfWriter/generated/src/ModelJsonWriter.cpp b/CesiumGltfWriter/generated/src/ModelJsonWriter.cpp index 240404a464..04426b4ccd 100644 --- a/CesiumGltfWriter/generated/src/ModelJsonWriter.cpp +++ b/CesiumGltfWriter/generated/src/ModelJsonWriter.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -237,6 +238,11 @@ void writeJson( CesiumJsonWriter::JsonWriter& jsonWriter, const CesiumJsonWriter::ExtensionWriterContext& context); +void writeJson( + const CesiumGltf::ExtensionExtMeshPolygon& obj, + CesiumJsonWriter::JsonWriter& jsonWriter, + const CesiumJsonWriter::ExtensionWriterContext& context); + void writeJson( const CesiumGltf::LineString& obj, CesiumJsonWriter::JsonWriter& jsonWriter, @@ -1268,6 +1274,37 @@ void writeJson( jsonWriter.EndObject(); } +void writeJson( + const CesiumGltf::ExtensionExtMeshPolygon& obj, + CesiumJsonWriter::JsonWriter& jsonWriter, + const CesiumJsonWriter::ExtensionWriterContext& context) { + jsonWriter.StartObject(); + + if (obj.count > -1) { + jsonWriter.Key("count"); + writeJson(obj.count, jsonWriter, context); + } + + if (obj.loopIndices > -1) { + jsonWriter.Key("loopIndices"); + writeJson(obj.loopIndices, jsonWriter, context); + } + + if (obj.loopIndicesOffsets > -1) { + jsonWriter.Key("loopIndicesOffsets"); + writeJson(obj.loopIndicesOffsets, jsonWriter, context); + } + + if (obj.indicesOffsets > -1) { + jsonWriter.Key("indicesOffsets"); + writeJson(obj.indicesOffsets, jsonWriter, context); + } + + writeExtensibleObject(obj, jsonWriter, context); + + jsonWriter.EndObject(); +} + void writeJson( const CesiumGltf::LineString& obj, CesiumJsonWriter::JsonWriter& jsonWriter, @@ -3028,6 +3065,13 @@ void ExtensionExtMeshPrimitiveEdgeVisibilityJsonWriter::write( writeJson(obj, jsonWriter, context); } +void ExtensionExtMeshPolygonJsonWriter::write( + const CesiumGltf::ExtensionExtMeshPolygon& obj, + CesiumJsonWriter::JsonWriter& jsonWriter, + const CesiumJsonWriter::ExtensionWriterContext& context) { + writeJson(obj, jsonWriter, context); +} + void LineStringJsonWriter::write( const CesiumGltf::LineString& obj, CesiumJsonWriter::JsonWriter& jsonWriter, diff --git a/CesiumGltfWriter/generated/src/ModelJsonWriter.h b/CesiumGltfWriter/generated/src/ModelJsonWriter.h index 0c56af0650..1d07980f02 100644 --- a/CesiumGltfWriter/generated/src/ModelJsonWriter.h +++ b/CesiumGltfWriter/generated/src/ModelJsonWriter.h @@ -37,6 +37,7 @@ struct ExtensionExtPrimitiveVoxels; struct ExtensionKhrGaussianSplatting; struct ExtensionKhrGaussianSplattingCompressionSpz2; struct ExtensionExtMeshPrimitiveEdgeVisibility; +struct ExtensionExtMeshPolygon; struct LineString; struct Padding; struct Shape; @@ -447,6 +448,19 @@ struct ExtensionExtMeshPrimitiveEdgeVisibilityJsonWriter { const CesiumJsonWriter::ExtensionWriterContext& context); }; +struct ExtensionExtMeshPolygonJsonWriter { + using ValueType = CesiumGltf::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"; + + static void write( + const CesiumGltf::ExtensionExtMeshPolygon& obj, + CesiumJsonWriter::JsonWriter& jsonWriter, + const CesiumJsonWriter::ExtensionWriterContext& context); +}; + struct LineStringJsonWriter { using ValueType = CesiumGltf::LineString; diff --git a/CesiumGltfWriter/generated/src/registerWriterExtensions.cpp b/CesiumGltfWriter/generated/src/registerWriterExtensions.cpp index 26a2cb2fd2..7e1d6d5aac 100644 --- a/CesiumGltfWriter/generated/src/registerWriterExtensions.cpp +++ b/CesiumGltfWriter/generated/src/registerWriterExtensions.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -96,6 +97,9 @@ void registerWriterExtensions( context.registerExtension< CesiumGltf::MeshPrimitive, ExtensionExtMeshPrimitiveEdgeVisibilityJsonWriter>(); + context.registerExtension< + CesiumGltf::MeshPrimitive, + ExtensionExtMeshPolygonJsonWriter>(); context.registerExtension< CesiumGltf::Node, ExtensionExtInstanceFeaturesJsonWriter>(); diff --git a/CesiumNativeTests/CMakeLists.txt b/CesiumNativeTests/CMakeLists.txt index c98fd05a1f..6c0071c506 100644 --- a/CesiumNativeTests/CMakeLists.txt +++ b/CesiumNativeTests/CMakeLists.txt @@ -20,6 +20,7 @@ set(cesium_native_targets CesiumIonClient CesiumITwinClient CesiumVectorData + CesiumVectorOverlays CesiumQuantizedMeshTerrain CesiumRasterOverlays CesiumUtility diff --git a/CesiumRasterOverlays/CMakeLists.txt b/CesiumRasterOverlays/CMakeLists.txt index 541f74976d..b2f96566c1 100644 --- a/CesiumRasterOverlays/CMakeLists.txt +++ b/CesiumRasterOverlays/CMakeLists.txt @@ -49,7 +49,6 @@ target_link_libraries(CesiumRasterOverlays CesiumJsonReader CesiumJsonWriter CesiumUtility - CesiumVectorData nonstd::expected-lite spdlog::spdlog PRIVATE diff --git a/CesiumRasterOverlays/include/CesiumRasterOverlays/ActivatedRasterOverlay.h b/CesiumRasterOverlays/include/CesiumRasterOverlays/ActivatedRasterOverlay.h index 7807aefe2c..3d1d7b0a62 100644 --- a/CesiumRasterOverlays/include/CesiumRasterOverlays/ActivatedRasterOverlay.h +++ b/CesiumRasterOverlays/include/CesiumRasterOverlays/ActivatedRasterOverlay.h @@ -259,6 +259,14 @@ class CESIUMRASTEROVERLAYS_API ActivatedRasterOverlay */ bool loadTileThrottled(RasterOverlayTile& tile); + /** + * @brief Ticks the underlying raster overlay. This should be called + * frequently, such as once per frame, so that raster overlays can perform + * necessary updates. \ref Cesium3DTilesSelection::Tileset will call this + * method on all attached raster overlays automatically. + */ + void tick(); + private: CesiumAsync::Future doLoad(RasterOverlayTile& tile, bool isThrottledLoad); diff --git a/CesiumRasterOverlays/include/CesiumRasterOverlays/RasterOverlayTileProvider.h b/CesiumRasterOverlays/include/CesiumRasterOverlays/RasterOverlayTileProvider.h index e9154acb97..3b1b873847 100644 --- a/CesiumRasterOverlays/include/CesiumRasterOverlays/RasterOverlayTileProvider.h +++ b/CesiumRasterOverlays/include/CesiumRasterOverlays/RasterOverlayTileProvider.h @@ -263,6 +263,13 @@ class CESIUMRASTEROVERLAYS_API RasterOverlayTileProvider virtual void addCredits(CesiumUtility::CreditReferencer& creditReferencer) noexcept; + /** + * @brief Called on a regular basis, such as once per frame. This can be + * implemented to perform operations such as polling that can't be easily + * handled with a Future. + */ + virtual void tick() {} + protected: /** * @brief Loads an image from a URL and optionally some request headers. diff --git a/CesiumRasterOverlays/src/ActivatedRasterOverlay.cpp b/CesiumRasterOverlays/src/ActivatedRasterOverlay.cpp index 4ef111cf30..fb7ba334c0 100644 --- a/CesiumRasterOverlays/src/ActivatedRasterOverlay.cpp +++ b/CesiumRasterOverlays/src/ActivatedRasterOverlay.cpp @@ -78,6 +78,7 @@ void ActivatedRasterOverlay::setTileProvider( bool hadValue = this->_pTileProvider != nullptr; this->_pTileProvider = pTileProvider; + if (!hadValue && this->_pTileProvider != nullptr) { this->_readyPromise.resolve(); } @@ -343,6 +344,12 @@ void ActivatedRasterOverlay::finalizeTileLoad(bool isThrottledLoad) noexcept { } } +void ActivatedRasterOverlay::tick() { + if (this->_pTileProvider != nullptr) { + this->_pTileProvider->tick(); + } +} + RasterOverlayTileLoadResult::RasterOverlayTileLoadResult( const CesiumUtility::IntrusivePointer& pActivated_, const CesiumUtility::IntrusivePointer& pTile_) noexcept diff --git a/CesiumVectorData/include/CesiumVectorData/VectorRasterizer.h b/CesiumVectorData/include/CesiumVectorData/VectorRasterizer.h index 6163db7bfd..612051688a 100644 --- a/CesiumVectorData/include/CesiumVectorData/VectorRasterizer.h +++ b/CesiumVectorData/include/CesiumVectorData/VectorRasterizer.h @@ -3,10 +3,12 @@ #include "VectorStyle.h" #include +#include #include #include #include #include +#include #include #include #include @@ -68,6 +70,19 @@ class VectorRasterizer { const std::vector>& polygon, const PolygonStyle& style); + /** + * @brief Draws a set of linear rings representing a polygon and its holes to + * the canvas. + * + * @param polygon The polygon to draw. It is assumed to have right-hand + * winding order (exterior rings are counterclockwise, holes are clockwise) as + * is the case in GeoJSON. The coordinates should be specified in degrees. + * @param style The \ref PolygonStyle to use when drawing the polygon. + */ + void drawPolygon( + const std::vector>& polygon, + const PolygonStyle& style); + /** * @brief Draws a polyline (a set of multiple line segments) to the canvas. * @@ -78,6 +93,36 @@ class VectorRasterizer { void drawPolyline(const std::vector& points, const LineStyle& style); + /** + * @brief Draws a polyline (a set of multiple line segments) to the canvas. + * + * @param points The set of points making up the polyline. + * @param style The \ref LineStyle to use when drawing the polyline. + */ + void drawPolyline( + const std::vector& points, + const LineStyle& style); + + /** + * @brief Draws a set of points to the canvas. + * + * @param points The set of points to draw. The coordinates should be + * specified in degrees. + * @param style The \ref PointStyle to use when drawing the points. + */ + void + drawPoints(const std::vector& points, const PointStyle& style); + + /** + * @brief Draws a set of points to the canvas. + * + * @param points The set of points to draw. + * @param style The \ref PointStyle to use when drawing the points. + */ + void drawPoints( + const std::vector& points, + const PointStyle& style); + /** * @brief Rasterizes a `GeoJsonObject` to the canvas. * diff --git a/CesiumVectorData/include/CesiumVectorData/VectorStyle.h b/CesiumVectorData/include/CesiumVectorData/VectorStyle.h index 93f2edc876..5e29e85fbd 100644 --- a/CesiumVectorData/include/CesiumVectorData/VectorStyle.h +++ b/CesiumVectorData/include/CesiumVectorData/VectorStyle.h @@ -94,6 +94,22 @@ struct PolygonStyle { std::optional outline; }; +/** @brief The style used to draw a point. */ +struct PointStyle { + /** @brief The radius of the point in pixels. */ + double radius = 1.0; + /** + * @brief The color used to fill this point. If `std::nullopt`, the point + * will not be filled. + */ + std::optional fill; + /** + * @brief The style used to outline this point. If `std::nullopt`, the + * point will not be outlined. + */ + std::optional outline; +}; + /** * @brief Style information to use when drawing vector data. */ @@ -106,6 +122,10 @@ struct VectorStyle { * @brief The style to use when drawing polygons. */ PolygonStyle polygon; + /** + * @brief The style to use when drawing points. + */ + PointStyle point; /** * @brief Default constructor for VectorStyle. @@ -113,10 +133,18 @@ struct VectorStyle { VectorStyle() = default; /** - * @brief Initializes style information for all types. + * @brief Initializes style information for line and polygon types. */ VectorStyle(const LineStyle& lineStyle, const PolygonStyle& polygonStyle); + /** + * @brief Initializes style information for all types. + */ + VectorStyle( + const LineStyle& lineStyle, + const PolygonStyle& polygonStyle, + const PointStyle& pointStyle); + /** * @brief Initializes all styles to the given color. */ diff --git a/CesiumVectorData/src/VectorRasterizer.cpp b/CesiumVectorData/src/VectorRasterizer.cpp index 130f4eab4b..7b2f246351 100644 --- a/CesiumVectorData/src/VectorRasterizer.cpp +++ b/CesiumVectorData/src/VectorRasterizer.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -193,6 +194,61 @@ void VectorRasterizer::drawPolygon( } } +void VectorRasterizer::drawPolygon( + const std::vector>& polygon, + const PolygonStyle& style) { + if (this->_finalized || (!style.fill && !style.outline)) { + return; + } + + BLPath path; + + for (const std::vector& ring : polygon) { + if (ring.empty()) + continue; + + auto it = ring.rbegin(); + auto end = ring.rend(); + + Cartographic firstPoint = *it; + path.moveTo(radiansToPoint( + firstPoint.longitude, + firstPoint.latitude, + this->_bounds, + this->_context)); + ++it; + + for (; it != end; ++it) { + path.lineTo(radiansToPoint( + it->longitude, + it->latitude, + this->_bounds, + this->_context)); + } + + path.close(); + } + + if (style.fill) { + this->_context.fillPath( + path, + BLRgba32(style.fill->getColor(seedForObject(polygon, 13)).toRgba32())); + } + + if (style.outline) { + setStrokeWidth( + this->_context, + *style.outline, + this->_ellipsoid, + this->_bounds); + + this->_context.strokePath( + path, + BLRgba32( + style.outline->getColor(seedForObject(polygon, 31)).toRgba32())); + } +} + void VectorRasterizer::drawPolyline( const std::vector& points, const LineStyle& style) { @@ -220,6 +276,125 @@ void VectorRasterizer::drawPolyline( BLRgba32(style.getColor(seedForObject(points, 31)).toRgba32())); } +void VectorRasterizer::drawPolyline( + const std::vector& points, + const LineStyle& style) { + if (this->_finalized) { + return; + } + + std::vector vertices; + vertices.reserve(points.size()); + + for (const CesiumGeospatial::Cartographic& vertex : points) { + BLPoint point = radiansToPoint( + vertex.longitude, + vertex.latitude, + this->_bounds, + this->_context); + vertices.emplace_back(point); + } + + setStrokeWidth(this->_context, style, this->_ellipsoid, this->_bounds); + + this->_context.strokePolyline( + vertices.data(), + vertices.size(), + BLRgba32(style.getColor(seedForObject(points, 31)).toRgba32())); +} + +namespace { +void drawPointsImpl( + BLContext& context, + const CesiumGeospatial::Ellipsoid& ellipsoid, + const GlobeRectangle& bounds, + const std::vector& vertices, + const std::vector& seeds, + const PointStyle& style) { + if (style.fill) { + for (size_t i = 0; i < vertices.size(); i++) { + context.fillCircle( + BLCircle(vertices[i].x, vertices[i].y, style.radius), + BLRgba32(style.fill->getColor(seeds[i]).toRgba32())); + } + } + + if (style.outline) { + setStrokeWidth(context, *style.outline, ellipsoid, bounds); + + for (size_t i = 0; i < vertices.size(); i++) { + context.strokeCircle( + BLCircle(vertices[i].x, vertices[i].y, style.radius), + BLRgba32(style.outline->getColor(seeds[i] ^ 31).toRgba32())); + } + } +} +} // namespace + +void VectorRasterizer::drawPoints( + const std::vector& points, + const PointStyle& style) { + if (this->_finalized) { + return; + } + + std::vector vertices; + vertices.reserve(points.size()); + + std::vector seeds; + seeds.reserve(points.size()); + + for (const glm::dvec3& vertex : points) { + BLPoint point = radiansToPoint( + CesiumUtility::Math::degreesToRadians(vertex.x), + CesiumUtility::Math::degreesToRadians(vertex.y), + this->_bounds, + this->_context); + vertices.emplace_back(point); + seeds.emplace_back(seedForObject(vertex, 17)); + } + + drawPointsImpl( + this->_context, + this->_ellipsoid, + this->_bounds, + vertices, + seeds, + style); +} + +void VectorRasterizer::drawPoints( + const std::vector& points, + const PointStyle& style) { + if (this->_finalized) { + return; + } + + std::vector vertices; + vertices.reserve(points.size()); + + std::vector seeds; + seeds.reserve(points.size()); + + for (const CesiumGeospatial::Cartographic& vertex : points) { + BLPoint point = radiansToPoint( + vertex.longitude, + vertex.latitude, + this->_bounds, + this->_context); + vertices.emplace_back(point); + seeds.emplace_back(seedForObject(vertex, 17)); + } + + drawPointsImpl( + this->_context, + this->_ellipsoid, + this->_bounds, + vertices, + seeds, + style); +} + void VectorRasterizer::drawGeoJsonObject( const GeoJsonObject& geoJsonObject, const VectorStyle& style) { @@ -243,8 +418,12 @@ void VectorRasterizer::drawGeoJsonObject( rasterizer.drawPolygon(polygon, style.polygon); } } - void operator()(const GeoJsonPoint& /*catchAll*/) {} - void operator()(const GeoJsonMultiPoint& /*catchAll*/) {} + void operator()(const GeoJsonPoint& point) { + rasterizer.drawPoints({point.coordinates}, style.point); + } + void operator()(const GeoJsonMultiPoint& points) { + rasterizer.drawPoints(points.coordinates, style.point); + } void operator()(const GeoJsonFeature& /*catchAll*/) {} void operator()(const GeoJsonFeatureCollection& /*catchAll*/) {} void operator()(const GeoJsonGeometryCollection& /*catchAll*/) {} @@ -275,8 +454,8 @@ VectorRasterizer::finalize() { // We need to swap the channels to fix the values. // Blend2D provides BLPixelConverter for these sorts of operations, which // should be faster because it has SIMD support. But the current - // implementation seems to perform well as-is, likely thanks to the compiler's - // vectorization. + // implementation seems to perform well as-is, likely thanks to the + // compiler's vectorization. std::byte* pData = this->_mipLevel == 0 ? this->_imageAsset->pixelData.data() diff --git a/CesiumVectorData/src/VectorStyle.cpp b/CesiumVectorData/src/VectorStyle.cpp index 9a85d2b92b..dfe26f8e95 100644 --- a/CesiumVectorData/src/VectorStyle.cpp +++ b/CesiumVectorData/src/VectorStyle.cpp @@ -33,4 +33,9 @@ VectorStyle::VectorStyle( const LineStyle& lineStyle, const PolygonStyle& polygonStyle) : line(lineStyle), polygon(polygonStyle) {} +VectorStyle::VectorStyle( + const LineStyle& lineStyle, + const PolygonStyle& polygonStyle, + const PointStyle& pointStyle) + : line(lineStyle), polygon(polygonStyle), point(pointStyle) {} } // namespace CesiumVectorData \ No newline at end of file diff --git a/CesiumVectorData/test/TestVectorRasterizer.cpp b/CesiumVectorData/test/TestVectorRasterizer.cpp index 1435c74005..8992fc5cad 100644 --- a/CesiumVectorData/test/TestVectorRasterizer.cpp +++ b/CesiumVectorData/test/TestVectorRasterizer.cpp @@ -152,6 +152,41 @@ TEST_CASE("VectorRasterizer::rasterize") { checkFilesEqual(dir / "polyline.tga", thisDir / "polyline.tga"); } + SUBCASE("Renders points") { + CesiumUtility::IntrusivePointer asset; + asset.emplace(); + asset->width = 256; + asset->height = 256; + asset->channels = 4; + asset->bytesPerChannel = 1; + asset->pixelData.resize( + (size_t)(asset->width * asset->height * asset->channels * asset->bytesPerChannel), + std::byte{255}); + + VectorRasterizer rasterizer(GlobeRectangle{0, 0, 1, 1}, asset); + + std::vector points{ + Cartographic(0, 0, 0), + Cartographic(1, 1, 0), + Cartographic(0, 1, 0), + Cartographic(1, 0, 0), + Cartographic(0.5, 0.5, 0), + Cartographic(0.25, 0.75, 0), + Cartographic(0.75, 0.75, 0), + Cartographic(0.25, 0.25, 0), + Cartographic(0.75, 0.25, 0)}; + + rasterizer.drawPoints( + points, + PointStyle{ + 16.0, + ColorStyle{Color{200, 123, 38, 255}, ColorMode::Normal}, + std::nullopt}); + rasterizer.finalize(); + writeImageToTgaFile(*asset, thisDir / "points.tga"); + checkFilesEqual(dir / "points.tga", thisDir / "points.tga"); + } + SUBCASE("Transforms bounds properly") { GlobeRectangle rect2( Math::degreesToRadians(0.25), diff --git a/CesiumVectorData/test/data/rasterized/points.tga b/CesiumVectorData/test/data/rasterized/points.tga new file mode 100644 index 0000000000..1bbada9040 Binary files /dev/null and b/CesiumVectorData/test/data/rasterized/points.tga differ diff --git a/CesiumVectorOverlays/CMakeLists.txt b/CesiumVectorOverlays/CMakeLists.txt new file mode 100644 index 0000000000..93ff8e6b9d --- /dev/null +++ b/CesiumVectorOverlays/CMakeLists.txt @@ -0,0 +1,55 @@ +add_library(CesiumVectorOverlays "") + +configure_cesium_library(CesiumVectorOverlays) + +cesium_glob_files(CESIUM_VECTOR_OVERLAYS_SOURCES + ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp) +cesium_glob_files(CESIUM_VECTOR_OVERLAYS_HEADERS + ${CMAKE_CURRENT_LIST_DIR}/src/*.h) +cesium_glob_files(CESIUM_VECTOR_OVERLAYS_PUBLIC_HEADERS + ${CMAKE_CURRENT_LIST_DIR}/include/CesiumVectorOverlays/*.h) +cesium_glob_files(CESIUM_VECTOR_OVERLAYS_TEST_SOURCES test/*.cpp) +cesium_glob_files(CESIUM_VECTOR_OVERLAYS_TEST_HEADERS test/*.h) + +set_target_properties(CesiumVectorOverlays + PROPERTIES + TEST_SOURCES "${CESIUM_VECTOR_OVERLAYS_TEST_SOURCES}" + TEST_HEADERS "${CESIUM_VECTOR_OVERLAYS_TEST_HEADERS}" + TEST_DATA_DIR ${CMAKE_CURRENT_LIST_DIR}/test/data +) + +set_target_properties(CesiumVectorOverlays + PROPERTIES + PUBLIC_HEADER "${CESIUM_VECTOR_OVERLAYS_PUBLIC_HEADERS}" +) + +target_sources( + CesiumVectorOverlays + PRIVATE + ${CESIUM_VECTOR_OVERLAYS_SOURCES} + ${CESIUM_VECTOR_OVERLAYS_HEADERS} + ${CESIUM_VECTOR_OVERLAYS_PUBLIC_HEADERS} +) + +cesium_target_include_directories( + TARGET + CesiumVectorOverlays + PUBLIC + $ + $ + PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/src +) + +target_link_libraries(CesiumVectorOverlays + PUBLIC + CesiumUtility + CesiumGeometry + CesiumGeospatial + CesiumAsync + CesiumGltf + CesiumGltfContent + CesiumVectorData + Cesium3DTilesSelection + CesiumRasterOverlays +) diff --git a/CesiumRasterOverlays/include/CesiumRasterOverlays/GeoJsonDocumentRasterOverlay.h b/CesiumVectorOverlays/include/CesiumVectorOverlays/GeoJsonDocumentRasterOverlay.h similarity index 85% rename from CesiumRasterOverlays/include/CesiumRasterOverlays/GeoJsonDocumentRasterOverlay.h rename to CesiumVectorOverlays/include/CesiumVectorOverlays/GeoJsonDocumentRasterOverlay.h index 896e85480a..acd1e7f119 100644 --- a/CesiumRasterOverlays/include/CesiumRasterOverlays/GeoJsonDocumentRasterOverlay.h +++ b/CesiumVectorOverlays/include/CesiumVectorOverlays/GeoJsonDocumentRasterOverlay.h @@ -1,10 +1,11 @@ #pragma once +#include "Library.h" + #include #include #include #include -#include #include #include #include @@ -18,7 +19,7 @@ #include #include -namespace CesiumRasterOverlays { +namespace CesiumVectorOverlays { /** * @brief A set of options for configuring a GeoJsonDocumentRasterOverlay. @@ -45,8 +46,8 @@ struct GeoJsonDocumentRasterOverlayOptions { * @brief A raster overlay made from rasterizing a \ref * CesiumVectorData::GeoJsonDocument. */ -class CESIUMRASTEROVERLAYS_API GeoJsonDocumentRasterOverlay final - : public RasterOverlay { +class CESIUMVECTOROVERLAYS_API GeoJsonDocumentRasterOverlay final + : public CesiumRasterOverlays::RasterOverlay { public: /** @@ -64,7 +65,7 @@ class CESIUMRASTEROVERLAYS_API GeoJsonDocumentRasterOverlay final const std::string& name, const std::shared_ptr& document, const GeoJsonDocumentRasterOverlayOptions& vectorOverlayOptions, - const RasterOverlayOptions& overlayOptions = {}); + const CesiumRasterOverlays::RasterOverlayOptions& overlayOptions = {}); /** * @brief Creates a new GeoJsonDocumentRasterOverlay from a future. @@ -81,17 +82,17 @@ class CESIUMRASTEROVERLAYS_API GeoJsonDocumentRasterOverlay final CesiumAsync::Future>&& documentFuture, const GeoJsonDocumentRasterOverlayOptions& vectorOverlayOptions, - const RasterOverlayOptions& overlayOptions = {}); + const CesiumRasterOverlays::RasterOverlayOptions& overlayOptions = {}); virtual ~GeoJsonDocumentRasterOverlay() override; virtual CesiumAsync::Future createTileProvider( - const CreateRasterOverlayTileProviderParameters& parameters) - const override; + const CesiumRasterOverlays::CreateRasterOverlayTileProviderParameters& + parameters) const override; private: CesiumAsync::Future> _documentFuture; GeoJsonDocumentRasterOverlayOptions _options; }; -} // namespace CesiumRasterOverlays +} // namespace CesiumVectorOverlays diff --git a/CesiumVectorOverlays/include/CesiumVectorOverlays/Library.h b/CesiumVectorOverlays/include/CesiumVectorOverlays/Library.h new file mode 100644 index 0000000000..ab240be335 --- /dev/null +++ b/CesiumVectorOverlays/include/CesiumVectorOverlays/Library.h @@ -0,0 +1,18 @@ +#pragma once + +/** + * @brief Raster overlays for displaying vector data. + * + * @mermaid-interactive{dependencies/CesiumVectorOverlays} + */ +namespace CesiumVectorOverlays {} + +#if defined(_WIN32) && defined(CESIUM_SHARED) +#ifdef CESIUMVECTOROVERLAYS_BUILDING +#define CESIUMVECTOROVERLAYS_API __declspec(dllexport) +#else +#define CESIUMVECTOROVERLAYS_API __declspec(dllimport) +#endif +#else +#define CESIUMVECTOROVERLAYS_API +#endif diff --git a/CesiumVectorOverlays/include/CesiumVectorOverlays/VectorTilesRasterOverlay.h b/CesiumVectorOverlays/include/CesiumVectorOverlays/VectorTilesRasterOverlay.h new file mode 100644 index 0000000000..53f2e21698 --- /dev/null +++ b/CesiumVectorOverlays/include/CesiumVectorOverlays/VectorTilesRasterOverlay.h @@ -0,0 +1,78 @@ +#include "Library.h" + +#include +#include +#include + +namespace CesiumVectorOverlays { + +/** + * @brief Options for constructing a \ref VectorTilesRasterOverlay. + */ +struct VectorTilesRasterOverlayOptions { + /** + * @brief The default style to use for features in the vector tileset when no + * other style is specified. + */ + CesiumVectorData::VectorStyle defaultStyle; + /** + * @brief HTTP headers to attach to requests made for this tileset. + */ + std::vector requestHeaders; +}; + +/** + * @brief A raster overlay made from rasterizing a vector tiles tileset. + */ +class CESIUMVECTOROVERLAYS_API VectorTilesRasterOverlay final + : public CesiumRasterOverlays::RasterOverlay { + +public: + /** + * @brief Creates a new VectorTilesRasterOverlay from a URL. + * + * @param name The user-given name of this layer. + * @param url The URL of the tileset to load. + * @param vectorOptions Options to configure this + * VectorTilesRasterOverlay. + * @param overlayOptions Options to use for this RasterOverlay. + */ + VectorTilesRasterOverlay( + const std::string& name, + const std::string& url, + const VectorTilesRasterOverlayOptions& vectorOptions = {}, + const CesiumRasterOverlays::RasterOverlayOptions& overlayOptions = {}); + + /** + * @brief Creates a new VectorTilesRasterOverlay from a Cesium ion asset. + * + * @param name The user-given name of this layer. + * @param ionAssetID The ion asset ID of the tileset. + * @param ionAccessToken The ion access token to use to access the tileset. + * @param ionAssetEndpointUrl The ion asset endpoint URL to use to access the + * tileset. + * @param vectorOptions Options to configure this + * VectorTilesRasterOverlay. + * @param overlayOptions Options to use for this RasterOverlay. + */ + VectorTilesRasterOverlay( + const std::string& name, + int64_t ionAssetID, + const std::string& ionAccessToken, + const std::string& ionAssetEndpointUrl = "https://api.cesium.com/", + const VectorTilesRasterOverlayOptions& vectorOptions = {}, + const CesiumRasterOverlays::RasterOverlayOptions& overlayOptions = {}); + + virtual CesiumAsync::Future createTileProvider( + const CesiumRasterOverlays::CreateRasterOverlayTileProviderParameters& + parameters) const override; + +private: + VectorTilesRasterOverlayOptions _vectorOptions; + bool _useIon = false; + std::string _url; + int64_t _ionAssetID; + std::string _ionAccessToken; + std::string _ionAssetEndpointUrl; +}; +} // namespace CesiumVectorOverlays \ No newline at end of file diff --git a/CesiumRasterOverlays/src/GeoJsonDocumentRasterOverlay.cpp b/CesiumVectorOverlays/src/GeoJsonDocumentRasterOverlay.cpp similarity index 99% rename from CesiumRasterOverlays/src/GeoJsonDocumentRasterOverlay.cpp rename to CesiumVectorOverlays/src/GeoJsonDocumentRasterOverlay.cpp index c718f68aee..dc8d03bb66 100644 --- a/CesiumRasterOverlays/src/GeoJsonDocumentRasterOverlay.cpp +++ b/CesiumVectorOverlays/src/GeoJsonDocumentRasterOverlay.cpp @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include #include @@ -26,6 +24,8 @@ #include #include #include +#include +#include #include #include @@ -47,11 +47,12 @@ using namespace CesiumGeometry; using namespace CesiumGeospatial; using namespace CesiumUtility; using namespace CesiumVectorData; +using namespace CesiumRasterOverlays; // We won't generate any quadtree nodes past this depth. const uint32_t DEPTH_LIMIT = 8; -namespace CesiumRasterOverlays { +namespace CesiumVectorOverlays { namespace { /** @@ -675,7 +676,7 @@ void rasterizeVectorData( } } // namespace -class CESIUMRASTEROVERLAYS_API GeoJsonDocumentRasterOverlayTileProvider final +class CESIUMVECTOROVERLAYS_API GeoJsonDocumentRasterOverlayTileProvider final : public RasterOverlayTileProvider { private: @@ -850,4 +851,4 @@ GeoJsonDocumentRasterOverlay::createTileProvider( }); } -} // namespace CesiumRasterOverlays +} // namespace CesiumVectorOverlays diff --git a/CesiumVectorOverlays/src/VectorTilesRasterOverlay.cpp b/CesiumVectorOverlays/src/VectorTilesRasterOverlay.cpp new file mode 100644 index 0000000000..7dbcbd61d1 --- /dev/null +++ b/CesiumVectorOverlays/src/VectorTilesRasterOverlay.cpp @@ -0,0 +1,842 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Cesium3DTilesSelection; +using namespace CesiumRasterOverlays; +using namespace CesiumUtility; + +namespace CesiumVectorOverlays { +namespace { +struct VectorRenderContent { + CesiumVectorData::VectorStyle style; + + std::vector points; + std::vector> polylines; + std::vector> polygons; +}; + +CesiumUtility::Result vectorizeModel( + CesiumGltf::Model& model, + const CesiumGeospatial::Ellipsoid& ellipsoid, + const glm::dmat4x4& gltfTransform, + const CesiumVectorData::VectorStyle& defaultStyle) { + + glm::dmat4x4 rootTransform = + CesiumGltfContent::GltfUtilities::applyRtcCenter(model, gltfTransform); + rootTransform = CesiumGltfContent::GltfUtilities::applyGltfUpAxisTransform( + model, + rootTransform); + + CesiumUtility::ErrorList errors; + + VectorRenderContent* pContent = new VectorRenderContent(); + pContent->style = defaultStyle; + + model.forEachPrimitiveInScene( + -1, + [pContent, rootTransform, &errors, &ellipsoid]( + const CesiumGltf::Model& model, + const CesiumGltf::Node& /*node*/, + const CesiumGltf::Mesh& /*mesh*/, + CesiumGltf::MeshPrimitive& primitive, + const glm::dmat4x4& nodeTransform) mutable { + const CesiumGltf::AccessorView positionView( + model, + primitive.attributes.at("POSITION")); + const CesiumGltf::IndexAccessorType indicesView = + CesiumGltf::getIndexAccessorView(model, primitive); + const int64_t numIndices = + std::visit(CesiumGltf::NumIndicesFromAccessor{}, indicesView); + const int64_t maxIndex = + std::visit(CesiumGltf::MaxIndexValueFromAccessor{}, indicesView); + + if (positionView.status() != CesiumGltf::AccessorViewStatus::Valid) { + errors.emplaceError( + "Cannot create valid position accessor for primitive."); + return; + } + + if (primitive.mode == CesiumGltf::MeshPrimitive::Mode::POINTS) { + for (int64_t i = 0; i < positionView.size(); i++) { + const glm::vec3 position = positionView[i]; + const glm::dvec4 transformedPosition = + rootTransform * nodeTransform * glm::dvec4(position, 1.0); + pContent->points.emplace_back( + ellipsoid + .cartesianToCartographic(glm::dvec3(transformedPosition)) + .value_or(CesiumGeospatial::Cartographic{0.0, 0.0, 0.0})); + } + return; + } else if ( + primitive.mode == CesiumGltf::MeshPrimitive::Mode::LINE_STRIP) { + if (numIndices < 2) { + errors.emplaceError( + "Primitive mode LINE_STRIP requires at least two indices."); + return; + } + + std::vector polyline; + for (int64_t i = 0; i < numIndices; i++) { + const int64_t idx = + std::visit(CesiumGltf::IndexFromAccessor{i}, indicesView); + if (idx == maxIndex) { + // Primitive restart. + if (polyline.size() >= 2) { + pContent->polylines.emplace_back(std::move(polyline)); + polyline.clear(); + } else { + errors.emplaceError("Primitive restart index encountered but " + "current polyline has less than 2 points."); + } + + continue; + } + + if (idx < 0 || idx >= positionView.size()) { + errors.emplaceError(fmt::format( + "Index {} out of bounds for position accessor size {}", + idx, + positionView.size())); + return; + } + + const glm::vec3 position = positionView[idx]; + const glm::dvec4 transformedPosition = + rootTransform * nodeTransform * glm::dvec4(position, 1.0); + polyline.emplace_back( + ellipsoid + .cartesianToCartographic(glm::dvec3(transformedPosition)) + .value_or(CesiumGeospatial::Cartographic{0.0, 0.0, 0.0})); + } + + if (polyline.size() >= 2) { + pContent->polylines.emplace_back(std::move(polyline)); + } else if (polyline.size() == 1) { + errors.emplaceWarning("LINE_STRIP primitive ended with a single " + "point unassigned to a line."); + } + } else if ( + // Previous versions of EXT_mesh_polygon use TRIANGLES, current + // version uses LINE_LOOP. + primitive.mode == CesiumGltf::MeshPrimitive::Mode::LINE_LOOP || + primitive.mode >= CesiumGltf::MeshPrimitive::Mode::TRIANGLES) { + const CesiumGltf::ExtensionExtMeshPolygon* pPolygonExtension = + primitive.getExtension(); + if (pPolygonExtension == nullptr) { + errors.emplaceWarning( + fmt::format("Polygons found but no EXT_mesh_polygon extension " + "present on primitive. Skipping polygon.")); + return; + } + + CesiumGltf::IndexAccessorType loopIndicesView = + CesiumGltf::getIndexAccessorView( + model, + pPolygonExtension->loopIndices); + + CesiumGltf::IndexAccessorType loopIndicesOffsetsView = + CesiumGltf::getIndexAccessorView( + model, + pPolygonExtension->loopIndicesOffsets); + const int64_t numPolygons = pPolygonExtension->count; + const int64_t maxPolygonIndex = std::visit( + CesiumGltf::MaxIndexValueFromAccessor{}, + loopIndicesView); + pContent->polygons.reserve( + pContent->polygons.size() + static_cast(numPolygons)); + + for (int64_t i = 0; i < numPolygons; i++) { + const int64_t loopIndicesOffset = std::visit( + CesiumGltf::IndexFromAccessor{i}, + loopIndicesOffsetsView); + const int64_t nextLoopIndicesOffset = + i + 1 < numPolygons ? std::visit( + CesiumGltf::IndexFromAccessor{i + 1}, + loopIndicesOffsetsView) + : std::visit( + CesiumGltf::NumIndicesFromAccessor{}, + loopIndicesView); + std::vector vertices; + + for (int64_t j = loopIndicesOffset; j < nextLoopIndicesOffset; + j++) { + int64_t loopIndex = + std::visit(CesiumGltf::IndexFromAccessor{j}, loopIndicesView); + if (loopIndex == maxPolygonIndex) { + continue; + } + + const glm::vec3 position = positionView[loopIndex]; + const glm::dvec4 transformedPosition = + rootTransform * nodeTransform * glm::dvec4(position, 1.0); + const CesiumGeospatial::Cartographic cartographic = + ellipsoid + .cartesianToCartographic(glm::dvec3(transformedPosition)) + .value_or(CesiumGeospatial::Cartographic{0.0, 0.0, 0.0}); + vertices.emplace_back(cartographic); + } + + pContent->polygons.emplace_back(std::move(vertices)); + } + } else { + errors.emplaceWarning(fmt::format( + "Ignoring primitive with mode {} - only POINTS (0), LINE_STRIP " + "(3), LINE_LOOP (5), and TRIANGLES (4) are supported.", + primitive.mode)); + } + }); + + return {pContent, errors}; +} + +struct LoadRequest { + CesiumAsync::Promise promise; + std::vector requestedTiles; +}; + +struct SharedTileSelectionState { + std::vector workerThreadLoadQueue; + std::vector tilesWaitingForWorker; + std::vector loadRequests; +}; + +class VectorTilesLoadRequester : public TileLoadRequester { + virtual double getWeight() const override { return this->_weight; } + + virtual bool hasMoreTilesToLoadInWorkerThread() const override { + return !this->_pSharedTileSelectionState->workerThreadLoadQueue.empty(); + } + + const Tile* getNextTileToLoadInWorkerThread() override { + if (this->_pSharedTileSelectionState->workerThreadLoadQueue.empty()) { + return nullptr; + } + + TileLoadTask& task = + this->_pSharedTileSelectionState->workerThreadLoadQueue.back(); + + this->_pSharedTileSelectionState->tilesWaitingForWorker.emplace_back( + task.pTile); + const Tile::Pointer pTile = task.pTile; + this->_pSharedTileSelectionState->workerThreadLoadQueue.pop_back(); + return pTile; + } + + bool hasMoreTilesToLoadInMainThread() const override { + // No main thread loading for vector tiles. + return false; + } + + const Tile* getNextTileToLoadInMainThread() override { return nullptr; } + +public: + VectorTilesLoadRequester( + std::shared_ptr pSharedTileSelectionState) + : _weight(1.0), + _pSharedTileSelectionState(std::move(pSharedTileSelectionState)) {} + +private: + float _weight = 1.0; + std::shared_ptr _pSharedTileSelectionState; +}; + +class VectorTilesPrepareRendererResources : public IPrepareRendererResources { +public: + virtual CesiumAsync::Future + prepareInLoadThread( + const CesiumAsync::AsyncSystem& asyncSystem, + TileLoadResult&& tileLoadResult, + const glm::dmat4& transform, + const std::any& /*rendererOptions*/) override { + CesiumGltf::Model* pModel = + std::get_if(&tileLoadResult.contentKind); + if (pModel == nullptr) { + return asyncSystem.createResolvedFuture( + TileLoadResultAndRenderResources{std::move(tileLoadResult), nullptr}); + } + + Result vectorizationResult = vectorizeModel( + *pModel, + tileLoadResult.ellipsoid, + transform, + this->defaultStyle); + if (vectorizationResult.errors.hasErrors()) { + if (vectorizationResult.value) { + delete *vectorizationResult.value; + } + + vectorizationResult.errors.log( + this->pLogger, + "Errors when vectorizing model:"); + return asyncSystem.createResolvedFuture( + TileLoadResultAndRenderResources{std::move(tileLoadResult), nullptr}); + } + + return asyncSystem.createResolvedFuture(TileLoadResultAndRenderResources{ + std::move(tileLoadResult), + vectorizationResult.value ? *vectorizationResult.value : nullptr}); + } + + void* prepareInMainThread(Tile& /*tile*/, void* pLoadThreadResult) override { + // No main thread preparation for vector tiles. + return pLoadThreadResult; + } + + void free( + Tile& /*tile*/, + void* pLoadThreadResult, + void* pMainThreadResult) noexcept override { + if (pLoadThreadResult != nullptr) { + VectorRenderContent* pContent = + static_cast(pLoadThreadResult); + delete pContent; + } + + if (pMainThreadResult != nullptr) { + VectorRenderContent* pContent = + static_cast(pMainThreadResult); + delete pContent; + } + } + + void attachRasterInMainThread( + const Tile& /*tile*/, + int32_t /*overlayTextureCoordinateID*/, + const CesiumRasterOverlays::RasterOverlayTile& /*rasterTile*/, + void* /*pMainThreadRendererResources*/, + const glm::dvec2& /*translation*/, + const glm::dvec2& /*scale*/) override {} + + void detachRasterInMainThread( + const Tile& /*tile*/, + int32_t /*overlayTextureCoordinateID*/, + const CesiumRasterOverlays::RasterOverlayTile& /*rasterTile*/, + void* /*pMainThreadRendererResources*/) noexcept override {} + + virtual void* prepareRasterInLoadThread( + CesiumGltf::ImageAsset& /*image*/, + const std::any& /*rendererOptions*/) override { + return nullptr; + } + + virtual void* prepareRasterInMainThread( + RasterOverlayTile& /*rasterTile*/, + void* /*pLoadThreadResult*/) override { + return nullptr; + } + + virtual void freeRaster( + const RasterOverlayTile& /*rasterTile*/, + void* /*pLoadThreadResult*/, + void* /*pMainThreadResult*/) noexcept override {} + + VectorTilesPrepareRendererResources( + std::shared_ptr pLogger, + CesiumVectorData::VectorStyle defaultStyle) + : defaultStyle(std::move(defaultStyle)), pLogger(std::move(pLogger)) {} + + CesiumVectorData::VectorStyle defaultStyle; + std::shared_ptr pLogger; +}; + +class VectorTilesRasterOverlayTileProvider final + : public RasterOverlayTileProvider { +private: + using TraversalState = + CesiumUtility::TreeTraversalState; + + std::shared_ptr _pTileset; + TilesetOptions _options; + + std::shared_ptr _pSharedTileSelectionState = + std::make_shared(); + VectorTilesLoadRequester _loadRequester{_pSharedTileSelectionState}; + std::shared_ptr + _pPrepareRendererResources; + +private: + struct LoadTileImageInformation { + CesiumGeospatial::GlobeRectangle tileRectangle; + glm::ivec2 textureSize; + std::vector tileLoadTasks; + std::vector tilesToRender; + }; + + CesiumAsync::Future addLoadRequest( + const CesiumAsync::AsyncSystem& asyncSystem, + const std::vector& tasks) { + std::vector requestedTiles; + for (const TileLoadTask& task : tasks) { + this->_pSharedTileSelectionState->workerThreadLoadQueue.emplace_back( + task); + requestedTiles.push_back(&*task.pTile); + } + + std::sort(requestedTiles.begin(), requestedTiles.end()); + + LoadRequest request{ + asyncSystem.createPromise(), + std::move(requestedTiles)}; + CesiumAsync::Future future = request.promise.getFuture(); + this->_pSharedTileSelectionState->loadRequests.emplace_back( + std::move(request)); + + return future; + } + + bool meetsSse(const Tile& tile, LoadTileImageInformation& loadInfo) { + const double geometricError = tile.getGeometricError(); + const double pixelsPerMeter = (double)loadInfo.textureSize.y / + (loadInfo.tileRectangle.computeHeight() * + this->_options.ellipsoid.getRadii().x); + + return (geometricError * pixelsPerMeter) < + this->_options.maximumScreenSpaceError; + } + + enum class VisitResult { + // More tiles must be loaded before we can render anything. + LoadingRequired, + // This tile or its children can be rendered. + Renderable, + // There is no renderable content in this tile or its children. + NotVisible + }; + + VisitResult visit(Tile& tile, LoadTileImageInformation& loadInfo) { + if (tile.getState() < TileLoadState::ContentLoaded) { + loadInfo.tileLoadTasks.emplace_back( + TileLoadTask{&tile, TileLoadPriorityGroup::Normal, 1.0}); + return VisitResult::LoadingRequired; + } + + if (tile.isRenderContent() && + (meetsSse(tile, loadInfo) || tile.getChildren().empty())) { + loadInfo.tilesToRender.emplace_back(&tile); + return VisitResult::Renderable; + } + + bool needParent = true; + + for (Tile& child : tile.getChildren()) { + VisitResult result = this->visitIfNeeded(child, loadInfo); + if (result != VisitResult::NotVisible) { + needParent = false; + } + } + + if (needParent && tile.isRenderContent()) { + // Even though this tile may not have met SSE, none of its children can be + // rendered, so we need to use it. + loadInfo.tilesToRender.emplace_back(&tile); + return VisitResult::Renderable; + } + + return needParent ? VisitResult::NotVisible : VisitResult::Renderable; + } + + VisitResult visitIfNeeded(Tile& tile, LoadTileImageInformation& loadInfo) { + this->_pTileset->updateTileContent(tile); + + const std::optional rectangle = + estimateGlobeRectangle( + tile.getBoundingVolume(), + this->_options.ellipsoid); + if (!rectangle) { + // Invalid bounding rect, nothing to do with this. + return VisitResult::NotVisible; + } + + if (rectangle->computeIntersection(loadInfo.tileRectangle)) { + return this->visit(tile, loadInfo); + } + + return VisitResult::NotVisible; + } + + CesiumAsync::Future findAndLoadTiles( + const CesiumGeospatial::GlobeRectangle& tileRectangle, + const glm::ivec2& textureSize) { + LoadTileImageInformation loadInfo{tileRectangle, textureSize, {}, {}}; + Tile* pRootTile = this->_pTileset->getRootTile(); + + if (pRootTile == nullptr) { + return this->getAsyncSystem() + .createResolvedFuture(std::move(loadInfo)); + } + + visitIfNeeded(*pRootTile, loadInfo); + + if (!loadInfo.tileLoadTasks.empty()) { + // Add load request and re-run this function when all those tiles are + // loaded. We need to re-run since some of those tiles might have been + // external content and now we need to check their children. + return this + ->addLoadRequest(this->getAsyncSystem(), loadInfo.tileLoadTasks) + .thenInMainThread([this, tileRectangle, textureSize]() mutable { + return this->findAndLoadTiles(tileRectangle, textureSize); + }); + } + + return this->getAsyncSystem() + .createResolvedFuture(std::move(loadInfo)); + } + + CesiumAsync::Future loadTileImageFromTileset( + const CesiumGeometry::Rectangle& rectangle, + const CesiumGeospatial::GlobeRectangle& tileRectangle, + const glm::ivec2& textureSize) { + return this->findAndLoadTiles(tileRectangle, textureSize) + .thenInWorkerThread([textureSize, + rectangle, + tileRectangle, + ellipsoid = this->_options.ellipsoid]( + LoadTileImageInformation&& loadInfo) { + // part 4 - rasterizing the tile + LoadedRasterOverlayImage result; + result.rectangle = rectangle; + if (loadInfo.tilesToRender.empty()) { + // No tiles to render, so return an empty image. + result.moreDetailAvailable = false; + result.pImage.emplace(); + result.pImage->width = 1; + result.pImage->height = 1; + result.pImage->channels = 4; + result.pImage->bytesPerChannel = 1; + result.pImage->pixelData = { + std::byte{0x00}, + std::byte{0x00}, + std::byte{0x00}, + std::byte{0x00}}; + } else { + result.moreDetailAvailable = true; + result.pImage.emplace(); + result.pImage->width = textureSize.x; + result.pImage->height = textureSize.y; + result.pImage->channels = 4; + result.pImage->bytesPerChannel = 1; + result.pImage->pixelData.resize( + (size_t)(result.pImage->width * result.pImage->height * + result.pImage->channels * + result.pImage->bytesPerChannel), + std::byte{0}); + CesiumVectorData::VectorRasterizer rasterizer( + tileRectangle, + result.pImage, + 0, + ellipsoid); + + for (const Tile::ConstPointer& pTile : loadInfo.tilesToRender) { + const TileRenderContent* pRenderContent = + pTile->getContent().getRenderContent(); + if (pRenderContent == nullptr) { + continue; + } + + const VectorRenderContent* pVectorContent = + static_cast( + pRenderContent->getRenderResources()); + if (pVectorContent == nullptr) { + continue; + } + + rasterizer.drawPolygon( + pVectorContent->polygons, + pVectorContent->style.polygon); + + for (const std::vector& polyline : + pVectorContent->polylines) { + rasterizer.drawPolyline(polyline, pVectorContent->style.line); + } + + if (!pVectorContent->points.empty()) { + rasterizer.drawPoints( + pVectorContent->points, + pVectorContent->style.point); + } + } + + rasterizer.finalize(); + } + + return result; + }); + } + +public: + VectorTilesRasterOverlayTileProvider( + const IntrusivePointer& pCreator, + const CreateRasterOverlayTileProviderParameters& parameters, + const VectorTilesRasterOverlayOptions& vectorOptions) + : RasterOverlayTileProvider( + pCreator, + parameters, + CesiumGeospatial::GeographicProjection( + CesiumGeospatial::Ellipsoid::WGS84), + projectRectangleSimple( + CesiumGeospatial::GeographicProjection( + CesiumGeospatial::Ellipsoid::WGS84), + CesiumGeospatial::GlobeRectangle::MAXIMUM)), + _options(), + _pPrepareRendererResources( + std::make_shared( + parameters.externals.pLogger, + vectorOptions.defaultStyle)) { + const RasterOverlayOptions& overlayOptions = + (parameters.pOwner ? parameters.pOwner : pCreator)->getOptions(); + this->_options.ellipsoid = overlayOptions.ellipsoid; + this->_options.maximumScreenSpaceError = + overlayOptions.maximumScreenSpaceError; + this->_options.maximumSimultaneousTileLoads = + static_cast(overlayOptions.maximumSimultaneousTileLoads); + this->_options.requestHeaders = vectorOptions.requestHeaders; + } + + VectorTilesRasterOverlayTileProvider( + const IntrusivePointer& pCreator, + const CreateRasterOverlayTileProviderParameters& parameters, + const std::string& url, + const VectorTilesRasterOverlayOptions& vectorOptions) + : VectorTilesRasterOverlayTileProvider( + pCreator, + parameters, + vectorOptions) { + const TilesetExternals externals{ + parameters.externals.pAssetAccessor, + this->_pPrepareRendererResources, + parameters.externals.asyncSystem, + parameters.externals.pCreditSystem, + parameters.externals.pLogger, + nullptr, + TilesetSharedAssetSystem::getDefault(), + nullptr}; + + this->_pTileset = std::make_shared(externals, url, this->_options); + this->_pTileset->registerLoadRequester(this->_loadRequester); + } + + VectorTilesRasterOverlayTileProvider( + const IntrusivePointer& pCreator, + const CreateRasterOverlayTileProviderParameters& parameters, + int64_t ionAssetID, + const std::string& ionAccessToken, + const std::string& ionAssetEndpointUrl, + const VectorTilesRasterOverlayOptions& vectorOptions) + : VectorTilesRasterOverlayTileProvider( + pCreator, + parameters, + vectorOptions) { + const TilesetExternals externals{ + parameters.externals.pAssetAccessor, + this->_pPrepareRendererResources, + parameters.externals.asyncSystem, + parameters.externals.pCreditSystem, + parameters.externals.pLogger, + nullptr, + TilesetSharedAssetSystem::getDefault(), + nullptr}; + + this->_pTileset = std::make_shared( + externals, + ionAssetID, + ionAccessToken, + this->_options, + ionAssetEndpointUrl); + this->_pTileset->registerLoadRequester(this->_loadRequester); + } + + virtual CesiumAsync::Future + loadTileImage(const RasterOverlayTile& overlayTile) override { + const RasterOverlayOptions& options = this->getOwner().getOptions(); + glm::ivec2 textureSize = glm::min( + glm::ivec2( + overlayTile.getTargetScreenPixels() / + options.maximumScreenSpaceError), + glm::ivec2(options.maximumTextureSize)); + + const CesiumGeospatial::GlobeRectangle tileRectangle = + CesiumGeospatial::unprojectRectangleSimple( + this->getProjection(), + overlayTile.getRectangle()); + + // part 1 - selecting from scratch + if (this->_pTileset->getRootTile() == nullptr) { + return this->_pTileset->getRootTileAvailableEvent().thenInMainThread( + [this, + rectangle = overlayTile.getRectangle(), + tileRectangle, + textureSize]() mutable { + return this->loadTileImageFromTileset( + rectangle, + tileRectangle, + textureSize); + }); + } + + return this->loadTileImageFromTileset( + overlayTile.getRectangle(), + tileRectangle, + textureSize); + } + + virtual void tick() override { + this->_pTileset->loadTiles(); + + // Check and resolve load requests if possible. + for (const Tile::Pointer& pTile : + this->_pSharedTileSelectionState->tilesWaitingForWorker) { + TileLoadState state = pTile->getState(); + if (state == TileLoadState::FailedTemporarily) { + this->_pSharedTileSelectionState->workerThreadLoadQueue.emplace_back( + TileLoadTask{pTile.get(), TileLoadPriorityGroup::Urgent, 1.0}); + } else if (state < TileLoadState::ContentLoaded) { + continue; + } + + for (LoadRequest& request : + this->_pSharedTileSelectionState->loadRequests) { + auto it = std::find( + request.requestedTiles.begin(), + request.requestedTiles.end(), + &*pTile); + if (it != request.requestedTiles.end()) { + request.requestedTiles.erase(it); + if (request.requestedTiles.empty()) { + request.promise.resolve(); + } + } + } + + // Erase completed load requests. + this->_pSharedTileSelectionState->loadRequests.erase( + std::remove_if( + this->_pSharedTileSelectionState->loadRequests.begin(), + this->_pSharedTileSelectionState->loadRequests.end(), + [](const LoadRequest& request) { + return request.requestedTiles.empty(); + }), + this->_pSharedTileSelectionState->loadRequests.end()); + } + + // Erase tiles waiting for worker that are done. + this->_pSharedTileSelectionState->tilesWaitingForWorker.erase( + std::remove_if( + this->_pSharedTileSelectionState->tilesWaitingForWorker.begin(), + this->_pSharedTileSelectionState->tilesWaitingForWorker.end(), + [](const Tile::Pointer& pTile) { + return pTile->getState() >= TileLoadState::ContentLoaded || + pTile->getState() == TileLoadState::FailedTemporarily; + }), + this->_pSharedTileSelectionState->tilesWaitingForWorker.end()); + } +}; +} // namespace + +VectorTilesRasterOverlay::VectorTilesRasterOverlay( + const std::string& name, + const std::string& url, + const VectorTilesRasterOverlayOptions& vectorOptions, + const CesiumRasterOverlays::RasterOverlayOptions& overlayOptions) + : CesiumRasterOverlays::RasterOverlay(name, overlayOptions), + _vectorOptions(vectorOptions), + _useIon(false), + _url(url) {} + +VectorTilesRasterOverlay::VectorTilesRasterOverlay( + const std::string& name, + int64_t ionAssetID, + const std::string& ionAccessToken, + const std::string& ionAssetEndpointUrl, + const VectorTilesRasterOverlayOptions& vectorOptions, + const CesiumRasterOverlays::RasterOverlayOptions& overlayOptions) + : CesiumRasterOverlays::RasterOverlay(name, overlayOptions), + _vectorOptions(vectorOptions), + _useIon(true), + _ionAssetID(ionAssetID), + _ionAccessToken(ionAccessToken), + _ionAssetEndpointUrl(ionAssetEndpointUrl) {} + +CesiumAsync::Future +VectorTilesRasterOverlay::createTileProvider( + const CreateRasterOverlayTileProviderParameters& parameters) const { + + if (this->_useIon) { + return parameters.externals.asyncSystem + .createResolvedFuture( + IntrusivePointer( + new VectorTilesRasterOverlayTileProvider( + this, + parameters, + this->_ionAssetID, + this->_ionAccessToken, + this->_ionAssetEndpointUrl, + this->_vectorOptions))); + } + + return parameters.externals.asyncSystem + .createResolvedFuture( + IntrusivePointer( + new VectorTilesRasterOverlayTileProvider( + this, + parameters, + this->_url, + this->_vectorOptions))); +} + +} // namespace CesiumVectorOverlays \ No newline at end of file diff --git a/CesiumRasterOverlays/test/TestGeoJsonDocumentRasterOverlay.cpp b/CesiumVectorOverlays/test/TestGeoJsonDocumentRasterOverlay.cpp similarity index 96% rename from CesiumRasterOverlays/test/TestGeoJsonDocumentRasterOverlay.cpp rename to CesiumVectorOverlays/test/TestGeoJsonDocumentRasterOverlay.cpp index fdf74525d8..6a8107864d 100644 --- a/CesiumRasterOverlays/test/TestGeoJsonDocumentRasterOverlay.cpp +++ b/CesiumVectorOverlays/test/TestGeoJsonDocumentRasterOverlay.cpp @@ -9,10 +9,10 @@ #include #include #include -#include #include #include #include +#include #include #include @@ -26,6 +26,7 @@ using namespace CesiumAsync; using namespace CesiumGeospatial; using namespace CesiumUtility; using namespace CesiumRasterOverlays; +using namespace CesiumVectorOverlays; using namespace CesiumVectorData; const size_t BENCHMARK_ITERATIONS = 100000; @@ -149,7 +150,7 @@ TEST_CASE( std::make_shared()); const std::filesystem::path testDataPath = - std::filesystem::path(CesiumRasterOverlays_TEST_DATA_DIR) / + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR) / "vienna-streets.geojson"; Result docResult = GeoJsonDocument::fromGeoJson(readFile(testDataPath)); @@ -243,7 +244,7 @@ TEST_CASE( TEST_CASE("GeoJsonDocumentRasterOverlay can render lines with bounding box " "height set by pixels") { const std::filesystem::path testDataPath = - std::filesystem::path(CesiumRasterOverlays_TEST_DATA_DIR) / + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR) / "equator.geojson"; GeoJsonDocumentRasterOverlayOptions options{ @@ -273,14 +274,14 @@ TEST_CASE("GeoJsonDocumentRasterOverlay can render lines with bounding box " CesiumNativeTests::checkFilesEqual( std::filesystem::path(CESIUM_NATIVE_TEMP_DIR) / "out-equator-meridian.tga", - std::filesystem::path(CesiumRasterOverlays_TEST_DATA_DIR) / + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR) / "equator-meridian.tga"); } TEST_CASE("GeoJsonDocumentRasterOverlay can render lines with bounding box " "height set by meters") { const std::filesystem::path testDataPath = - std::filesystem::path(CesiumRasterOverlays_TEST_DATA_DIR) / + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR) / "equator.geojson"; GeoJsonDocumentRasterOverlayOptions options{ @@ -321,14 +322,14 @@ TEST_CASE("GeoJsonDocumentRasterOverlay can render lines with bounding box " CesiumNativeTests::checkFilesEqual( std::filesystem::path(CESIUM_NATIVE_TEMP_DIR) / "out-equator-meridian-meters.tga", - std::filesystem::path(CesiumRasterOverlays_TEST_DATA_DIR) / + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR) / "equator-meridian-meters.tga"); } TEST_CASE("GeoJsonDocumentRasterOverlay can correctly rasterize line strings " "wrapping around the earth") { const std::filesystem::path testDataPath = - std::filesystem::path(CesiumRasterOverlays_TEST_DATA_DIR) / + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR) / "equator.geojson"; GeoJsonDocumentRasterOverlayOptions options{ @@ -357,7 +358,7 @@ TEST_CASE("GeoJsonDocumentRasterOverlay can correctly rasterize line strings " CesiumNativeTests::checkFilesEqual( std::filesystem::path(CESIUM_NATIVE_TEMP_DIR) / "out-equator-antimeridian-1.tga", - std::filesystem::path(CesiumRasterOverlays_TEST_DATA_DIR) / + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR) / "equator-antimeridian.tga"); } @@ -377,7 +378,7 @@ TEST_CASE("GeoJsonDocumentRasterOverlay can correctly rasterize line strings " CesiumNativeTests::checkFilesEqual( std::filesystem::path(CESIUM_NATIVE_TEMP_DIR) / "out-equator-antimeridian-2.tga", - std::filesystem::path(CesiumRasterOverlays_TEST_DATA_DIR) / + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR) / "equator-antimeridian.tga"); } @@ -397,7 +398,7 @@ TEST_CASE("GeoJsonDocumentRasterOverlay can correctly rasterize line strings " CesiumNativeTests::checkFilesEqual( std::filesystem::path(CESIUM_NATIVE_TEMP_DIR) / "out-equator-antimeridian-3.tga", - std::filesystem::path(CesiumRasterOverlays_TEST_DATA_DIR) / + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR) / "equator-antimeridian.tga"); } } diff --git a/CesiumVectorOverlays/test/TestVectorTilesRasterOverlay.cpp b/CesiumVectorOverlays/test/TestVectorTilesRasterOverlay.cpp new file mode 100644 index 0000000000..39c5c2960b --- /dev/null +++ b/CesiumVectorOverlays/test/TestVectorTilesRasterOverlay.cpp @@ -0,0 +1,187 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace CesiumAsync; +using namespace CesiumRasterOverlays; +using namespace CesiumUtility; +using namespace CesiumVectorOverlays; + +TEST_CASE("Test VectorTilesRasterOverlay polylines") { + Cesium3DTilesContent::registerAllTileContentTypes(); + + const std::filesystem::path dataPath = + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR); + const std::filesystem::path inputPath = + dataPath / "ViennaStreets" / "tileset.json"; + const std::filesystem::path referencePath = + dataPath / "ViennaStreets" / "rasterized.tga"; + const std::filesystem::path tempOutPath = + std::filesystem::path(CESIUM_NATIVE_TEMP_DIR) / + "vector-tile-polylines.tga"; + + const glm::dvec2 imageSize(256, 256); + + // A rough rectangle around the Albertgarten in Vienna, as an arbitrary + // testing area. + const CesiumGeospatial::GlobeRectangle& tileGlobeRectangle = + CesiumGeospatial::GlobeRectangle{ + 0.2852306824588304, + 0.8414742026919637, + 0.28529452339585826, + 0.8415167430037157}; + + std::shared_ptr pAssetAccessor = + std::make_shared( + CesiumNativeTests::FileAccessor{}); + AsyncSystem asyncSystem{ + std::make_shared()}; + + CreateRasterOverlayTileProviderParameters parameters{ + {pAssetAccessor, nullptr, asyncSystem}}; + IntrusivePointer pOverlay; + pOverlay.emplace( + "overlay0", + "file:///" + inputPath.string(), + CesiumVectorOverlays::VectorTilesRasterOverlayOptions{ + CesiumVectorData::VectorStyle{CesiumUtility::Color(255, 0, 0, 255)}, + {}}, + RasterOverlayOptions{}); + + IntrusivePointer pActivated = + pOverlay->activate( + CesiumRasterOverlays::RasterOverlayExternals{ + .pAssetAccessor = pAssetAccessor, + .pPrepareRendererResources = nullptr, + .asyncSystem = asyncSystem, + .pCreditSystem = nullptr, + .pLogger = spdlog::default_logger()}, + CesiumGeospatial::Ellipsoid::WGS84); + + pActivated->getReadyEvent().waitInMainThread(); + + REQUIRE(pActivated->getTileProvider() != nullptr); + CesiumGeospatial::GeographicProjection projection( + CesiumGeospatial::Ellipsoid::WGS84); + const CesiumGeometry::Rectangle tileRectangle = + projection.project(tileGlobeRectangle); + + IntrusivePointer pTile = + pActivated->getTile(tileRectangle, imageSize); + pActivated->loadTile(*pTile); + while (pTile->getState() != + CesiumRasterOverlays::RasterOverlayTile::LoadState::Loaded) { + asyncSystem.dispatchMainThreadTasks(); + pActivated->tick(); + } + + REQUIRE(pTile->getImage()->width > 1); + CesiumNativeTests::writeImageToTgaFile(*pTile->getImage(), tempOutPath); + + CesiumNativeTests::checkFilesEqual(tempOutPath, referencePath); +} + +TEST_CASE("Test VectorTilesRasterOverlay polygons") { + Cesium3DTilesContent::registerAllTileContentTypes(); + + const std::filesystem::path dataPath = + std::filesystem::path(CesiumVectorOverlays_TEST_DATA_DIR); + const std::filesystem::path inputPath = + dataPath / "switzerland" / "tileset.json"; + const std::filesystem::path referencePath = + dataPath / "switzerland" / "rasterized.tga"; + const std::filesystem::path tempOutPath = + std::filesystem::path(CESIUM_NATIVE_TEMP_DIR) / + "vector-tile-polygons.tga"; + + const glm::dvec2 imageSize(256, 256); + + // A rough rectangle around the Albertgarten in Vienna, as an arbitrary + // testing area. + const CesiumGeospatial::BoundingRegion& tileRegion = + Cesium3DTilesContent::ImplicitTilingUtilities::computeBoundingVolume( + CesiumGeospatial::BoundingRegion{ + CesiumGeospatial::GlobeRectangle{ + 0.10511435661024317, + 0.7989584641142331, + 0.18225951525130435, + 0.8348054325550944}, + 0, + 0.005, + CesiumGeospatial::Ellipsoid::WGS84}, + CesiumGeometry::QuadtreeTileID(1, 0, 0), + CesiumGeospatial::Ellipsoid::WGS84); + const CesiumGeospatial::GlobeRectangle& tileGlobeRectangle = + tileRegion.getRectangle(); + + std::shared_ptr pAssetAccessor = + std::make_shared( + CesiumNativeTests::FileAccessor{}); + AsyncSystem asyncSystem{ + std::make_shared()}; + + CreateRasterOverlayTileProviderParameters parameters{ + {pAssetAccessor, nullptr, asyncSystem}}; + RasterOverlayOptions options; + + IntrusivePointer pOverlay; + pOverlay.emplace( + "overlay0", + "file:///" + inputPath.string(), + CesiumVectorOverlays::VectorTilesRasterOverlayOptions{ + CesiumVectorData::VectorStyle{CesiumUtility::Color(255, 0, 0, 255)}, + {}}, + options); + + IntrusivePointer pActivated = + pOverlay->activate( + CesiumRasterOverlays::RasterOverlayExternals{ + .pAssetAccessor = pAssetAccessor, + .pPrepareRendererResources = nullptr, + .asyncSystem = asyncSystem, + .pCreditSystem = nullptr, + .pLogger = spdlog::default_logger()}, + CesiumGeospatial::Ellipsoid::WGS84); + + pActivated->getReadyEvent().waitInMainThread(); + + REQUIRE(pActivated->getTileProvider() != nullptr); + CesiumGeospatial::GeographicProjection projection( + CesiumGeospatial::Ellipsoid::WGS84); + const CesiumGeometry::Rectangle tileRectangle = + projection.project(tileGlobeRectangle); + + IntrusivePointer pTile = + pActivated->getTile(tileRectangle, imageSize); + pActivated->loadTile(*pTile); + while (pTile->getState() != + CesiumRasterOverlays::RasterOverlayTile::LoadState::Loaded) { + asyncSystem.dispatchMainThreadTasks(); + pActivated->tick(); + } + + REQUIRE(pTile->getImage()->width > 1); + CesiumNativeTests::writeImageToTgaFile(*pTile->getImage(), tempOutPath); + + CesiumNativeTests::checkFilesEqual(tempOutPath, referencePath); +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/ViennaStreets/0/subtrees/0/0/0.subtree b/CesiumVectorOverlays/test/data/ViennaStreets/0/subtrees/0/0/0.subtree new file mode 100644 index 0000000000..17fd2398cb Binary files /dev/null and b/CesiumVectorOverlays/test/data/ViennaStreets/0/subtrees/0/0/0.subtree differ diff --git a/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/0/0/0.glb b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/0/0/0.glb new file mode 100644 index 0000000000..e01c6f5ce1 Binary files /dev/null and b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/0/0/0.glb differ diff --git a/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/0/0.glb b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/0/0.glb new file mode 100644 index 0000000000..909f99ca51 Binary files /dev/null and b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/0/0.glb differ diff --git a/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/0/1.glb b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/0/1.glb new file mode 100644 index 0000000000..396d3fe64d Binary files /dev/null and b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/0/1.glb differ diff --git a/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/1/0.glb b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/1/0.glb new file mode 100644 index 0000000000..97460b1ef0 Binary files /dev/null and b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/1/0.glb differ diff --git a/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/1/1.glb b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/1/1.glb new file mode 100644 index 0000000000..23e2b97550 Binary files /dev/null and b/CesiumVectorOverlays/test/data/ViennaStreets/0/tiles/1/1/1.glb differ diff --git a/CesiumVectorOverlays/test/data/ViennaStreets/rasterized.tga b/CesiumVectorOverlays/test/data/ViennaStreets/rasterized.tga new file mode 100644 index 0000000000..ec6fcd252b Binary files /dev/null and b/CesiumVectorOverlays/test/data/ViennaStreets/rasterized.tga differ diff --git a/CesiumVectorOverlays/test/data/ViennaStreets/tileset.json b/CesiumVectorOverlays/test/data/ViennaStreets/tileset.json new file mode 100644 index 0000000000..35951c130d --- /dev/null +++ b/CesiumVectorOverlays/test/data/ViennaStreets/tileset.json @@ -0,0 +1,38 @@ +{ + "asset": { + "version": "1.1" + }, + "geometricError": 3863.7859884626714, + "root": { + "boundingVolume": { + "region": [0.2847674617338015, 0.8410564758787692, 0.2867604043374349, 0.8416788934512869, 0.0, 0.005] + }, + "geometricError": 1931.8929942313357, + "refine": "REPLACE", + "children": [{ + "boundingVolume": { + "region": [0.2847674617338015, 0.8410564758787692, 0.2867604043374349, 0.8416788934512869, 0.0, 0.005] + }, + "geometricError": 965.9464971156679, + "refine": "REPLACE", + "content": { + "uri": "0/tiles/{level}/{x}/{y}.glb" + }, + "implicitTiling": { + "subdivisionScheme": "QUADTREE", + "subtreeLevels": 5, + "availableLevels": 1, + "subtrees": { + "uri": "0/subtrees/{level}/{x}/{y}.subtree" + } + } + }] + }, + "extensionsUsed": ["3DTILES_content_gltf"], + "extensions": { + "3DTILES_content_gltf": { + "extensionsRequired": ["CESIUM_mesh_vector"], + "extensionsUsed": ["CESIUM_mesh_vector"] + } + } +} \ No newline at end of file diff --git a/CesiumRasterOverlays/test/data/equator-antimeridian.tga b/CesiumVectorOverlays/test/data/equator-antimeridian.tga similarity index 100% rename from CesiumRasterOverlays/test/data/equator-antimeridian.tga rename to CesiumVectorOverlays/test/data/equator-antimeridian.tga diff --git a/CesiumRasterOverlays/test/data/equator-meridian-meters.tga b/CesiumVectorOverlays/test/data/equator-meridian-meters.tga similarity index 100% rename from CesiumRasterOverlays/test/data/equator-meridian-meters.tga rename to CesiumVectorOverlays/test/data/equator-meridian-meters.tga diff --git a/CesiumRasterOverlays/test/data/equator-meridian.tga b/CesiumVectorOverlays/test/data/equator-meridian.tga similarity index 100% rename from CesiumRasterOverlays/test/data/equator-meridian.tga rename to CesiumVectorOverlays/test/data/equator-meridian.tga diff --git a/CesiumRasterOverlays/test/data/equator.geojson b/CesiumVectorOverlays/test/data/equator.geojson similarity index 100% rename from CesiumRasterOverlays/test/data/equator.geojson rename to CesiumVectorOverlays/test/data/equator.geojson diff --git a/CesiumVectorOverlays/test/data/switzerland/0/subtrees/0/0/0.subtree b/CesiumVectorOverlays/test/data/switzerland/0/subtrees/0/0/0.subtree new file mode 100644 index 0000000000..466d7186d0 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/subtrees/0/0/0.subtree differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/0/0/0.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/0/0/0.gltf new file mode 100644 index 0000000000..b10ae312e5 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/0/0/0.gltf @@ -0,0 +1,248 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 63, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 24, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 1, + "type": "VEC3", + "max": [-62020.54296875, -13344.416015625, -314.996826171875], + "min": [-62020.54296875, -13344.416015625, -314.996826171875] + }, { + "bufferView": 16, + "componentType": 5126, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 6, + "componentType": 5126, + "count": 23, + "type": "VEC3", + "max": [228550.421875, 132681.453125, -452.6059265136719], + "min": [-109417.0390625, -96169.546875, -4170.73095703125] + }, { + "bufferView": 17, + "componentType": 5126, + "count": 23, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "0_0.bin", + "byteLength": 1028 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 252, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 96 + }, { + "buffer": 0, + "byteOffset": 352, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 360, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 368, + "byteLength": 12 + }, { + "buffer": 0, + "byteOffset": 384, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 392, + "byteLength": 276 + }, { + "buffer": 0, + "byteOffset": 672, + "byteLength": 184 + }, { + "buffer": 0, + "byteOffset": 856, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 864, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 872, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 880, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 888, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 904, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 912, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 920, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 928, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 936, + "byteLength": 92 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "mode": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 1, + "attribute": 0, + "propertyTable": 0 + }] + } + } + }, { + "attributes": { + "_FEATURE_ID_0": 7, + "POSITION": 6 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 23, + "attribute": 0, + "propertyTable": 1 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.12952687403859836, 0.0, -0.9915759118200628, 0.0, -0.7209565861361307, 0.6865510672834926, 0.09417660494429031, 0.0, 0.6807675005526665, 0.7270815855266155, -0.08892681361309424, 0.0, 4349731.986851681, 4614553.887732251, -568193.7010031352, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + }, + "vector_point": { + "name": "vector_point", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_point", + "class": "vector_point", + "count": 1, + "properties": { + "_id": { + "values": 10, + "stringOffsets": 11 + }, + "name": { + "values": 8, + "stringOffsets": 9 + } + } + }, { + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 14, + "stringOffsets": 15 + }, + "name": { + "values": 12, + "stringOffsets": 13 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/0/0/0_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/0/0/0_0.bin new file mode 100644 index 0000000000..d92c2cedeb Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/0/0/0_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/0.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/0.gltf new file mode 100644 index 0000000000..86dc14d919 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/0.gltf @@ -0,0 +1,248 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 21, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 10, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 1, + "type": "VEC3", + "max": [-14204.583984375, 11952.7431640625, -27.00537872314453], + "min": [-14204.583984375, 11952.7431640625, -27.00537872314453] + }, { + "bufferView": 16, + "componentType": 5126, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 6, + "componentType": 5126, + "count": 9, + "type": "VEC3", + "max": [109264.890625, 44526.6953125, -47.362091064453125], + "min": [-61392.5625, -70485.4609375, -1066.6416015625] + }, { + "bufferView": 17, + "componentType": 5126, + "count": 9, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "0_0.bin", + "byteLength": 468 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 84, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 88, + "byteLength": 40 + }, { + "buffer": 0, + "byteOffset": 128, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 136, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 12 + }, { + "buffer": 0, + "byteOffset": 160, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 108 + }, { + "buffer": 0, + "byteOffset": 280, + "byteLength": 72 + }, { + "buffer": 0, + "byteOffset": 352, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 360, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 368, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 376, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 384, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 400, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 408, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 416, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 424, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 432, + "byteLength": 36 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "mode": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 1, + "attribute": 0, + "propertyTable": 0 + }] + } + } + }, { + "attributes": { + "_FEATURE_ID_0": 7, + "POSITION": 6 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 9, + "attribute": 0, + "propertyTable": 1 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.11873494091403396, 0.0, -0.9929259860665048, 0.0, -0.7191925127131569, 0.6894677980713533, 0.0860016574257457, 0.0, 0.6845904932611002, 0.7243163365703135, -0.08186391826613121, 0.0, 4374099.849918104, 4596941.764892813, -523058.61113531666, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + }, + "vector_point": { + "name": "vector_point", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_point", + "class": "vector_point", + "count": 1, + "properties": { + "_id": { + "values": 10, + "stringOffsets": 11 + }, + "name": { + "values": 8, + "stringOffsets": 9 + } + } + }, { + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 14, + "stringOffsets": 15 + }, + "name": { + "values": 12, + "stringOffsets": 13 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/0_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/0_0.bin new file mode 100644 index 0000000000..b54f2b28e3 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/0_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/1.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/1.gltf new file mode 100644 index 0000000000..bfa63bcc2c --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/1.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 15, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 8, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 7, + "type": "VEC3", + "max": [74803.3515625, 35316.1875, -22.49281120300293], + "min": [-85000.9921875, -55030.7890625, -801.9768676757813] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 7, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "1_0.bin", + "byteLength": 324 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 60, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 64, + "byteLength": 32 + }, { + "buffer": 0, + "byteOffset": 96, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 104, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 112, + "byteLength": 84 + }, { + "buffer": 0, + "byteOffset": 200, + "byteLength": 56 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 272, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 280, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 288, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 296, + "byteLength": 28 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 7, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.12624497487083472, 0.0, -0.9919990959269378, 0.0, -0.7290713632581303, 0.6781195216436783, 0.09278395142846668, 0.0, 0.6726939524009367, 0.734951640834789, -0.08560918196932865, 0.0, 4298312.5650640875, 4664682.903230888, -547016.9922447944, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/1_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/1_0.bin new file mode 100644 index 0000000000..58e97af0b6 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/0/1_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/0.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/0.gltf new file mode 100644 index 0000000000..98813975ff --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/0.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 21, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 10, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 9, + "type": "VEC3", + "max": [99187.6171875, 51083.171875, -9.111007690429688], + "min": [-69046.234375, -38319.22265625, -974.8004150390625] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 9, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "0_0.bin", + "byteLength": 404 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 84, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 88, + "byteLength": 40 + }, { + "buffer": 0, + "byteOffset": 128, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 136, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 108 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 72 + }, { + "buffer": 0, + "byteOffset": 328, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 344, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 352, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 360, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 368, + "byteLength": 36 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 9, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.1586035378654843, 0.0, -0.9873423508472388, 0.0, -0.7144309482207674, 0.690230152557063, 0.11476391734961425, 0.0, 0.6814934614513388, 0.7235898952452652, -0.10947294413698315, 0.0, 4354296.393426199, 4592315.111855932, -699460.3364473367, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/0_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/0_0.bin new file mode 100644 index 0000000000..ed47faee77 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/0_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/1.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/1.gltf new file mode 100644 index 0000000000..9f2fe4e016 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/1.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 24, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 11, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 10, + "type": "VEC3", + "max": [88501.859375, 65339.16015625, -37.538719177246094], + "min": [-80041.515625, -48569.6484375, -781.1781616210938] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 10, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "1_0.bin", + "byteLength": 440 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 96, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 96, + "byteLength": 44 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 152, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 160, + "byteLength": 120 + }, { + "buffer": 0, + "byteOffset": 280, + "byteLength": 80 + }, { + "buffer": 0, + "byteOffset": 360, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 376, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 384, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 392, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 400, + "byteLength": 40 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 10, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.16128147399386858, 0.0, -0.9869084487156675, 0.0, -0.724657879143784, 0.6788568742224892, 0.1184242480056547, 0.0, 0.6699695846388837, 0.7342706206303448, -0.10948703730547328, 0.0, 4280890.283176197, 4660344.8545380365, -699586.9736196795, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/1_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/1_0.bin new file mode 100644 index 0000000000..94482e53eb Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/1/1/1_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/0.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/0.gltf new file mode 100644 index 0000000000..9ba7a9cbd3 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/0.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 9, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 8, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 7, + "type": "VEC3", + "max": [45092.48046875, 12190.2099609375, -13.150993347167969], + "min": [-40426.2265625, -36790.65234375, -265.3970947265625] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 7, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "0_0.bin", + "byteLength": 300 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 36, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 40, + "byteLength": 32 + }, { + "buffer": 0, + "byteOffset": 72, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 80, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 88, + "byteLength": 84 + }, { + "buffer": 0, + "byteOffset": 176, + "byteLength": 56 + }, { + "buffer": 0, + "byteOffset": 232, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 248, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 264, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 272, + "byteLength": 28 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 7, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.11401954914563536, 0.0, -0.9934785062660522, 0.0, -0.7168398718616209, 0.6923670980460026, 0.08227028414179788, 0.0, 0.6878518303545038, 0.7215454258349623, -0.07894338436247712, 0.0, 4394878.586488654, 4579294.294776257, -504391.4607318632, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/0_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/0_0.bin new file mode 100644 index 0000000000..1666c53ee2 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/0_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/1.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/1.gltf new file mode 100644 index 0000000000..e61a534ff2 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/1.gltf @@ -0,0 +1,248 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 18, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 9, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 1, + "type": "VEC3", + "max": [6867.89111328125, 1602.935791015625, -3.8928141593933105], + "min": [6867.89111328125, 1602.935791015625, -3.8928141593933105] + }, { + "bufferView": 16, + "componentType": 5126, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 6, + "componentType": 5126, + "count": 8, + "type": "VEC3", + "max": [44934.78125, 33390.08203125, -6.413372993469238], + "min": [-40169.8359375, -23850.353515625, -242.5794219970703] + }, { + "bufferView": 17, + "componentType": 5126, + "count": 8, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "1_0.bin", + "byteLength": 424 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 72, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 72, + "byteLength": 36 + }, { + "buffer": 0, + "byteOffset": 112, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 120, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 128, + "byteLength": 12 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 152, + "byteLength": 96 + }, { + "buffer": 0, + "byteOffset": 248, + "byteLength": 64 + }, { + "buffer": 0, + "byteOffset": 312, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 320, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 328, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 336, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 344, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 360, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 368, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 376, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 384, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 392, + "byteLength": 32 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "mode": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 1, + "attribute": 0, + "propertyTable": 0 + }] + } + } + }, { + "attributes": { + "_FEATURE_ID_0": 7, + "POSITION": 6 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 8, + "attribute": 0, + "propertyTable": 1 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.11397460211319871, 0.0, -0.9934836637172945, 0.0, -0.720707232736441, 0.6882913051365256, 0.08268109792957277, 0.0, 0.6838061675317936, 0.7254344072853576, -0.07844772764090975, 0.0, 4369112.2934561875, 4604062.773495539, -501234.04482698743, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + }, + "vector_point": { + "name": "vector_point", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_point", + "class": "vector_point", + "count": 1, + "properties": { + "_id": { + "values": 10, + "stringOffsets": 11 + }, + "name": { + "values": 8, + "stringOffsets": 9 + } + } + }, { + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 14, + "stringOffsets": 15 + }, + "name": { + "values": 12, + "stringOffsets": 13 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/1_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/1_0.bin new file mode 100644 index 0000000000..6c55d1a10e Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/1_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/2.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/2.gltf new file mode 100644 index 0000000000..d61a758887 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/2.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 9, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 6, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 5, + "type": "VEC3", + "max": [26108.681640625, 23549.765625, -32.14739227294922], + "min": [-49352.8125, -33532.9765625, -278.1030578613281] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 5, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "2_0.bin", + "byteLength": 244 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 36, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 40, + "byteLength": 24 + }, { + "buffer": 0, + "byteOffset": 64, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 72, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 80, + "byteLength": 60 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 40 + }, { + "buffer": 0, + "byteOffset": 184, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 200, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 208, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 216, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 224, + "byteLength": 20 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 5, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.11815435504334383, 0.0, -0.9929952408668892, 0.0, -0.7274828656776483, 0.6806436420522631, 0.08656161204175233, 0.0, 0.6758758972842038, 0.7326146548724167, -0.08042101054103774, 0.0, 4318594.482147623, 4649796.656598669, -513860.21275030077, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/2_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/2_0.bin new file mode 100644 index 0000000000..10d495f245 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/2_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/3.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/3.gltf new file mode 100644 index 0000000000..56593ae85b --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/3.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 6, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 5, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [14246.310546875, 14692.236328125, -18.53329086303711], + "min": [-15254.6044921875, -10266.255859375, -35.1523551940918] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 4, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "3_0.bin", + "byteLength": 200 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 24, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 24, + "byteLength": 20 + }, { + "buffer": 0, + "byteOffset": 48, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 56, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 64, + "byteLength": 48 + }, { + "buffer": 0, + "byteOffset": 112, + "byteLength": 32 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 160, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 176, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 184, + "byteLength": 16 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 4, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.12081601693793728, 0.0, -0.9926749166022338, 0.0, -0.7308203989465292, 0.6767496519846399, 0.0889463491229665, 0.0, 0.6717924043444433, 0.7362132221976653, -0.08176219741691942, 0.0, 4292578.707351824, 4672719.199531177, -522439.1723223682, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/3_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/3_0.bin new file mode 100644 index 0000000000..21773e6393 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/0/3_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/0.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/0.gltf new file mode 100644 index 0000000000..004bedaf0c --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/0.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 12, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 7, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 6, + "type": "VEC3", + "max": [46968.9296875, 29776.17578125, -46.734718322753906], + "min": [-38636.8359375, -27415.23046875, -241.14227294921875] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 6, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "0_0.bin", + "byteLength": 280 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 48, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 48, + "byteLength": 28 + }, { + "buffer": 0, + "byteOffset": 80, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 88, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 96, + "byteLength": 72 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 48 + }, { + "buffer": 0, + "byteOffset": 216, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 232, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 240, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 248, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 24 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 6, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.13269007930091703, 0.0, -0.9911575772071344, 0.0, -0.7132691529966403, 0.6943551978049597, 0.09548808650659515, 0.0, 0.6882154155775443, 0.7196324473515876, -0.09213404625974402, 0.0, 4397160.915851431, 4567111.267709436, -588664.8541468867, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/0_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/0_0.bin new file mode 100644 index 0000000000..c80c0ea6c5 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/0_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/1.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/1.gltf new file mode 100644 index 0000000000..3fe85da8bd --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/1.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 6, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 5, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [42574.23046875, 28687.345703125, -203.79733276367188], + "min": [-42574.23046875, -28389.419921875, -205.11846923828125] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 4, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "1_0.bin", + "byteLength": 200 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 24, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 24, + "byteLength": 20 + }, { + "buffer": 0, + "byteOffset": 48, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 56, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 64, + "byteLength": 48 + }, { + "buffer": 0, + "byteOffset": 112, + "byteLength": 32 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 160, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 176, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 184, + "byteLength": 16 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 4, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.13364274095011183, 0.0, -0.9910295746300114, 0.0, -0.7194286277914724, 0.6877573776068883, 0.09701669475598168, 0.0, 0.6815879013784066, 0.7259406239819455, -0.09191378105204562, 0.0, 4354949.647544767, 4607286.9132514205, -587275.518810719, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/1_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/1_0.bin new file mode 100644 index 0000000000..662f0f1b3d Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/1_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/2.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/2.gltf new file mode 100644 index 0000000000..8f1b06b718 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/2.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 6, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 5, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [42174.671875, 28689.7421875, -201.1509552001953], + "min": [-42174.671875, -28392.14453125, -202.47071838378906] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 4, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "2_0.bin", + "byteLength": 200 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 24, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 24, + "byteLength": 20 + }, { + "buffer": 0, + "byteOffset": 48, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 56, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 64, + "byteLength": 48 + }, { + "buffer": 0, + "byteOffset": 112, + "byteLength": 32 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 160, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 176, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 184, + "byteLength": 16 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 4, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.13364274095011183, 0.0, -0.9910295746300114, 0.0, -0.7255078715498803, 0.6812241543458747, 0.09783649551629783, 0.0, 0.6751132839090814, 0.7320748947585541, -0.09104066318820472, 0.0, 4313710.211392141, 4646358.539507289, -581714.2808580255, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/2_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/2_0.bin new file mode 100644 index 0000000000..9b7ed1ea95 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/2_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/3.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/3.gltf new file mode 100644 index 0000000000..19e560eed0 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/3.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 12, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 7, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 6, + "type": "VEC3", + "max": [50608.42578125, 17447.7734375, -28.01176643371582], + "min": [-32934.796875, -16176.8701171875, -220.74705505371094] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 6, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "3_0.bin", + "byteLength": 280 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 48, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 48, + "byteLength": 28 + }, { + "buffer": 0, + "byteOffset": 80, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 88, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 96, + "byteLength": 72 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 48 + }, { + "buffer": 0, + "byteOffset": 216, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 232, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 240, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 248, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 24 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 6, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.13162068994743398, 0.0, -0.9913001533227771, 0.0, -0.7304385926832391, 0.6760572853465621, 0.09698458253127722, 0.0, 0.6701756906190275, 0.736849066586799, -0.08898312634130376, 0.0, 4282261.801468356, 4676769.596897343, -568580.818791906, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/3_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/3_0.bin new file mode 100644 index 0000000000..15409442d3 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/1/3_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/0.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/0.gltf new file mode 100644 index 0000000000..ad4a7523f7 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/0.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 12, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 7, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 6, + "type": "VEC3", + "max": [42046.59375, 15763.6796875, -22.414377212524414], + "min": [-25055.978515625, -16087.126953125, -157.86013793945313] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 6, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "0_0.bin", + "byteLength": 280 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 48, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 48, + "byteLength": 28 + }, { + "buffer": 0, + "byteOffset": 80, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 88, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 96, + "byteLength": 72 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 48 + }, { + "buffer": 0, + "byteOffset": 216, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 232, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 240, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 248, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 24 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 6, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.14878931925554315, 0.0, -0.988868918752871, 0.0, -0.713127509825461, 0.6927740167681589, 0.10730012311757973, 0.0, 0.6850626929016125, 0.7211547418487316, -0.10307737435286257, 0.0, 4377049.71707511, 4576806.150635729, -658589.056042553, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/0_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/0_0.bin new file mode 100644 index 0000000000..19430d56f2 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/0_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/1.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/1.gltf new file mode 100644 index 0000000000..705b585098 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/1.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 12, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 7, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 6, + "type": "VEC3", + "max": [33316.95703125, 33205.85546875, -40.15726089477539], + "min": [-51756.14453125, -24071.16796875, -292.2671203613281] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 6, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "1_0.bin", + "byteLength": 280 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 48, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 48, + "byteLength": 28 + }, { + "buffer": 0, + "byteOffset": 80, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 88, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 96, + "byteLength": 72 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 48 + }, { + "buffer": 0, + "byteOffset": 216, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 232, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 240, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 248, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 24 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 6, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.15478506069611894, 0.0, -0.9879481691795876, 0.0, -0.7167169957433879, 0.688264205573533, 0.11229038845246785, 0.0, 0.679969361808215, 0.7254601183567801, -0.10653301683466533, 0.0, 4344597.944820786, 4604226.529050906, -680682.3248103786, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/1_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/1_0.bin new file mode 100644 index 0000000000..634cf09d8b Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/1_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/2.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/2.gltf new file mode 100644 index 0000000000..af0fe403dd --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/2.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 6, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 5, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 4, + "type": "VEC3", + "max": [42174.671875, 28689.7421875, -201.1509552001953], + "min": [-42174.671875, -28392.14453125, -202.47071838378906] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 4, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "2_0.bin", + "byteLength": 200 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 24, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 24, + "byteLength": 20 + }, { + "buffer": 0, + "byteOffset": 48, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 56, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 64, + "byteLength": 48 + }, { + "buffer": 0, + "byteOffset": 112, + "byteLength": 32 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 160, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 176, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 184, + "byteLength": 16 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 4, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.1527299853398251, 0.0, -0.9882679553532516, 0.0, -0.7234861594084832, 0.6812241543458746, 0.11180978794412798, 0.0, 0.6732320021526454, 0.7320748947585541, -0.1040433551063802, 0.0, 4301689.555723431, 4646358.539507289, -664796.4038733583, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/2_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/2_0.bin new file mode 100644 index 0000000000..9b7ed1ea95 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/2_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/3.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/3.gltf new file mode 100644 index 0000000000..9e5edf189d --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/3.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 12, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 7, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 6, + "type": "VEC3", + "max": [50975.00390625, 31387.6171875, -57.148521423339844], + "min": [-32568.201171875, -25620.048828125, -254.3312530517578] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 6, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "3_0.bin", + "byteLength": 280 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 48, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 48, + "byteLength": 28 + }, { + "buffer": 0, + "byteOffset": 80, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 88, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 96, + "byteLength": 72 + }, { + "buffer": 0, + "byteOffset": 168, + "byteLength": 48 + }, { + "buffer": 0, + "byteOffset": 216, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 232, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 240, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 248, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 24 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 6, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.15062986366752723, 0.0, -0.9885902306676423, 0.0, -0.729431546447959, 0.6749644525114558, 0.11114228219921447, 0.0, 0.6672632638007588, 0.7378502475746084, -0.10166980346222773, 0.0, 4263673.240851292, 4683147.305361349, -649648.8626623198, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/3_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/3_0.bin new file mode 100644 index 0000000000..ef53e1a4ac Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/2/3_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/1.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/1.gltf new file mode 100644 index 0000000000..e434a381db --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/1.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 9, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 6, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 5, + "type": "VEC3", + "max": [41827.92578125, 26806.783203125, -61.17095947265625], + "min": [-41493.96484375, -27694.400390625, -193.32501220703125] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 5, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "1_0.bin", + "byteLength": 244 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 36, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 40, + "byteLength": 24 + }, { + "buffer": 0, + "byteOffset": 64, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 72, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 80, + "byteLength": 60 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 40 + }, { + "buffer": 0, + "byteOffset": 184, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 200, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 208, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 216, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 224, + "byteLength": 20 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 5, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.17154025724543065, 0.0, -0.9851771110537291, 0.0, -0.7153798634785025, 0.6875432736342824, 0.12456282675715831, 0.0, 0.6773518960434457, 0.726143406552903, -0.11794135002659029, 0.0, 4327888.321725694, 4608578.460416425, -753577.2681972428, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/1_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/1_0.bin new file mode 100644 index 0000000000..73ff5fd77f Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/1_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/2.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/2.gltf new file mode 100644 index 0000000000..2520db5d33 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/2.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 15, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 8, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 7, + "type": "VEC3", + "max": [49305.31640625, 32848.734375, -18.5810604095459], + "min": [-34961.80078125, -24233.58203125, -226.5293731689453] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 7, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "2_0.bin", + "byteLength": 324 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 60, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 64, + "byteLength": 32 + }, { + "buffer": 0, + "byteOffset": 96, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 104, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 112, + "byteLength": 84 + }, { + "buffer": 0, + "byteOffset": 200, + "byteLength": 56 + }, { + "buffer": 0, + "byteOffset": 256, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 272, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 280, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 288, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 296, + "byteLength": 28 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 7, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.1701354534218595, 0.0, -0.9854206855393987, 0.0, -0.7209584031233043, 0.6817073185664577, 0.12447535008516826, 0.0, 0.6717684931989839, 0.7316249939777414, -0.1159825837453043, 0.0, 4292328.809932075, 4643492.821515282, -741081.7725160354, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/2_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/2_0.bin new file mode 100644 index 0000000000..6a5fcadfc7 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/2_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/3.gltf b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/3.gltf new file mode 100644 index 0000000000..5ff53e2454 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/3.gltf @@ -0,0 +1,163 @@ +{ + "extensionsUsed": ["EXT_mesh_features", "EXT_structural_metadata", "EXT_mesh_polygon"], + "accessors": [{ + "bufferView": 0, + "componentType": 5125, + "count": 9, + "type": "SCALAR" + }, { + "bufferView": 1, + "componentType": 5125, + "count": 6, + "type": "SCALAR" + }, { + "bufferView": 2, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 3, + "componentType": 5125, + "count": 1, + "type": "SCALAR" + }, { + "bufferView": 4, + "componentType": 5126, + "count": 5, + "type": "VEC3", + "max": [9794.4306640625, 19707.04296875, -12.741253852844238], + "min": [-12522.4755859375, -11530.8798828125, -42.62399673461914] + }, { + "bufferView": 10, + "componentType": 5126, + "count": 5, + "type": "SCALAR" + }], + "asset": { + "version": "2.0" + }, + "buffers": [{ + "uri": "3_0.bin", + "byteLength": 244 + }], + "bufferViews": [{ + "buffer": 0, + "byteLength": 36, + "target": 34963 + }, { + "buffer": 0, + "byteOffset": 40, + "byteLength": 24 + }, { + "buffer": 0, + "byteOffset": 64, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 72, + "byteLength": 4 + }, { + "buffer": 0, + "byteOffset": 80, + "byteLength": 60 + }, { + "buffer": 0, + "byteOffset": 144, + "byteLength": 40 + }, { + "buffer": 0, + "byteOffset": 184, + "byteLength": 11 + }, { + "buffer": 0, + "byteOffset": 200, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 208, + "byteLength": 3 + }, { + "buffer": 0, + "byteOffset": 216, + "byteLength": 8 + }, { + "buffer": 0, + "byteOffset": 224, + "byteLength": 20 + }], + "meshes": [{ + "primitives": [{ + "attributes": { + "_FEATURE_ID_0": 5, + "POSITION": 4 + }, + "indices": 0, + "extensions": { + "EXT_mesh_features": { + "featureIds": [{ + "featureCount": 5, + "attribute": 0, + "propertyTable": 0 + }] + }, + "EXT_mesh_polygon": { + "count": 1, + "loopIndices": 1, + "loopIndicesOffsets": 2, + "indicesOffsets": 3 + } + } + }] + }], + "nodes": [{ + "matrix": [-0.1651045772413886, 0.0, -0.9862760661062107, 0.0, -0.7262410538601671, 0.676604497445039, 0.12157419843544184, 0.0, 0.6673188220498627, 0.7363466262821785, -0.11171049951028536, 0.0, 4263996.494183882, 4673568.994774677, -713801.5031738383, 1.0], + "mesh": 0 + }], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "extensions": { + "EXT_structural_metadata": { + "schema": { + "id": "schema_id", + "name": "schema_name", + "description": "description_vector", + "version": "version", + "classes": { + "vector_polygon": { + "name": "vector_polygon", + "description": "description", + "properties": { + "_id": { + "name": "_id", + "description": "attribute description", + "type": "STRING" + }, + "name": { + "name": "name", + "description": "attribute description", + "type": "STRING" + } + } + } + } + }, + "propertyTables": [{ + "name": "vector_polygon", + "class": "vector_polygon", + "count": 1, + "properties": { + "_id": { + "values": 8, + "stringOffsets": 9 + }, + "name": { + "values": 6, + "stringOffsets": 7 + } + } + }] + } + } +} \ No newline at end of file diff --git a/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/3_0.bin b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/3_0.bin new file mode 100644 index 0000000000..f6ca05f215 Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/0/tiles/2/3/3_0.bin differ diff --git a/CesiumVectorOverlays/test/data/switzerland/rasterized.tga b/CesiumVectorOverlays/test/data/switzerland/rasterized.tga new file mode 100644 index 0000000000..3922b437fa Binary files /dev/null and b/CesiumVectorOverlays/test/data/switzerland/rasterized.tga differ diff --git a/CesiumVectorOverlays/test/data/switzerland/tileset.json b/CesiumVectorOverlays/test/data/switzerland/tileset.json new file mode 100644 index 0000000000..612b4bc7d6 --- /dev/null +++ b/CesiumVectorOverlays/test/data/switzerland/tileset.json @@ -0,0 +1,37 @@ +{ + "asset": { + "version": "1.1" + }, + "geometricError": 157423.360580457, + "root": { + "boundingVolume": { + "region": [0.10511435661024317, 0.7989584641142331, 0.18225951525130435, 0.8348054325550944, 0.0, 0.005] + }, + "geometricError": 78711.6802902285, + "refine": "REPLACE", + "children": [{ + "boundingVolume": { + "region": [0.10511435661024317, 0.7989584641142331, 0.18225951525130435, 0.8348054325550944, 0.0, 0.005] + }, + "geometricError": 39355.84014511425, + "refine": "REPLACE", + "content": { + "uri": "0/tiles/{level}/{x}/{y}.gltf", + "extensions": { + "3DTILES_content_gltf_vector": { + "vector": true + } + } + }, + "implicitTiling": { + "subdivisionScheme": "QUADTREE", + "subtreeLevels": 2, + "availableLevels": 2, + "subtrees": { + "uri": "0/subtrees/{level}/{x}/{y}.subtree" + } + } + }] + }, + "extensionsUsed": ["3DTILES_content_gltf_vector"] +} \ No newline at end of file diff --git a/CesiumRasterOverlays/test/data/vienna-streets.geojson b/CesiumVectorOverlays/test/data/vienna-streets.geojson similarity index 100% rename from CesiumRasterOverlays/test/data/vienna-streets.geojson rename to CesiumVectorOverlays/test/data/vienna-streets.geojson diff --git a/README.md b/README.md index 3e1a65e32c..890e1bb831 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ Cesium Native powers Cesium's runtime integrations for [Cesium for Unreal](https | **CesiumRasterOverlays** | Classes for raster overlays, which allow draping massive 2D textures over a model. | | **CesiumUtility** | Utility functions for JSON parsing, URI processing, credits, etc. | | **CesiumVectorData** | Classes for loading vector data such as GeoJSON. | +| **CesiumVectorOverlays** | Raster overlays for displaying vector data. | ## 📗License diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 015439bfe2..ead3b5b01d 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -23,6 +23,7 @@ if(DOXYGEN_FOUND) ../CesiumClientCommon/include ../CesiumIonClient/include ../CesiumITwinClient/include + ../CesiumVectorOverlays/include ../CesiumVectorData/include ../CesiumJsonReader/include ../CesiumJsonWriter/include @@ -82,7 +83,7 @@ if(DOXYGEN_FOUND) set(DOXYGEN_USE_MDFILE_AS_MAINPAGE "../README.md") set(DOXYGEN_USE_MATHJAX YES) - set(DOXYGEN_DOT_GRAPH_MAX_NODES 100) + set(DOXYGEN_DOT_GRAPH_MAX_NODES 200) set(DOXYGEN_WARN_AS_ERROR FAIL_ON_WARNINGS_PRINT) list(APPEND DOXYGEN_IMAGE_PATH "${CMAKE_CURRENT_LIST_DIR}/") list(APPEND DOXYGEN_IMAGE_PATH "${CMAKE_CURRENT_LIST_DIR}/img") diff --git a/doc/diagrams/dependencies/Cesium3DTilesSelection.mmd b/doc/diagrams/dependencies/Cesium3DTilesSelection.mmd index 88f68b5644..13c853ce0e 100644 --- a/doc/diagrams/dependencies/Cesium3DTilesSelection.mmd +++ b/doc/diagrams/dependencies/Cesium3DTilesSelection.mmd @@ -17,11 +17,11 @@ graph TD Cesium3DTilesSelection[Cesium3DTilesSelection] --> CesiumQuantizedMeshTerrain[CesiumQuantizedMeshTerrain] Cesium3DTilesSelection[Cesium3DTilesSelection] --> CesiumRasterOverlays[CesiumRasterOverlays] Cesium3DTilesSelection[Cesium3DTilesSelection] --> CesiumUtility[CesiumUtility] + Cesium3DTilesSelection[Cesium3DTilesSelection] --> CesiumVectorData[CesiumVectorData] Cesium3DTilesSelection[Cesium3DTilesSelection] --> draco_draco{{draco::draco}} Cesium3DTilesSelection[Cesium3DTilesSelection] --> libmorton_libmorton{{libmorton::libmorton}} Cesium3DTilesSelection[Cesium3DTilesSelection] --> nonstd_expected-lite{{nonstd::expected-lite}} Cesium3DTilesSelection[Cesium3DTilesSelection] --> spdlog_spdlog{{spdlog::spdlog}} - Cesium3DTilesSelection[Cesium3DTilesSelection] --> spdlog_spdlog_header_only{{spdlog::spdlog_header_only}} Cesium3DTilesSelection[Cesium3DTilesSelection] --> tinyxml2_tinyxml2{{tinyxml2::tinyxml2}} - class draco_draco,libmorton_libmorton,nonstd_expected-lite,spdlog_spdlog,spdlog_spdlog_header_only,tinyxml2_tinyxml2 dependencyNode - class Cesium3DTiles,Cesium3DTilesContent,Cesium3DTilesReader,CesiumAsync,CesiumGeometry,CesiumGeospatial,CesiumGltf,CesiumGltfReader,CesiumQuantizedMeshTerrain,CesiumRasterOverlays,CesiumUtility,Cesium3DTilesSelection libraryNode + class draco_draco,libmorton_libmorton,nonstd_expected-lite,spdlog_spdlog,tinyxml2_tinyxml2 dependencyNode + class Cesium3DTiles,Cesium3DTilesContent,Cesium3DTilesReader,CesiumAsync,CesiumGeometry,CesiumGeospatial,CesiumGltf,CesiumGltfReader,CesiumQuantizedMeshTerrain,CesiumRasterOverlays,CesiumUtility,CesiumVectorData,Cesium3DTilesSelection libraryNode diff --git a/doc/diagrams/dependencies/CesiumAsync.mmd b/doc/diagrams/dependencies/CesiumAsync.mmd index 1140932493..9908432988 100644 --- a/doc/diagrams/dependencies/CesiumAsync.mmd +++ b/doc/diagrams/dependencies/CesiumAsync.mmd @@ -9,7 +9,6 @@ graph TD CesiumAsync[CesiumAsync] --> Async_{{Async++}} CesiumAsync[CesiumAsync] --> CesiumUtility[CesiumUtility] CesiumAsync[CesiumAsync] --> spdlog_spdlog{{spdlog::spdlog}} - CesiumAsync[CesiumAsync] --> spdlog_spdlog_header_only{{spdlog::spdlog_header_only}} CesiumAsync[CesiumAsync] --> unofficial_sqlite3_sqlite3{{unofficial::sqlite3::sqlite3}} - class Async_,spdlog_spdlog,spdlog_spdlog_header_only,unofficial_sqlite3_sqlite3 dependencyNode + class Async_,spdlog_spdlog,unofficial_sqlite3_sqlite3 dependencyNode class CesiumUtility,CesiumAsync libraryNode diff --git a/doc/diagrams/dependencies/CesiumCurl.mmd b/doc/diagrams/dependencies/CesiumCurl.mmd index 38706b2e83..3ac8c3f53f 100644 --- a/doc/diagrams/dependencies/CesiumCurl.mmd +++ b/doc/diagrams/dependencies/CesiumCurl.mmd @@ -6,7 +6,7 @@ title: CesiumCurl Dependency Graph graph TD classDef dependencyNode fill:#fff,stroke:#ccc,color:#666,font-weight:bold,font-size:28px classDef libraryNode fill:#9f9,font-weight:bold,font-size:28px - CesiumCurl[CesiumCurl] --> CURL_libcurl{{CURL::libcurl}} + CesiumCurl[CesiumCurl] --> CURL_libcurl_static{{CURL::libcurl_static}} CesiumCurl[CesiumCurl] --> CesiumAsync[CesiumAsync] - class CURL_libcurl dependencyNode + class CURL_libcurl_static dependencyNode class CesiumAsync,CesiumCurl libraryNode diff --git a/doc/diagrams/dependencies/CesiumGltfReader.mmd b/doc/diagrams/dependencies/CesiumGltfReader.mmd index e615b06ed3..5e88b00943 100644 --- a/doc/diagrams/dependencies/CesiumGltfReader.mmd +++ b/doc/diagrams/dependencies/CesiumGltfReader.mmd @@ -13,8 +13,9 @@ graph TD CesiumGltfReader[CesiumGltfReader] --> WebP_webp{{WebP::webp}} CesiumGltfReader[CesiumGltfReader] --> WebP_webpdecoder{{WebP::webpdecoder}} CesiumGltfReader[CesiumGltfReader] --> draco_draco{{draco::draco}} - CesiumGltfReader[CesiumGltfReader] --> libjpeg-turbo_turbojpeg{{libjpeg-turbo::turbojpeg}} + CesiumGltfReader[CesiumGltfReader] --> libjpeg-turbo_turbojpeg-static{{libjpeg-turbo::turbojpeg-static}} CesiumGltfReader[CesiumGltfReader] --> meshoptimizer_meshoptimizer{{meshoptimizer::meshoptimizer}} CesiumGltfReader[CesiumGltfReader] --> modp_b64_modp_b64{{modp_b64::modp_b64}} - class KTX_ktx,WebP_webp,WebP_webpdecoder,draco_draco,libjpeg-turbo_turbojpeg,meshoptimizer_meshoptimizer,modp_b64_modp_b64 dependencyNode + CesiumGltfReader[CesiumGltfReader] --> spz_spz{{spz::spz}} + class KTX_ktx,WebP_webp,WebP_webpdecoder,draco_draco,libjpeg-turbo_turbojpeg-static,meshoptimizer_meshoptimizer,modp_b64_modp_b64,spz_spz dependencyNode class CesiumAsync,CesiumGltf,CesiumJsonReader,CesiumGltfReader libraryNode diff --git a/doc/diagrams/dependencies/CesiumITwinClient.mmd b/doc/diagrams/dependencies/CesiumITwinClient.mmd index 53eae944d4..72976728c8 100644 --- a/doc/diagrams/dependencies/CesiumITwinClient.mmd +++ b/doc/diagrams/dependencies/CesiumITwinClient.mmd @@ -8,8 +8,10 @@ graph TD classDef libraryNode fill:#9f9,font-weight:bold,font-size:28px CesiumITwinClient[CesiumITwinClient] --> CesiumAsync[CesiumAsync] CesiumITwinClient[CesiumITwinClient] --> CesiumClientCommon[CesiumClientCommon] + CesiumITwinClient[CesiumITwinClient] --> CesiumGeometry[CesiumGeometry] CesiumITwinClient[CesiumITwinClient] --> CesiumGeospatial[CesiumGeospatial] CesiumITwinClient[CesiumITwinClient] --> CesiumUtility[CesiumUtility] + CesiumITwinClient[CesiumITwinClient] --> CesiumVectorData[CesiumVectorData] CesiumITwinClient[CesiumITwinClient] --> modp_b64_modp_b64{{modp_b64::modp_b64}} class modp_b64_modp_b64 dependencyNode - class CesiumAsync,CesiumClientCommon,CesiumGeospatial,CesiumUtility,CesiumITwinClient libraryNode + class CesiumAsync,CesiumClientCommon,CesiumGeometry,CesiumGeospatial,CesiumUtility,CesiumVectorData,CesiumITwinClient libraryNode diff --git a/doc/diagrams/dependencies/CesiumRasterOverlays.mmd b/doc/diagrams/dependencies/CesiumRasterOverlays.mmd index 10e7477d8e..dbe5a4e7c3 100644 --- a/doc/diagrams/dependencies/CesiumRasterOverlays.mmd +++ b/doc/diagrams/dependencies/CesiumRasterOverlays.mmd @@ -12,8 +12,11 @@ graph TD CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumGltf[CesiumGltf] CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumGltfContent[CesiumGltfContent] CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumGltfReader[CesiumGltfReader] + CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumJsonReader[CesiumJsonReader] + CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumJsonWriter[CesiumJsonWriter] CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumUtility[CesiumUtility] CesiumRasterOverlays[CesiumRasterOverlays] --> nonstd_expected-lite{{nonstd::expected-lite}} + CesiumRasterOverlays[CesiumRasterOverlays] --> spdlog_spdlog{{spdlog::spdlog}} CesiumRasterOverlays[CesiumRasterOverlays] --> tinyxml2_tinyxml2{{tinyxml2::tinyxml2}} - class nonstd_expected-lite,tinyxml2_tinyxml2 dependencyNode - class CesiumAsync,CesiumGeometry,CesiumGeospatial,CesiumGltf,CesiumGltfContent,CesiumGltfReader,CesiumUtility,CesiumRasterOverlays libraryNode + class nonstd_expected-lite,spdlog_spdlog,tinyxml2_tinyxml2 dependencyNode + class CesiumAsync,CesiumGeometry,CesiumGeospatial,CesiumGltf,CesiumGltfContent,CesiumGltfReader,CesiumJsonReader,CesiumJsonWriter,CesiumUtility,CesiumRasterOverlays libraryNode diff --git a/doc/diagrams/dependencies/CesiumUtility.mmd b/doc/diagrams/dependencies/CesiumUtility.mmd index 7d77b1b1eb..153fd4b36c 100644 --- a/doc/diagrams/dependencies/CesiumUtility.mmd +++ b/doc/diagrams/dependencies/CesiumUtility.mmd @@ -9,6 +9,6 @@ graph TD CesiumUtility[CesiumUtility] --> ada_ada{{ada::ada}} CesiumUtility[CesiumUtility] --> glm_glm{{glm::glm}} CesiumUtility[CesiumUtility] --> spdlog_spdlog{{spdlog::spdlog}} - CesiumUtility[CesiumUtility] --> zlib-ng_zlib-ng{{zlib-ng::zlib-ng}} - class ada_ada,glm_glm,spdlog_spdlog,zlib-ng_zlib-ng dependencyNode + CesiumUtility[CesiumUtility] --> zlib-ng_zlib{{zlib-ng::zlib}} + class ada_ada,glm_glm,spdlog_spdlog,zlib-ng_zlib dependencyNode class CesiumUtility libraryNode diff --git a/doc/diagrams/dependencies/CesiumVectorData.mmd b/doc/diagrams/dependencies/CesiumVectorData.mmd index 5dd56e8941..2b2b763385 100644 --- a/doc/diagrams/dependencies/CesiumVectorData.mmd +++ b/doc/diagrams/dependencies/CesiumVectorData.mmd @@ -8,5 +8,12 @@ graph TD classDef libraryNode fill:#9f9,font-weight:bold,font-size:28px CesiumVectorData[CesiumVectorData] --> CesiumAsync[CesiumAsync] CesiumVectorData[CesiumVectorData] --> CesiumGeometry[CesiumGeometry] + CesiumVectorData[CesiumVectorData] --> CesiumGeospatial[CesiumGeospatial] + CesiumVectorData[CesiumVectorData] --> CesiumGltf[CesiumGltf] + CesiumVectorData[CesiumVectorData] --> CesiumGltfContent[CesiumGltfContent] CesiumVectorData[CesiumVectorData] --> CesiumUtility[CesiumUtility] - class CesiumAsync,CesiumGeometry,CesiumUtility,CesiumVectorData libraryNode + CesiumVectorData[CesiumVectorData] --> asmjit_asmjit{{asmjit::asmjit}} + CesiumVectorData[CesiumVectorData] --> blend2d_blend2d{{blend2d::blend2d}} + CesiumVectorData[CesiumVectorData] --> earcut{{earcut}} + class asmjit_asmjit,blend2d_blend2d,earcut dependencyNode + class CesiumAsync,CesiumGeometry,CesiumGeospatial,CesiumGltf,CesiumGltfContent,CesiumUtility,CesiumVectorData libraryNode diff --git a/doc/diagrams/dependencies/CesiumVectorOverlays.mmd b/doc/diagrams/dependencies/CesiumVectorOverlays.mmd new file mode 100644 index 0000000000..0a145b9660 --- /dev/null +++ b/doc/diagrams/dependencies/CesiumVectorOverlays.mmd @@ -0,0 +1,18 @@ +--- +comment: This file was generated by dep-graph-gen. DO NOT EDIT THIS FILE! + +title: CesiumVectorOverlays Dependency Graph +--- +graph TD + classDef dependencyNode fill:#fff,stroke:#ccc,color:#666,font-weight:bold,font-size:28px + classDef libraryNode fill:#9f9,font-weight:bold,font-size:28px + CesiumVectorOverlays[CesiumVectorOverlays] --> Cesium3DTilesSelection[Cesium3DTilesSelection] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumAsync[CesiumAsync] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumGeometry[CesiumGeometry] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumGeospatial[CesiumGeospatial] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumGltf[CesiumGltf] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumGltfContent[CesiumGltfContent] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumRasterOverlays[CesiumRasterOverlays] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumUtility[CesiumUtility] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumVectorData[CesiumVectorData] + class Cesium3DTilesSelection,CesiumAsync,CesiumGeometry,CesiumGeospatial,CesiumGltf,CesiumGltfContent,CesiumRasterOverlays,CesiumUtility,CesiumVectorData,CesiumVectorOverlays libraryNode diff --git a/doc/diagrams/dependencies/all.mmd b/doc/diagrams/dependencies/all.mmd index 94be7af5e0..6ac9f71270 100644 --- a/doc/diagrams/dependencies/all.mmd +++ b/doc/diagrams/dependencies/all.mmd @@ -10,7 +10,7 @@ graph TD CesiumUtility[CesiumUtility] --> ada_ada{{ada::ada}} CesiumUtility[CesiumUtility] --> glm_glm{{glm::glm}} CesiumUtility[CesiumUtility] --> spdlog_spdlog{{spdlog::spdlog}} - CesiumUtility[CesiumUtility] --> zlib-ng_zlib-ng{{zlib-ng::zlib-ng}} + CesiumUtility[CesiumUtility] --> zlib-ng_zlib{{zlib-ng::zlib}} Cesium3DTiles[Cesium3DTiles] --> CesiumUtility[CesiumUtility] Cesium3DTilesContent[Cesium3DTilesContent] --> Cesium3DTiles[Cesium3DTiles] Cesium3DTilesContent[Cesium3DTilesContent] --> Cesium3DTilesReader[Cesium3DTilesReader] @@ -28,7 +28,6 @@ graph TD CesiumAsync[CesiumAsync] --> Async_{{Async++}} CesiumAsync[CesiumAsync] --> CesiumUtility[CesiumUtility] CesiumAsync[CesiumAsync] --> spdlog_spdlog{{spdlog::spdlog}} - CesiumAsync[CesiumAsync] --> spdlog_spdlog_header_only{{spdlog::spdlog_header_only}} CesiumAsync[CesiumAsync] --> unofficial_sqlite3_sqlite3{{unofficial::sqlite3::sqlite3}} CesiumJsonReader[CesiumJsonReader] --> CesiumUtility[CesiumUtility] CesiumGeometry[CesiumGeometry] --> CesiumUtility[CesiumUtility] @@ -50,9 +49,10 @@ graph TD CesiumGltfReader[CesiumGltfReader] --> WebP_webp{{WebP::webp}} CesiumGltfReader[CesiumGltfReader] --> WebP_webpdecoder{{WebP::webpdecoder}} CesiumGltfReader[CesiumGltfReader] --> draco_draco{{draco::draco}} - CesiumGltfReader[CesiumGltfReader] --> libjpeg-turbo_turbojpeg{{libjpeg-turbo::turbojpeg}} + CesiumGltfReader[CesiumGltfReader] --> libjpeg-turbo_turbojpeg-static{{libjpeg-turbo::turbojpeg-static}} CesiumGltfReader[CesiumGltfReader] --> meshoptimizer_meshoptimizer{{meshoptimizer::meshoptimizer}} CesiumGltfReader[CesiumGltfReader] --> modp_b64_modp_b64{{modp_b64::modp_b64}} + CesiumGltfReader[CesiumGltfReader] --> spz_spz{{spz::spz}} Cesium3DTilesSelection[Cesium3DTilesSelection] --> Cesium3DTiles[Cesium3DTiles] Cesium3DTilesSelection[Cesium3DTilesSelection] --> Cesium3DTilesContent[Cesium3DTilesContent] Cesium3DTilesSelection[Cesium3DTilesSelection] --> Cesium3DTilesReader[Cesium3DTilesReader] @@ -64,11 +64,11 @@ graph TD Cesium3DTilesSelection[Cesium3DTilesSelection] --> CesiumQuantizedMeshTerrain[CesiumQuantizedMeshTerrain] Cesium3DTilesSelection[Cesium3DTilesSelection] --> CesiumRasterOverlays[CesiumRasterOverlays] Cesium3DTilesSelection[Cesium3DTilesSelection] --> CesiumUtility[CesiumUtility] + Cesium3DTilesSelection[Cesium3DTilesSelection] --> CesiumVectorData[CesiumVectorData] Cesium3DTilesSelection[Cesium3DTilesSelection] --> draco_draco{{draco::draco}} Cesium3DTilesSelection[Cesium3DTilesSelection] --> libmorton_libmorton{{libmorton::libmorton}} Cesium3DTilesSelection[Cesium3DTilesSelection] --> nonstd_expected-lite{{nonstd::expected-lite}} Cesium3DTilesSelection[Cesium3DTilesSelection] --> spdlog_spdlog{{spdlog::spdlog}} - Cesium3DTilesSelection[Cesium3DTilesSelection] --> spdlog_spdlog_header_only{{spdlog::spdlog_header_only}} Cesium3DTilesSelection[Cesium3DTilesSelection] --> tinyxml2_tinyxml2{{tinyxml2::tinyxml2}} CesiumQuantizedMeshTerrain[CesiumQuantizedMeshTerrain] --> CesiumAsync[CesiumAsync] CesiumQuantizedMeshTerrain[CesiumQuantizedMeshTerrain] --> CesiumGeospatial[CesiumGeospatial] @@ -84,9 +84,21 @@ graph TD CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumGltf[CesiumGltf] CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumGltfContent[CesiumGltfContent] CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumGltfReader[CesiumGltfReader] + CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumJsonReader[CesiumJsonReader] + CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumJsonWriter[CesiumJsonWriter] CesiumRasterOverlays[CesiumRasterOverlays] --> CesiumUtility[CesiumUtility] CesiumRasterOverlays[CesiumRasterOverlays] --> nonstd_expected-lite{{nonstd::expected-lite}} + CesiumRasterOverlays[CesiumRasterOverlays] --> spdlog_spdlog{{spdlog::spdlog}} CesiumRasterOverlays[CesiumRasterOverlays] --> tinyxml2_tinyxml2{{tinyxml2::tinyxml2}} + CesiumVectorData[CesiumVectorData] --> CesiumAsync[CesiumAsync] + CesiumVectorData[CesiumVectorData] --> CesiumGeometry[CesiumGeometry] + CesiumVectorData[CesiumVectorData] --> CesiumGeospatial[CesiumGeospatial] + CesiumVectorData[CesiumVectorData] --> CesiumGltf[CesiumGltf] + CesiumVectorData[CesiumVectorData] --> CesiumGltfContent[CesiumGltfContent] + CesiumVectorData[CesiumVectorData] --> CesiumUtility[CesiumUtility] + CesiumVectorData[CesiumVectorData] --> asmjit_asmjit{{asmjit::asmjit}} + CesiumVectorData[CesiumVectorData] --> blend2d_blend2d{{blend2d::blend2d}} + CesiumVectorData[CesiumVectorData] --> earcut{{earcut}} Cesium3DTilesWriter[Cesium3DTilesWriter] --> Cesium3DTiles[Cesium3DTiles] Cesium3DTilesWriter[Cesium3DTilesWriter] --> CesiumJsonWriter[CesiumJsonWriter] CesiumClientCommon[CesiumClientCommon] --> CesiumAsync[CesiumAsync] @@ -95,60 +107,72 @@ graph TD CesiumClientCommon[CesiumClientCommon] --> httplib_httplib{{httplib::httplib}} CesiumClientCommon[CesiumClientCommon] --> modp_b64_modp_b64{{modp_b64::modp_b64}} CesiumClientCommon[CesiumClientCommon] --> picosha2_picosha2{{picosha2::picosha2}} - CesiumCurl[CesiumCurl] --> CURL_libcurl{{CURL::libcurl}} + CesiumCurl[CesiumCurl] --> CURL_libcurl_static{{CURL::libcurl_static}} CesiumCurl[CesiumCurl] --> CesiumAsync[CesiumAsync] CesiumGltfWriter[CesiumGltfWriter] --> CesiumGltf[CesiumGltf] CesiumGltfWriter[CesiumGltfWriter] --> CesiumJsonWriter[CesiumJsonWriter] CesiumGltfWriter[CesiumGltfWriter] --> modp_b64_modp_b64{{modp_b64::modp_b64}} CesiumITwinClient[CesiumITwinClient] --> CesiumAsync[CesiumAsync] CesiumITwinClient[CesiumITwinClient] --> CesiumClientCommon[CesiumClientCommon] + CesiumITwinClient[CesiumITwinClient] --> CesiumGeometry[CesiumGeometry] CesiumITwinClient[CesiumITwinClient] --> CesiumGeospatial[CesiumGeospatial] CesiumITwinClient[CesiumITwinClient] --> CesiumUtility[CesiumUtility] + CesiumITwinClient[CesiumITwinClient] --> CesiumVectorData[CesiumVectorData] CesiumITwinClient[CesiumITwinClient] --> modp_b64_modp_b64{{modp_b64::modp_b64}} CesiumIonClient[CesiumIonClient] --> CesiumAsync[CesiumAsync] CesiumIonClient[CesiumIonClient] --> CesiumClientCommon[CesiumClientCommon] CesiumIonClient[CesiumIonClient] --> CesiumGeospatial[CesiumGeospatial] CesiumIonClient[CesiumIonClient] --> CesiumUtility[CesiumUtility] - CesiumVectorData[CesiumVectorData] --> CesiumAsync[CesiumAsync] - CesiumVectorData[CesiumVectorData] --> CesiumGeometry[CesiumGeometry] - CesiumVectorData[CesiumVectorData] --> CesiumUtility[CesiumUtility] - class ada_ada,glm_glm,spdlog_spdlog,zlib-ng_zlib-ng,libmorton_libmorton,Async_,spdlog_spdlog_header_only,unofficial_sqlite3_sqlite3,earcut,s2_s2,KTX_ktx,WebP_webp,WebP_webpdecoder,draco_draco,libjpeg-turbo_turbojpeg,meshoptimizer_meshoptimizer,modp_b64_modp_b64,nonstd_expected-lite,tinyxml2_tinyxml2,OpenSSL_Crypto,httplib_httplib,picosha2_picosha2,CURL_libcurl dependencyNode - class CesiumUtility,Cesium3DTiles,Cesium3DTilesReader,CesiumAsync,CesiumGeometry,CesiumGeospatial,CesiumGltf,CesiumGltfContent,CesiumGltfReader,Cesium3DTilesContent,CesiumJsonReader,CesiumQuantizedMeshTerrain,CesiumRasterOverlays,Cesium3DTilesSelection,CesiumJsonWriter,Cesium3DTilesWriter,CesiumClientCommon,CesiumCurl,CesiumGltfWriter,CesiumITwinClient,CesiumIonClient,CesiumVectorData libraryNode + CesiumVectorOverlays[CesiumVectorOverlays] --> Cesium3DTilesSelection[Cesium3DTilesSelection] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumAsync[CesiumAsync] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumGeometry[CesiumGeometry] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumGeospatial[CesiumGeospatial] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumGltf[CesiumGltf] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumGltfContent[CesiumGltfContent] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumRasterOverlays[CesiumRasterOverlays] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumUtility[CesiumUtility] + CesiumVectorOverlays[CesiumVectorOverlays] --> CesiumVectorData[CesiumVectorData] + class ada_ada,glm_glm,spdlog_spdlog,zlib-ng_zlib,libmorton_libmorton,Async_,unofficial_sqlite3_sqlite3,earcut,s2_s2,KTX_ktx,WebP_webp,WebP_webpdecoder,draco_draco,libjpeg-turbo_turbojpeg-static,meshoptimizer_meshoptimizer,modp_b64_modp_b64,spz_spz,nonstd_expected-lite,tinyxml2_tinyxml2,asmjit_asmjit,blend2d_blend2d,OpenSSL_Crypto,httplib_httplib,picosha2_picosha2,CURL_libcurl_static dependencyNode + class CesiumUtility,Cesium3DTiles,Cesium3DTilesReader,CesiumAsync,CesiumGeometry,CesiumGeospatial,CesiumGltf,CesiumGltfContent,CesiumGltfReader,Cesium3DTilesContent,CesiumJsonReader,CesiumQuantizedMeshTerrain,CesiumRasterOverlays,CesiumVectorData,Cesium3DTilesSelection,CesiumJsonWriter,Cesium3DTilesWriter,CesiumClientCommon,CesiumCurl,CesiumGltfWriter,CesiumITwinClient,CesiumIonClient,CesiumVectorOverlays libraryNode linkStyle 0 stroke:#ff0029,stroke-width:8px linkStyle 1 stroke:#377eb8,stroke-width:8px - linkStyle 2,20,60 stroke:#66a61e,stroke-width:8px + linkStyle 2,20,61,81 stroke:#66a61e,stroke-width:8px linkStyle 3 stroke:#984ea3,stroke-width:8px - linkStyle 4,13,19,23,24,26,29,35,56,69,70,77,83,96,101,104 stroke:#00d2d5,stroke-width:8px - linkStyle 5,15,46,80 stroke:#ff7f00,stroke-width:8px + linkStyle 4,13,19,22,23,25,28,34,56,69,70,79,88,95,109,115,123 stroke:#00d2d5,stroke-width:8px + linkStyle 5,15,46,92 stroke:#ff7f00,stroke-width:8px linkStyle 6,48 stroke:#af8d00,stroke-width:8px - linkStyle 7,16,30,36,49,63,71,82,89,93,98,102 stroke:#7f80cd,stroke-width:8px - linkStyle 8,25,31,50,72,103 stroke:#b3e900,stroke-width:8px - linkStyle 9,32,51,64,73,95,100 stroke:#c42e60,stroke-width:8px - linkStyle 10,33,37,52,65,74,90 stroke:#a65628,stroke-width:8px - linkStyle 11,66,75 stroke:#f781bf,stroke-width:8px - linkStyle 12,34,53,76 stroke:#8dd3c7,stroke-width:8px - linkStyle 14,58 stroke:#bebada,stroke-width:8px - linkStyle 17,38,67 stroke:#fb8072,stroke-width:8px + linkStyle 7,16,29,35,49,63,71,83,94,101,105,112,117 stroke:#7f80cd,stroke-width:8px + linkStyle 8,24,30,50,72,84,107,118 stroke:#b3e900,stroke-width:8px + linkStyle 9,31,51,64,73,85,108,114,119 stroke:#c42e60,stroke-width:8px + linkStyle 10,32,36,52,65,74,86,102,120 stroke:#a65628,stroke-width:8px + linkStyle 11,66,75,87,121 stroke:#f781bf,stroke-width:8px + linkStyle 12,33,53,76 stroke:#8dd3c7,stroke-width:8px + linkStyle 14,59 stroke:#bebada,stroke-width:8px + linkStyle 17,37,67,77 stroke:#fb8072,stroke-width:8px linkStyle 18 stroke:#80b1d3,stroke-width:8px - linkStyle 21,61 stroke:#fdb462,stroke-width:8px - linkStyle 22 stroke:#fccde5,stroke-width:8px + linkStyle 21 stroke:#fdb462,stroke-width:8px + linkStyle 26,91 stroke:#fccde5,stroke-width:8px linkStyle 27 stroke:#bc80bd,stroke-width:8px - linkStyle 28 stroke:#ffed6f,stroke-width:8px + linkStyle 38 stroke:#ffed6f,stroke-width:8px linkStyle 39 stroke:#c4eaff,stroke-width:8px linkStyle 40 stroke:#cf8c00,stroke-width:8px - linkStyle 41 stroke:#1b9e77,stroke-width:8px - linkStyle 42,57 stroke:#d95f02,stroke-width:8px + linkStyle 41,58 stroke:#1b9e77,stroke-width:8px + linkStyle 42 stroke:#d95f02,stroke-width:8px linkStyle 43 stroke:#e7298a,stroke-width:8px - linkStyle 44 stroke:#e6ab02,stroke-width:8px - linkStyle 45,86,92,97 stroke:#a6761d,stroke-width:8px + linkStyle 44,98,104,111 stroke:#e6ab02,stroke-width:8px + linkStyle 45 stroke:#a6761d,stroke-width:8px linkStyle 47 stroke:#0097ff,stroke-width:8px linkStyle 54 stroke:#00d067,stroke-width:8px - linkStyle 55 stroke:#000000,stroke-width:8px - linkStyle 59,78 stroke:#252525,stroke-width:8px - linkStyle 62,79 stroke:#525252,stroke-width:8px - linkStyle 68,81,91 stroke:#737373,stroke-width:8px - linkStyle 84 stroke:#969696,stroke-width:8px - linkStyle 85 stroke:#bdbdbd,stroke-width:8px - linkStyle 87 stroke:#f43600,stroke-width:8px - linkStyle 88 stroke:#4ba93b,stroke-width:8px - linkStyle 94,99 stroke:#5779bb,stroke-width:8px + linkStyle 55,122 stroke:#000000,stroke-width:8px + linkStyle 57,110,124 stroke:#252525,stroke-width:8px + linkStyle 60,80 stroke:#525252,stroke-width:8px + linkStyle 62,82 stroke:#737373,stroke-width:8px + linkStyle 68,78,93,103 stroke:#969696,stroke-width:8px + linkStyle 89 stroke:#bdbdbd,stroke-width:8px + linkStyle 90 stroke:#f43600,stroke-width:8px + linkStyle 96 stroke:#4ba93b,stroke-width:8px + linkStyle 97 stroke:#5779bb,stroke-width:8px + linkStyle 99 stroke:#927acc,stroke-width:8px + linkStyle 100 stroke:#97ee3f,stroke-width:8px + linkStyle 106,113 stroke:#bf3947,stroke-width:8px + linkStyle 116 stroke:#9f5b00,stroke-width:8px diff --git a/doc/img/dependency-graph.svg b/doc/img/dependency-graph.svg index 125d3c595a..1dd561a88a 100644 --- a/doc/img/dependency-graph.svg +++ b/doc/img/dependency-graph.svg @@ -1 +1 @@ -

CesiumUtility

ada::ada

glm::glm

spdlog::spdlog

zlib-ng::zlib-ng

Cesium3DTiles

Cesium3DTilesContent

Cesium3DTilesReader

CesiumAsync

CesiumGeometry

CesiumGeospatial

CesiumGltf

CesiumGltfContent

CesiumGltfReader

libmorton::libmorton

CesiumJsonReader

Async++

spdlog::spdlog_header_only

unofficial::sqlite3::sqlite3

earcut

s2::s2

KTX::ktx

WebP::webp

WebP::webpdecoder

draco::draco

libjpeg-turbo::turbojpeg

meshoptimizer::meshoptimizer

modp_b64::modp_b64

Cesium3DTilesSelection

CesiumQuantizedMeshTerrain

CesiumRasterOverlays

nonstd::expected-lite

tinyxml2::tinyxml2

CesiumJsonWriter

Cesium3DTilesWriter

CesiumClientCommon

OpenSSL::Crypto

httplib::httplib

picosha2::picosha2

CesiumCurl

CURL::libcurl

CesiumGltfWriter

CesiumITwinClient

CesiumIonClient

CesiumVectorData

\ No newline at end of file +

CesiumUtility

ada::ada

glm::glm

spdlog::spdlog

zlib-ng::zlib

Cesium3DTiles

Cesium3DTilesContent

Cesium3DTilesReader

CesiumAsync

CesiumGeometry

CesiumGeospatial

CesiumGltf

CesiumGltfContent

CesiumGltfReader

libmorton::libmorton

CesiumJsonReader

Async++

unofficial::sqlite3::sqlite3

earcut

s2::s2

KTX::ktx

WebP::webp

WebP::webpdecoder

draco::draco

libjpeg-turbo::turbojpeg-static

meshoptimizer::meshoptimizer

modp_b64::modp_b64

spz::spz

Cesium3DTilesSelection

CesiumQuantizedMeshTerrain

CesiumRasterOverlays

CesiumVectorData

nonstd::expected-lite

tinyxml2::tinyxml2

CesiumJsonWriter

asmjit::asmjit

blend2d::blend2d

Cesium3DTilesWriter

CesiumClientCommon

OpenSSL::Crypto

httplib::httplib

picosha2::picosha2

CesiumCurl

CURL::libcurl_static

CesiumGltfWriter

CesiumITwinClient

CesiumIonClient

CesiumVectorOverlays

\ No newline at end of file diff --git a/doc/topics/raster-overlays.md b/doc/topics/raster-overlays.md index 1595ee2b46..e1c61640fc 100644 --- a/doc/topics/raster-overlays.md +++ b/doc/topics/raster-overlays.md @@ -6,10 +6,11 @@ The following raster overlay types are currently included in Cesium Native: * [BingMapsRasterOverlay](\ref CesiumRasterOverlays::BingMapsRasterOverlay) * [DebugColorizeTilesRasterOverlay](\ref CesiumRasterOverlays::DebugColorizeTilesRasterOverlay) -* [GeoJsonDocumentRasterOverlay](\ref CesiumRasterOverlays::GeoJsonDocumentRasterOverlay) +* [GeoJsonDocumentRasterOverlay](\ref CesiumVectorOverlays::GeoJsonDocumentRasterOverlay) * [IonRasterOverlay](\ref CesiumRasterOverlays::IonRasterOverlay) * [TileMapServiceRasterOverlay](\ref CesiumRasterOverlays::TileMapServiceRasterOverlay) * [UrlTemplateRasterOverlay](\ref CesiumRasterOverlays::UrlTemplateRasterOverlay) +* [VectorTilesRasterOverlay](\ref CesiumVectorOverlays::VectorTilesRasterOverlay) * [WebMapServiceRasterOverlay](\ref CesiumRasterOverlays::WebMapServiceRasterOverlay) * [WebMapTileServiceRasterOverlay](\ref CesiumRasterOverlays::WebMapTileServiceRasterOverlay) diff --git a/tools/dep-graph-gen/index.js b/tools/dep-graph-gen/index.js index c3ef80d872..6e362582a1 100644 --- a/tools/dep-graph-gen/index.js +++ b/tools/dep-graph-gen/index.js @@ -54,7 +54,8 @@ nodes.forEach(n => { }); function formatLibraryNameAsId(libraryName) { - return libraryName.replace(/(::|\+\+)/g, "_"); + // libcurl for some reason has a multiline library name - just take the first line. + return libraryName.split("\\n")[0].replace(/(::|\+\+)/g, "_"); } const includedRegex = new RegExp(argv.targets); @@ -87,7 +88,8 @@ graph TD (dependencyLinks[n] || []).forEach(l => { const toNodeId = formatLibraryNameAsId(l); const isImportant = includedRegex.test(l); - const toLabel = isImportant ? `[${l}]` : `{{${l}}}`; + const formattedLabel = l.split("\\n")[0]; + const toLabel = isImportant ? `[${formattedLabel}]` : `{{${formattedLabel}}}`; output += ` ${fromNodeId}[${n}] --> ${toNodeId}${toLabel}\n`; if (isImportant) { classes["libraryNode"][toNodeId] = true; diff --git a/tools/dep-graph-gen/package-lock.json b/tools/dep-graph-gen/package-lock.json index 0abf5e3227..adaeec144e 100644 --- a/tools/dep-graph-gen/package-lock.json +++ b/tools/dep-graph-gen/package-lock.json @@ -43,6 +43,7 @@ "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "peer": true, "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", @@ -417,6 +418,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.5.0.tgz", "integrity": "sha512-6TQAc/5uRILE6deixJ1CR8rXyTbzXIXNgO1D0Woi9Bqicz2FV5iKP3BHYEg6o4UATCMcbQQ0jbmeaOkn/HQk2w==", + "peer": true, "dependencies": { "debug": "^4.3.7", "extract-zip": "^2.0.1", @@ -461,7 +463,8 @@ "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", - "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==" + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "peer": true }, "node_modules/@types/assert": { "version": "1.5.11", @@ -700,6 +703,7 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "optional": true, + "peer": true, "dependencies": { "undici-types": "~6.20.0" } @@ -723,6 +727,7 @@ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "optional": true, + "peer": true, "dependencies": { "@types/node": "*" } @@ -752,6 +757,7 @@ "version": "2.7.16", "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz", "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==", + "peer": true, "dependencies": { "@babel/parser": "^7.23.5", "postcss": "^8.4.14", @@ -858,7 +864,6 @@ "version": "1.7.23", "resolved": "https://registry.npmjs.org/@headlessui/vue/-/vue-1.7.23.tgz", "integrity": "sha512-JzdCNqurrtuu0YW6QaDtR2PIYCKPUWq28csDyMvN4zmGccmE7lz40Is6hc3LA4HFeCI7sekZ/PQMTNmn9I/4Wg==", - "peer": true, "dependencies": { "@tanstack/vue-virtual": "^3.0.0-beta.60" }, @@ -914,7 +919,6 @@ "version": "3.5.13", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz", "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==", - "peer": true, "dependencies": { "@vue/compiler-dom": "3.5.13", "@vue/compiler-sfc": "3.5.13", @@ -969,6 +973,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "peer": true, "dependencies": { "debug": "^4.3.4" }, @@ -1031,12 +1036,14 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "peer": true }, "node_modules/ast-types": { "version": "0.13.4", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "peer": true, "dependencies": { "tslib": "^2.0.1" }, @@ -1055,7 +1062,8 @@ "node_modules/b4a": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", - "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==" + "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", + "peer": true }, "node_modules/balanced-match": { "version": "1.0.2", @@ -1068,6 +1076,7 @@ "integrity": "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ==", "license": "Apache-2.0", "optional": true, + "peer": true, "peerDependencies": { "bare-abort-controller": "*" }, @@ -1083,6 +1092,7 @@ "integrity": "sha512-POK4oplfA7P7gqvetNmCs4CNtm9fNsx+IAh7jH7GgU0OJdge2rso0R20TNWVq6VoWcCvsTdlNDaleLHGaKx8CA==", "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { "bare-events": "^2.5.4", "bare-path": "^3.0.0", @@ -1108,6 +1118,7 @@ "integrity": "sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A==", "license": "Apache-2.0", "optional": true, + "peer": true, "engines": { "bare": ">=1.14.0" } @@ -1118,6 +1129,7 @@ "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==", "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { "bare-os": "^3.0.1" } @@ -1128,6 +1140,7 @@ "integrity": "sha512-reUN0M2sHRqCdG4lUK3Fw8w98eeUIZHL5c3H7Mbhk2yVBL+oofgaIp0ieLfD5QXwPCypBpmEEKU2WZKzbAk8GA==", "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { "streamx": "^2.21.0", "teex": "^1.0.1" @@ -1151,6 +1164,7 @@ "integrity": "sha512-ZMq4gd9ngV5aTMa5p9+UfY0b3skwhHELaDkhEHetMdX0LRkW9kzaym4oo/Eh+Ghm0CCDuMTsRIGM/ytUc1ZYmw==", "license": "Apache-2.0", "optional": true, + "peer": true, "dependencies": { "bare-path": "^3.0.0" } @@ -1178,6 +1192,7 @@ "version": "5.0.5", "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "peer": true, "engines": { "node": ">=10.0.0" } @@ -1240,6 +1255,7 @@ "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "peer": true, "engines": { "node": "*" } @@ -1248,6 +1264,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "peer": true, "engines": { "node": ">=6" } @@ -1276,7 +1293,6 @@ "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.1.1.tgz", "integrity": "sha512-f0yv5CPKaFxfsPTBzX7vGuim4oIC1/gcS7LUGdBSwl2dU6+FON6LVUksdOo1qJjoUvXNn45urgh8C+0a24pACQ==", "license": "Apache-2.0", - "peer": true, "dependencies": { "@chevrotain/cst-dts-gen": "11.1.1", "@chevrotain/gast": "11.1.1", @@ -1336,6 +1352,7 @@ "version": "0.8.0", "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.8.0.tgz", "integrity": "sha512-uJydbGdTw0DEUjhoogGveneJVWX/9YuqkWePzMmkBYwtdAqo5d3J/ovNKFr+/2hWXYmYCr6it8mSSTIj6SS6Ug==", + "peer": true, "dependencies": { "mitt": "3.0.1", "urlpattern-polyfill": "10.0.0", @@ -1409,6 +1426,7 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -1463,7 +1481,6 @@ "version": "3.30.4", "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.30.4.tgz", "integrity": "sha512-OxtlZwQl1WbwMmLiyPSEBuzeTIQnwZhJYYWFzZ2PhEHVFwpeaqNIkUzSiso00D98qk60l8Gwon2RP304d3BJ1A==", - "peer": true, "engines": { "node": ">=0.10" } @@ -1864,7 +1881,6 @@ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "license": "ISC", - "peer": true, "engines": { "node": ">=12" } @@ -1963,6 +1979,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "peer": true, "engines": { "node": ">= 14" } @@ -1977,6 +1994,7 @@ "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "peer": true, "dependencies": { "ms": "^2.1.3" }, @@ -1993,6 +2011,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "peer": true, "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", @@ -2060,6 +2079,7 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "peer": true, "dependencies": { "once": "^1.4.0" } @@ -2079,6 +2099,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "peer": true, "engines": { "node": ">=6" } @@ -2087,6 +2108,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "peer": true, "dependencies": { "is-arrayish": "^0.2.1" } @@ -2103,6 +2125,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "peer": true, "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -2123,6 +2146,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "peer": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -2135,6 +2159,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "peer": true, "engines": { "node": ">=4.0" } @@ -2148,6 +2173,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -2172,6 +2198,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "peer": true, "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -2190,7 +2217,8 @@ "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", - "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", + "peer": true }, "node_modules/fast-glob": { "version": "3.3.2", @@ -2238,6 +2266,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "peer": true, "dependencies": { "pend": "~1.2.0" } @@ -2306,6 +2335,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "peer": true, "dependencies": { "pump": "^3.0.0" }, @@ -2320,6 +2350,7 @@ "version": "6.0.4", "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", + "peer": true, "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", @@ -2399,6 +2430,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "peer": true, "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -2411,6 +2443,7 @@ "version": "7.0.5", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "peer": true, "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -2454,6 +2487,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "peer": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2487,6 +2521,7 @@ "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "peer": true, "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" @@ -2498,7 +2533,8 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "peer": true }, "node_modules/is-binary-path": { "version": "2.1.0", @@ -2590,13 +2626,15 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true }, "node_modules/js-yaml": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "license": "MIT", + "peer": true, "dependencies": { "argparse": "^2.0.1" }, @@ -2607,12 +2645,14 @@ "node_modules/jsbn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "peer": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "peer": true }, "node_modules/katex": { "version": "0.16.28", @@ -2698,6 +2738,7 @@ "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "peer": true, "engines": { "node": ">=12" } @@ -2734,7 +2775,6 @@ "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.12.3.tgz", "integrity": "sha512-wN5ZSgJQIC+CHJut9xaKWsknLxaFBwCPwPkGTSUYrTiHORWvpT8RxGk849HPnpUAQ+/9BPRqYb80jTpearrHzQ==", "license": "MIT", - "peer": true, "dependencies": { "@braintree/sanitize-url": "^7.1.1", "@iconify/utils": "^3.0.1", @@ -2807,7 +2847,8 @@ "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", - "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "peer": true }, "node_modules/mlly": { "version": "1.8.0", @@ -2824,7 +2865,8 @@ "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "peer": true }, "node_modules/mz": { "version": "2.7.0", @@ -2857,6 +2899,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "peer": true, "engines": { "node": ">= 0.4.0" } @@ -2897,6 +2940,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "peer": true, "dependencies": { "wrappy": "1" } @@ -2905,6 +2949,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz", "integrity": "sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==", + "peer": true, "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.0.2", @@ -2923,6 +2968,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "peer": true, "dependencies": { "degenerator": "^5.0.0", "netmask": "^2.0.2" @@ -2946,6 +2992,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "peer": true, "dependencies": { "callsites": "^3.0.0" }, @@ -2957,6 +3004,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "peer": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -3017,7 +3065,8 @@ "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "peer": true }, "node_modules/picocolors": { "version": "1.1.1", @@ -3129,7 +3178,6 @@ "url": "https://github.com/sponsors/ai" } ], - "peer": true, "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.1.1", @@ -3253,6 +3301,7 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "optional": true, + "peer": true, "bin": { "prettier": "bin-prettier.js" }, @@ -3280,6 +3329,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "peer": true, "engines": { "node": ">=0.4.0" } @@ -3288,6 +3338,7 @@ "version": "6.4.0", "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "peer": true, "dependencies": { "agent-base": "^7.0.2", "debug": "^4.3.4", @@ -3305,12 +3356,14 @@ "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "peer": true }, "node_modules/pump": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "peer": true, "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -3341,6 +3394,7 @@ "version": "23.10.1", "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.10.1.tgz", "integrity": "sha512-ey6NwixHYEUnhCA/uYi7uQQ4a0CZw4k+MatbHXGl5GEzaiRQziYUxc2HGpdQZ/gnh4KQWAKkocyIg1/dIm5d0g==", + "peer": true, "dependencies": { "@puppeteer/browsers": "2.5.0", "chromium-bidi": "0.8.0", @@ -3375,7 +3429,8 @@ "node_modules/queue-tick": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", - "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", + "peer": true }, "node_modules/quick-format-unescaped": { "version": "4.0.4", @@ -3461,6 +3516,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "peer": true, "engines": { "node": ">=4" } @@ -3556,6 +3612,7 @@ "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "peer": true, "bin": { "semver": "bin/semver.js" }, @@ -3610,6 +3667,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "peer": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -3619,6 +3677,7 @@ "version": "2.8.3", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "peer": true, "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" @@ -3632,6 +3691,7 @@ "version": "8.0.4", "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "peer": true, "dependencies": { "agent-base": "^7.1.1", "debug": "^4.3.4", @@ -3653,6 +3713,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -3676,12 +3737,14 @@ "node_modules/sprintf-js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "peer": true }, "node_modules/streamx": { "version": "2.21.0", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.21.0.tgz", "integrity": "sha512-Qz6MsDZXJ6ur9u+b+4xCG18TluU7PGlRfXVAAjNiGsFrBUt/ioyLkxbFaKJygoPs+/kW4VyBj0bSj89Qu0IGyg==", + "peer": true, "dependencies": { "fast-fifo": "^1.3.2", "queue-tick": "^1.0.1", @@ -3799,7 +3862,6 @@ "version": "3.4.16", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.16.tgz", "integrity": "sha512-TI4Cyx7gDiZ6r44ewaJmt0o6BrMCT5aK5e0rmJ/G9Xq3w7CX/5VXl/zIPEJZFUK5VEqwByyhqNPycPlvcK4ZNw==", - "peer": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -3837,6 +3899,7 @@ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz", "integrity": "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==", "license": "MIT", + "peer": true, "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" @@ -3850,6 +3913,7 @@ "version": "3.1.7", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "peer": true, "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", @@ -3862,6 +3926,7 @@ "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==", "license": "MIT", "optional": true, + "peer": true, "dependencies": { "streamx": "^2.12.5" } @@ -3869,7 +3934,8 @@ "node_modules/text-decoder": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", - "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==" + "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==", + "peer": true }, "node_modules/thenify": { "version": "3.3.1", @@ -3901,7 +3967,8 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "peer": true }, "node_modules/tinyexec": { "version": "1.0.2", @@ -3944,12 +4011,14 @@ "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "peer": true }, "node_modules/typed-query-selector": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", - "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==" + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "peer": true }, "node_modules/ufo": { "version": "1.6.3", @@ -3961,6 +4030,7 @@ "version": "1.4.3", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "peer": true, "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" @@ -3984,6 +4054,7 @@ "url": "https://feross.org/support" } ], + "peer": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -3993,12 +4064,14 @@ "version": "6.20.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", - "optional": true + "optional": true, + "peer": true }, "node_modules/urlpattern-polyfill": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", - "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==" + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "peer": true }, "node_modules/util-deprecate": { "version": "1.0.2", @@ -4171,12 +4244,14 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "peer": true }, "node_modules/ws": { "version": "8.18.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "peer": true, "engines": { "node": ">=10.0.0" }, @@ -4241,6 +4316,7 @@ "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "peer": true, "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -4250,6 +4326,7 @@ "version": "3.23.8", "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/tools/generate-classes/glTF.json b/tools/generate-classes/glTF.json index a29d6b4ad0..8d1bb1e5ea 100644 --- a/tools/generate-classes/glTF.json +++ b/tools/generate-classes/glTF.json @@ -178,6 +178,9 @@ "EXT_mesh_primitive_edge_visibility glTF Mesh Primitive Extension": { "overrideName": "ExtensionExtMeshPrimitiveEdgeVisibility", "toBeInherited": true + }, + "EXT_mesh_polygon glTF Mesh Primitive Extension": { + "overrideName": "ExtensionExtMeshPolygon" } }, "extensions": [ @@ -323,6 +326,13 @@ "attachTo": [ "mesh.primitive" ] + }, + { + "extensionName": "EXT_mesh_polygon", + "schema": "Vendor/EXT_mesh_polygon/EXT_mesh_polygon.schema.json", + "attachTo": [ + "mesh.primitive" + ] } ] }