Skip to content

Commit

Permalink
Merge tag 'v0.44.1' into cesium.com
Browse files Browse the repository at this point in the history
v0.44.1 release
  • Loading branch information
kring committed Feb 4, 2025
2 parents be9ff38 + 80c8800 commit 68bc873
Show file tree
Hide file tree
Showing 525 changed files with 12,199 additions and 4,645 deletions.
62 changes: 54 additions & 8 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Checks:
- "bugprone-dynamic-static-initializers"
- "-bugprone-easily-swappable-parameters"
- "bugprone-empty-catch"
- "bugprone-exception-escape"
# See https://github.com/CesiumGS/cesium-native/issues/348
#- "bugprone-exception-escape"
- "bugprone-fold-init-type"
- "bugprone-forward-declaration-namespace"
- "bugprone-forwarding-reference-overload"
Expand All @@ -36,7 +37,8 @@ Checks:
- "bugprone-macro-repeated-side-effects"
- "bugprone-misplaced-operator-in-strlen-in-alloc"
- "bugprone-misplaced-pointer-arithmetic-in-alloc"
- "bugprone-misplaced-widening-cast"
# Produces a lot of results that are just extra-verbose - skipping for now
#- "bugprone-misplaced-widening-cast"
- "bugprone-move-forwarding-reference"
- "bugprone-multi-level-implicit-pointer-conversion"
- "bugprone-multiple-new-in-one-expression"
Expand All @@ -53,7 +55,6 @@ Checks:
- "bugprone-return-const-ref-from-parameter"
- "bugprone-shared-ptr-array-mismatch"
- "bugprone-signal-handler"
- "bugprone-signed-char-misuse"
- "bugprone-sizeof-container"
- "bugprone-sizeof-expression"
- "bugprone-spuriously-wake-up-functions"
Expand All @@ -72,24 +73,66 @@ Checks:
- "bugprone-suspicious-string-compare"
- "bugprone-suspicious-stringview-data-usage"
- "bugprone-swapped-arguments"
- "bugprone-switch-missing-default-case"
- "bugprone-terminating-continue"
- "bugprone-throw-keyword-missing"
- "bugprone-too-small-loop-variable"
- "bugprone-undefined-memory-manipulation"
- "bugprone-undelegated-constructor"
- "bugprone-unhandled-exception-at-new"
#- "bugprone-unhandled-exception-at-new"
- "bugprone-unique-ptr-array-mismatch"
- "bugprone-unsafe-functions"
- "bugprone-unused-local-non-trivial-variable"
- "bugprone-unused-raii"
- "bugprone-unused-return-value"
- "bugprone-use-after-move"
- "bugprone-virtual-near-miss"
- "cppcoreguidelines-avoid-capturing-lambda-coroutines"
- "cppcoreguidelines-avoid-goto"
- "cppcoreguidelines-avoid-reference-coroutine-parameters"
- "cppcoreguidelines-interfaces-global-init"
- "cppcoreguidelines-misleading-capture-default-by-value"
- "cppcoreguidelines-no-suspend-with-lock"
- "cppcoreguidelines-prefer-member-initializer"
- "cppcoreguidelines-pro-type-cstyle-cast"
- "cppcoreguidelines-pro-type-static-cast-downcast"
- "cppcoreguidelines-pro-type-union-access"
- "cppcoreguidelines-slicing"
- "google-runtime-int"
# We should enable this one at some point, but it produces a huge number of changes
# - "misc-const-correctness"
- "misc-misleading-bidrectional"
- "misc-misleading-identifier"
- "misc-misplaced-const"
- "misc-non-copyable-objects"
- "misc-redundant-expression"
- "misc-unused-parameters"
- "misc-unused-using-decls"
- "misc-use-anonymous-namespace"
- "misc-use-internal-linkage"
- "modernize-deprecated-headers"
#- "modernize-loop-convert"
- "modernize-make-shared"
- "modernize-make-unique"
- "modernize-min-max-use-initializer-list"
- "modernize-raw-string-literal"
- "modernize-redundant-void-arg"
- "modernize-replace-auto-ptr"
#- "modernize-type-traits"
#- "modernize-use-constraints"
- "modernize-use-emplace"
- "modernize-use-equals-default"
- "modernize-use-equals-delete"
- "modernize-use-nullptr"
- "modernize-use-starts-ends-with"
# The <numbers> header is unfortunately not available in Android NDK r25b,
# which is an important target for cesium-native via Unreal Engine.
#- "modernize-use-std-numbers"
#- "modernize-use-using"
- "performance-*"
- "-performance-enum-size"
- "-readability-redundant-member-init"

