Skip to content

Commit

Permalink
Merge pull request #467 from jqntn/ellipsoid-tileset-loader
Browse files Browse the repository at this point in the history
Add support for ellipsoid tileset loader
  • Loading branch information
azrogers authored Nov 6, 2024
2 parents 35427de + ff03871 commit 34f6979
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## Not Released Yet

##### Additions :tada:

- Added a "From Ellipsoid" option to `Cesium3DTileset` to generate a tileset by tesselating the surface of the ellipsoid, producing a simple globe tileset without terrain features.

## v1.13.1 - 2024-11-01

##### Fixes :wrench:
Expand Down Expand Up @@ -116,7 +122,7 @@ In addition to the above, this release updates [cesium-native](https://github.co
- Added `CesiumMetadataValue`, which can hold a metadata value from `EXT_structural_metadata` while abstracting away its type.
- Added a `distance` property to `CesiumOriginShift`, which specifies the maximum allowed distance from the current origin before it is shifted.
- Added support for the `KHR_texture_transform` glTF extension - including rotation - in `baseColorTexture`, `metallicRoughnessTexture`, `emissiveTexture`, `normalTexture`, and `occlusionTexture`. The transformation is now applied on the GPU via nodes in the Material, rather than on the CPU by directly modifying texture coordinates.
- Added `materialKey` to `CesiumRasterOverlay`, which matches the overlay to its corresponding parameters in the tileset's material. This allows for explicit ordering of raster overlays and overlay-specific effects.
- Added `materialKey` to `CesiumRasterOverlay`, which matches the overlay to its corresponding parameters in the tileset's material. This allows for explicit ordering of raster overlays and overlay-specific effects.
- `CesiumCameraController` can now accept custom input actions that override the default inputs.

##### Fixes :wrench:
Expand Down
7 changes: 6 additions & 1 deletion Runtime/Cesium3DTileset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ public enum CesiumDataSource
/// <summary>
/// The dataset is from a regular web URL.
/// </summary>
FromUrl
FromUrl,

/// <summary>
/// The dataset is generated from the georeference ellipsoid.
/// </summary>
FromEllipsoid
}

/// <summary>
Expand Down
7 changes: 7 additions & 0 deletions native~/Runtime/src/Cesium3DTilesetImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "UnityTileExcluderAdaptor.h"
#include "UnityTilesetExternals.h"

#include <Cesium3DTilesSelection/EllipsoidTilesetLoader.h>
#include <Cesium3DTilesSelection/Tileset.h>
#include <CesiumGeospatial/GlobeTransforms.h>
#include <CesiumIonClient/Connection.h>
Expand Down Expand Up @@ -694,6 +695,12 @@ void Cesium3DTilesetImpl::LoadTileset(
// Resolve the API URL if it's not already in progress.
resolveCesiumIonApiUrl(tileset.ionServer());
}
} else if (
tileset.tilesetSource() ==
CesiumForUnity::CesiumDataSource::FromEllipsoid) {
this->_pTileset = EllipsoidTilesetLoader::createTileset(
createTilesetExternals(tileset),
options);
} else {
this->_pTileset = std::make_unique<Tileset>(
createTilesetExternals(tileset),
Expand Down

0 comments on commit 34f6979

Please sign in to comment.