Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix-api-url
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Dec 4, 2023
2 parents d54ee1f + 7d5a93d commit 3730f94
Show file tree
Hide file tree
Showing 130 changed files with 4,472 additions and 1,574 deletions.
38 changes: 32 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,55 @@
# Change Log

### ? - ?
### v0.30.0 - 2023-12-01

##### Breaking Changes :mega:

- Moved `ErrorList` from `Cesium3DTilesSelection` to `CesiumUtility`.
- Moved `ErrorList`, `CreditSystem`, and `Credit` from `Cesium3DTilesSelection` to `CesiumUtility`.
- Moved `GltfUtilities` from `Cesium3DTilesSelection` to `Cesium3DTilesContent`.
- Moved `createRasterOverlayTextureCoordinates` method from `GltfUtilities` to a new `RasterOverlayUtilities` class in the `Cesium3DTilesSelection` library.
- `GltfUtilities::parseGltfCopyright` now returns the credits as a vector of string_views. Previously it took a `CreditSystem` and created credits directly.
- Moved `RasterOverlay`, `RasterOverlayTileProvider`, `RasterOverlayTile`, `QuadtreeRasterOverlayTileProvider`, `RasterOverlayLoadFailure`, `RasterOverlayDetails`, and all of the `RasterOverlay`-derived types to a new `CesiumRasterOverlays` library and namespace.
- Moved `createRasterOverlayTextureCoordinates` method from `GltfUtilities` to a new `RasterOverlayUtilities` class in the `CesiumRasterOverlays` library.
- `GltfUtilities::parseGltfCopyright` now returns the credits as a vector of `std::string_view` instances. Previously it took a `CreditSystem` and created credits directly.
- The `SubtreeAvailability` constructor and `loadSubtree` static method now take an `ImplicitTileSubdivisionScheme` enumeration parameter instead of a `powerOf2` parameter. They also now require a `levelsInSubtree` parameter, which is needed when switching from constant to bitstream availability. Lastly, the constructor now takes a `Subtree` parameter instead of a `std::vector<std::vector<std::byte>>` representing the buffers.
- `SubtreeConstantAvailability`, `SubtreeBufferViewAvailability`, and `AvailabilityView` are now members of `SubtreeAvailability`.
- Moved `ImageManipulation` from `CesiumGltfReader` to `CesiumGltfContent`.
- Added some new parameters to `RasterOverlayUtilities::createRasterOverlayTextureCoordinates` and changed the order of some existing parameters.

##### Additions :tada:

- Added `Cesium3DTilesContent` library and namespace. It has classes for loading, converting, and manipulating 3D Tiles tile content.
- Added new `Cesium3DTilesContent` library and namespace. It has classes for loading, converting, and manipulating 3D Tiles tile content.
- Added new `CesiumGltfContent` library and namespace. It has classes for manipulating in-memory glTF files.
- Added new `CesiumRasterOverlays` library and namespace. It has classes for working with massive textures draped over glTFs and 3D Tiles.
- Added `MetadataConversions`, which enables metadata values to be converted to different types for better usability in runtime engines.
- Added various `typedef`s to catch all possible types of `AccessorView`s for an attribute, including `FeatureIdAccessorType` for feature ID attribute accessors, `IndexAccessorType` for index accessors, and `TexCoordAccessorType` for texture coordinate attribute accessors.
- Added `getFeatureIdAccessorView`, `getIndexAccessorView`, and `getTexCoordAccessorView` to retrieve the `AccessorView` as a `FeatureIdAccessorType`, `IndexAccessorType`, or `TexCoordAccessorType` respectively.
- Added `StatusFromAccessor` and `CountFromAccessor` visitors to retrieve the accessor status and size respectively. This can be used with `FeatureIdAccessorType`, `IndexAccessorType`, or `TexCoordAccessorType`.
- Added `FeatureIdFromAccessor` to retrieve feature IDs from a `FeatureIdAccessorType`.
- Added `IndicesForFaceFromAccessor` to retrieve the indices of the vertices that make up a face, as supplied by `IndexAccessorType`.
- Added `TexCoordFromAccessor` to retrieve the texture coordinates from a `TexCoordAccessorType`.
- Added `TileBoundingVolumes` class to `Cesium3DTilesContent`, making it easier to create the rich bounding volume types in `CesiumGeometry` and `CesiumGeospatial` from the simple vector representations in `Cesium3DTiles`.
- Added `transform` method to `CesiumGeometry::BoundingSphere`.
- Added `toSphere`, `fromSphere`, and `fromAxisAligned` methods to `CesiumGeometry::OrientedBoundingBox`.
- Added `TileTransform` class to `Cesium3DTilesContent`, making it easier to create a `glm::dmat4` from the `transform` property of a `Cesium3DTiles::Tile`.
- Added `ImplicitTilingUtilities` class to `Cesium3DTilesContent`.
- Added overloads of `isTileAvailable` and `isContentAvailable` on the `SubtreeAvailability` class that take the subtree root tile ID and the tile ID of interest, instead of a relative level and Morton index.
- Added overloads of `isTileAvailable`, `isContentAvailable`, and `isSubtreeAvailable` on the `SubtreeAvailability` class that take the subtree root tile ID and the tile ID of interest, instead of a relative level and Morton index.
- Added `fromSubtree` and `createEmpty` static methods to `SubtreeAvailability`.
- Added new `set` methods to `SubtreeAvailability`, allowing the availability information to be modified.
- Added `SubtreeFileReader` class, used to read `Cesium3DTiles::Subtree` from a binary or JSON subtree file.
- Added `pointInTriangle2D` static method to `CesiumGeometry::IntersectionTests`.
- Added `rectangleIsWithinPolygons` and `rectangleIsOutsidePolygons` static methods to `CartographicPolygon`.
- Raster overlays now use `IPrepareRasterOverlayRendererResources`, which contains only overlay-related methods, instead of `IPrepareRendererResources`, which contains tileset-related methods as well. `IPrepareRendererResources` derives from `IPrepareRasterOverlayRendererResources` so existing code should continue to work without modification.
- Added `collapseToSingleBuffer` and `moveBufferContent` methods to `GltfUtilities`.
- Added `savePng` method to `ImageManipulation`.
- `RasterOverlayTileProvider::loadTile` now returns a future that resolves when the tile is done loading.
- Added `computeDesiredScreenPixels` and `computeTranslationAndScale` methods to `RasterOverlayUtilities`.
- Added `Future<T>::thenPassThrough`, used to easily pass additional values through to the next continuation.