#WarningsAsErrors: "*"
WarningsAsErrors: ""
WarningsAsErrors: "*"
FormatStyle: none
CheckOptions:
- key: readability-implicit-bool-conversion.AllowPointerConditions
Expand All @@ -99,7 +142,10 @@ CheckOptions:
- key: modernize-use-auto.RemoveStars
value: "true"
- key: misc-include-cleaner.IgnoreHeaders
value: ".*cesium-async\\+\\+\\.h"
value: ".*cesium-async\\+\\+\\.h;.*bits\/.*.h"
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: "false"
HeaderFilterRegex: ".*"
HeaderFileExtensions: ["h"]
ExcludeHeaderFilterRegex: ".*\\.ezvcpkg\/.*"
ImplementationFileExtensions: ["cpp"]
30 changes: 22 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install nasm
uses: ilammy/setup-nasm@v1
- name: Install latest ninja and cmake
uses: lukka/get-cmake@latest
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-ubuntu-24.04-clang-clang-tidy
- name: Install latest clang and clang-tidy
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19
sudo apt-get install clang-tidy-19
- name: Cache vcpkg artifacts
uses: actions/cache@v4
with:
Expand All @@ -35,8 +39,8 @@ jobs:
vcpkg-ubuntu-24.04-clang
- name: Set CC and CXX
run: |
echo "CC=clang-18" >> "$GITHUB_ENV"
echo "CXX=clang++-18" >> "$GITHUB_ENV"
echo "CC=/usr/bin/clang-19" >> "$GITHUB_ENV"
echo "CXX=/usr/bin/clang++-19" >> "$GITHUB_ENV"
- name: Make more swap space available
run: |
sudo swapoff -a
Expand All @@ -47,8 +51,18 @@ jobs:
sudo swapon --show
- name: Run clang-tidy
run: |
cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug
cmake --build build --target clang-tidy
echo `$CC --version | head -n 1`, `cmake --version | head -n 1`
cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug -DCESIUM_CLANG_TIDY_USE_THREADS=4
cmake --build build --target clang-tidy > output.log
- name: List clang-tidy warnings & errors
if: ${{ !cancelled() }}
run: |
sed -n '/\(error\|warning\):/,/^$/p' output.log
# On macOS, the above doesn't work because the escaped pipe is not supported.
# Instead, use two commands:
# sed -n '/error:/,/^$/p' output.log
# sed -n '/warning:/,/^$/p' output.log
Documentation:
runs-on: ubuntu-22.04
steps:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ CMakeSettings.json
test.db
build-wsl
.idea
build-debug
clang-tidy.log
35 changes: 35 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Change Log

### v0.44.1 - 2025-02-03

##### Fixes :wrench:

- Fixed a bug in `CesiumIonClient::Connection` that caused the `authorize` method to use an incorrect URL.

### v0.44.0 - 2025-02-03

##### Breaking Changes :mega:

- Removed `Math::rotation`. Use `glm::rotation` from `<glm/gtx/quaternion.hpp>` instead.
- Removed `Math::perpVector`. Use `glm::perp` from `<glm/gtx/perpendicular.hpp>` instead.
- Using Cesium Native in non-cmake projects now requires manually defining `GLM_ENABLE_EXPERIMENTAL`.
- cesium-native no longer uses the `GLM_FORCE_SIZE_T_LENGTH` option with the `glm` library
- `CullingVolume` has been moved from the `Cesium3DTilesSelection` namespace to the `CesiumGeometry` namespace.

##### Additions :tada:

- Added `forEachTile`, `forEachContent`, `addExtensionUsed`, `addExtensionRequired`, `removeExtensionUsed`, `removeExtensionRequired`, `isExtensionUsed`, and `isExtensionRequired` to `Cesium3DTiles::Tileset`.
- Added conversion of I3dm batch table metadata to `EXT_structural_metadata` and `EXT_instance_features` extensions.
- Added `CesiumIonClient::Connection::geocode` method for making geocoding queries against the Cesium ion geocoder API.
- Added `UrlTemplateRasterOverlay` for requesting raster tiles from services using a templated URL.
- `upsampleGltfForRasterOverlays` is now compatible with meshes using TRIANGLE_STRIP, TRIANGLE_FAN, or non-indexed TRIANGLES primitives.
- Added `requestHeaders` field to `TilesetOptions` to allow per-tileset request headers to be specified.

##### Fixes :wrench:

- Fixed a crash in `GltfWriter` that would happen when the `EXT_structural_metadata` `schema` property was null.
- Fixed a bug in `SharedAssetDepot` that could cause assertion failures in debug builds, and could rarely cause premature deletion of shared assets even in release builds.
- Fixed a bug that could cause `Tileset::sampleHeightMostDetailed` to return a height that is not the highest one when the sampled tileset contained multiple heights at the given location.
- `LayerJsonTerrainLoader` will now log errors and warnings when failing to load a `.terrain` file referenced in the layer.json, instead of silently ignoring them.
- URIs containing unicode characters are now supported.
- Fixed a crash in `CullingVolume` when the camera was very far away from the globe.
- Fixed a bug that prevented the `culture` parameter of the `BingMapsRasterOverlay` from having an effect.

### v0.43.0 - 2025-01-02

##### Breaking Changes :mega:
Expand Down
2 changes: 1 addition & 1 deletion CMakeGraphVizOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ set(GRAPHVIZ_GENERATE_PER_TARGET FALSE)
set(GRAPHVIZ_GENERATE_DEPENDERS FALSE)
set(GRAPHVIZ_OBJECT_LIBS FALSE)
list(APPEND GRAPHVIZ_IGNORE_TARGETS cesium-native-tests)
list(APPEND GRAPHVIZ_IGNORE_TARGETS "Catch2::*")
list(APPEND GRAPHVIZ_IGNORE_TARGETS "doctest::*")
list(APPEND GRAPHVIZ_IGNORE_TARGETS "lib*.lib")
list(APPEND GRAPHVIZ_IGNORE_TARGETS "lib*.so")
16 changes: 10 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ if (NOT VCPKG_OVERLAY_PORTS)
endif()
endif()

list(APPEND VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_SOURCE_DIR}/extern/vcpkg/ports")

message(STATUS "VCPKG_OVERLAY_PORTS ${VCPKG_OVERLAY_PORTS}")

if (NOT VCPKG_OVERLAY_TRIPLETS)
Expand All @@ -44,8 +46,8 @@ message(STATUS "VCPKG_OVERLAY_TRIPLETS ${VCPKG_OVERLAY_TRIPLETS}")
# These packages are used in the public headers of Cesium libraries, so we need to distribute the headers and binaries
# with the installation
# Note that fmt is a public dependency of the vcpkg version of spdlog
# STB and uriparser aren't technically part of the public interface, but they're used by the downstream Cesium for Unreal project
set(PACKAGES_PUBLIC asyncplusplus expected-lite fmt glm rapidjson spdlog stb uriparser)
# STB is not technically part of the public interface, but it is used by the downstream Cesium for Unreal project
set(PACKAGES_PUBLIC asyncplusplus expected-lite fmt glm rapidjson spdlog stb ada-url)
# These packages are used in the code and produce binaries, but are not part of the public interface. Therefore we need
# to distribute the binaries for linking, but not the headers, as downstream consumers don't need them
# OpenSSL and abseil are both dependencies of s2geometry
Expand All @@ -56,7 +58,7 @@ set(PACKAGES_PRIVATE
)