##### Fixes :wrench:

- Fixed a bug in `OrientedBoundingBox::contains` where it didn't account for the bounding box's center.
- Fixed compiler error when calling `PropertyAttributeView::forEachProperty`.
- Fixed crash when loading glTFs with data uri images.
- Fixed WD4996 warnings-as-errors when compiling with Visual Studio 2002 v17.8.

### v0.29.0 - 2023-11-01

Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,15 @@ add_subdirectory(CesiumGeometry)
add_subdirectory(CesiumGeospatial)
add_subdirectory(CesiumJsonReader)
add_subdirectory(CesiumJsonWriter)
add_subdirectory(CesiumGltfContent)
add_subdirectory(CesiumGltfReader)
add_subdirectory(CesiumGltfWriter)
add_subdirectory(CesiumAsync)
add_subdirectory(Cesium3DTiles)
add_subdirectory(Cesium3DTilesReader)
add_subdirectory(Cesium3DTilesWriter)
add_subdirectory(Cesium3DTilesContent)
add_subdirectory(CesiumRasterOverlays)
add_subdirectory(Cesium3DTilesSelection)
add_subdirectory(CesiumIonClient)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Cesium3DTiles {
* @brief A buffer is a binary blob. It is either the binary chunk of the
* subtree file, or an external buffer referenced by a URI.
*/
struct CESIUM3DTILES_API Buffer final : public CesiumUtility::ExtensibleObject {
struct CESIUM3DTILES_API BufferSpec : public CesiumUtility::ExtensibleObject {
static inline constexpr const char* TypeName = "Buffer";

/**
Expand All @@ -36,5 +36,12 @@ struct CESIUM3DTILES_API Buffer final : public CesiumUtility::ExtensibleObject {
* @brief The name of the buffer.
*/
std::optional<std::string> name;

private:
/**
* @brief This class is not meant to be instantiated directly. Use {@link Buffer} instead.
*/
BufferSpec() = default;
friend struct Buffer;
};
} // namespace Cesium3DTiles
4 changes: 2 additions & 2 deletions Cesium3DTiles/generated/include/Cesium3DTiles/Properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ struct CESIUM3DTILES_API Properties final

/**
* @brief The maximum value of this property of all the features in the
* tileset. The maximum value shall not be larger than the minimum value.
* tileset. The maximum value shall not be smaller than the minimum value.
*/
double maximum = double();

/**
* @brief The minimum value of this property of all the features in the
* tileset. The maximum value shall not be larger than the minimum value.
* tileset. The maximum value shall not be smaller than the minimum value.
*/
double minimum = double();
};
Expand Down
2 changes: 1 addition & 1 deletion Cesium3DTiles/generated/include/Cesium3DTiles/Tile.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct CESIUM3DTILES_API Tile final : public CesiumUtility::ExtensibleObject {
* @brief An array of objects that define child tiles. Each child tile content
* is fully enclosed by its parent tile's bounding volume and, generally, has
* a geometricError less than its parent tile's geometricError. For leaf
* tiles, the length of this array is zero, and children may not be defined.
* tiles, there are no children, and this property may not be defined.
*/
std::vector<Cesium3DTiles::Tile> children;
};
Expand Down
16 changes: 16 additions & 0 deletions Cesium3DTiles/include/Cesium3DTiles/Buffer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include <Cesium3DTiles/BufferCesium.h>
#include <Cesium3DTiles/BufferSpec.h>
#include <Cesium3DTiles/Library.h>

namespace Cesium3DTiles {
/** @copydoc BufferSpec */
struct CESIUM3DTILES_API Buffer final : public BufferSpec {
/**
* @brief Holds properties that are specific to the 3D Tiles loader rather
* than part of the 3D Tiles spec.
*/
BufferCesium cesium;
};
} // namespace Cesium3DTiles
19 changes: 19 additions & 0 deletions Cesium3DTiles/include/Cesium3DTiles/BufferCesium.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include <Cesium3DTiles/Library.h>

#include <cstddef>
#include <vector>

namespace Cesium3DTiles {
/**
* @brief Holds {@link Buffer} properties that are specific to the 3D Tiles loader
* rather than part of the 3D Tiles spec.
*/
struct CESIUM3DTILES_API BufferCesium final {
/**
* @brief The buffer's data.
*/
std::vector<std::byte> data;
};
} // namespace Cesium3DTiles
2 changes: 2 additions & 0 deletions Cesium3DTilesContent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ target_include_directories(
target_link_libraries(Cesium3DTilesContent
PUBLIC
Cesium3DTiles
Cesium3DTilesReader
CesiumAsync
CesiumGeometry
CesiumGeospatial
CesiumGltf
CesiumGltfContent
CesiumGltfReader
CesiumUtility
)
Expand Down
Loading

0 comments on commit 3730f94

Please sign in to comment.