# Packages only used for testing
set(PACKAGES_TEST catch2)
set(PACKAGES_TEST doctest)

if(NOT VCPKG_MANIFEST_MODE)
set(PACKAGES_ALL ${PACKAGES_PUBLIC})
Expand Down Expand Up @@ -85,7 +87,7 @@ endif()
include("cmake/defaults.cmake")

project(cesium-native
VERSION 0.43.0
VERSION 0.44.0
LANGUAGES CXX C
)

Expand Down Expand Up @@ -116,6 +118,8 @@ cmake_dependent_option(
OFF
)

set(CESIUM_CLANG_TIDY_USE_THREADS 14 CACHE STRING "Sets the number of threads for run-clang-tidy to use.")

if(CESIUM_INSTALL_STATIC_LIBS OR CESIUM_INSTALL_HEADERS)
foreach(PACKAGE ${PACKAGES_PUBLIC})
string(REGEX REPLACE "\[.*\]" "" PACKAGE ${PACKAGE})
Expand Down Expand Up @@ -239,7 +243,7 @@ list(APPEND CMAKE_PREFIX_PATH "${PACKAGE_BUILD_DIR}")
# and imporeted library target ourselves. This is the case for modp_b64::modp_b64, picosha2::picosha2 and earcut. In
# these cases, we *do* have the somewhat ugly and verbose details in the extern/CMakeLists.txt file.
find_package(Async++ CONFIG REQUIRED)
find_package(Catch2 CONFIG REQUIRED)
find_package(doctest CONFIG REQUIRED)
find_package(draco CONFIG REQUIRED)
find_package(expected-lite CONFIG REQUIRED)
find_package(glm CONFIG REQUIRED)
Expand All @@ -253,8 +257,8 @@ find_package(s2 CONFIG REQUIRED)
find_package(spdlog CONFIG REQUIRED)
find_package(tinyxml2 CONFIG REQUIRED)
find_package(unofficial-sqlite3 CONFIG REQUIRED)
find_package(uriparser CONFIG REQUIRED char wchar_t)
find_package(WebP CONFIG REQUIRED)
find_package(ada CONFIG REQUIRED)


# Private Library (s2geometry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ namespace Cesium3DTiles {
/**
* @brief A 3D Tiles tileset.
*/
struct CESIUM3DTILES_API Tileset final
: public CesiumUtility::ExtensibleObject {
struct CESIUM3DTILES_API TilesetSpec : public CesiumUtility::ExtensibleObject {
/**
* @brief The original name of this type.
*/
Expand Down Expand Up @@ -98,7 +97,7 @@ struct CESIUM3DTILES_API Tileset final
*/
int64_t getSizeBytes() const {
int64_t accum = 0;
accum += int64_t(sizeof(Tileset));
accum += int64_t(sizeof(TilesetSpec));
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
int64_t(sizeof(CesiumUtility::ExtensibleObject));
accum += this->asset.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::Asset));
Expand Down Expand Up @@ -135,5 +134,12 @@ struct CESIUM3DTILES_API Tileset final
accum += int64_t(sizeof(std::string) * this->extensionsRequired.capacity());
return accum;
}

protected:
/**
* @brief This class is not meant to be instantiated directly. Use {@link Tileset} instead.
*/
TilesetSpec() = default;
friend struct Tileset;
};
} // namespace Cesium3DTiles
Loading

0 comments on commit 68bc873

Please sign in to comment.