Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade EXT_feature_metadata to EXT_structural_metadata #654

Merged
merged 153 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
c545b54
Use EXT_mesh_features to indicate feature IDs
May 10, 2023
c1e852f
Rename file
May 10, 2023
a4cc7a3
Merge pull request #635 from CesiumGS/use-ext-mesh-features
j9liu May 15, 2023
14997fb
Add property types for structural metadata
May 15, 2023
1433243
Add StructuralMetadataPropertyTypeTraits
May 15, 2023
cf7c8bd
Use partial specialization to reduce code duplication.
kring May 16, 2023
cd9c32b
More partial specialization.
kring May 16, 2023
90377e8
Fix formatting and move pragma
May 16, 2023
da53553
Fix formatting and minor changes
May 16, 2023
671033c
Add StructuralMetadataPropertyView
May 16, 2023
72fe4a9
Fix test failures on GCC9.
kring May 16, 2023
dccb99e
Formatting.
kring May 16, 2023
244e11f
Merge remote-tracking branch 'origin/new-metadata-property-types' int…
kring May 16, 2023
25a3320
Add missing file
May 16, 2023
2b46d14
Merge remote-tracking branch 'origin/new-metadata-property-types' int…
kring May 16, 2023
c0c8e3a
Formatting.
kring May 16, 2023
071be8b
Merge pull request #642 from CesiumGS/specialize-traits
j9liu May 17, 2023
5018b91
Merge branch 'new-metadata-property-types' into new-metadata-property…
May 17, 2023
e130536
Add tests for new property view
May 17, 2023
2228f75
Rename enums and fix documentation
May 17, 2023
f52e1ba
Fix incorrect variable names
May 17, 2023
9f7b66c
Fix enum names
May 17, 2023
df65ade
Merge pull request #640 from CesiumGS/new-metadata-property-types
kring May 18, 2023
5136ade
Merge pull request #643 from CesiumGS/new-metadata-property-view
kring May 18, 2023
5e999de
Add StructuralMetadataPropertyTableView
May 18, 2023
2b8e534
Add tests for StructuralMetadataPropertyTableView
May 19, 2023
352d0d2
Try to fix compile errors
May 19, 2023
d7f58da
Rewrite how vecN / matN are handled
May 22, 2023
efb95c5
Verify that callbacks work with unit tests
May 22, 2023
3dd83ab
Add callback tests
May 22, 2023
64b8378
Add tests for callback on array property
May 22, 2023
5513169
Remove unused variables
May 22, 2023
7e08ead
Remove final unused variable
May 23, 2023
b8b3ede
Code cleanup
May 23, 2023
1cce7f8
Use references instead of pointers, add missing doc links
May 24, 2023
d9e234a
Refactor error handling in MetadataPropertyTableView
May 24, 2023
bae4548
Add tests
May 24, 2023
7f2ea49
Minor whitespace nitpicks
May 24, 2023
8ad3f06
Convert batch table to EXT_structural_metadata instead
May 24, 2023
c6240e7
Merge pull request #648 from CesiumGS/metadata-property-table
kring May 25, 2023
219da88
Use pointers in MetadataPropertyTableView
May 25, 2023
d8658e0
Rewrite tests for EXT_structural_metadata
May 25, 2023
dec58d6
Rewrite names / comments for EXT_structural_metadata
May 25, 2023
d7f9c98
Initial self-review
May 25, 2023
f2bee85
Try to resolve CI errors
May 25, 2023
b5fb730
Fold helper functions into findCompatibleTypes, fix formatting
May 25, 2023
997f15c
Merge pull request #655 from CesiumGS/use-structural-metadata
kring May 30, 2023
619faea
Add PropertyTextureView and rename PropertyTable classes
May 30, 2023
44b829a
Add PropertyTextureProperty tests, fix formatting
j9liu May 30, 2023
db0f173
Fix formatting
j9liu May 31, 2023
60a528a
Last formatting fix
j9liu May 31, 2023
26b7650
Merge branch 'main' into upgrade-feature-metadata
j9liu Jun 1, 2023
e51e23d
Merge branch 'upgrade-feature-metadata' into property-textures
j9liu Jun 1, 2023
4644086
Create feature ID texture views for EXT_mesh_features
j9liu Jun 2, 2023
7e0cd8a
Add tests for feature ID texture view
j9liu Jun 2, 2023
d9f330c
Fix formatting and wrong file names
j9liu Jun 2, 2023
2744abd
Fix CI errors
j9liu Jun 5, 2023
bf8033d
Fix last CI error
j9liu Jun 5, 2023
9a8a2d3
Merge pull request #662 from CesiumGS/feature-texture-view
j9liu Jun 5, 2023
f255f82
Merge pull request #656 from CesiumGS/property-textures
kring Jun 6, 2023
a50093c
Rename files and take classes out of separate namespaces
j9liu Jun 6, 2023
bc67ba8
Fix other files
j9liu Jun 6, 2023
c34b321
Add changelog and delete unused files
j9liu Jun 6, 2023
a743bb8
Small changes to BatchTableToGltfStructuralMetadata
j9liu Jun 6, 2023
3e6e9ce
Fix formatting
j9liu Jun 6, 2023
2c6e25d
Merge branch 'main' into upgrade-feature-metadata
j9liu Jun 15, 2023
18a1ad9
Merge pull request #658 from CesiumGS/replace-feature-metadata-files
j9liu Jun 16, 2023
b25ad79
Start reworking property texture view
j9liu Jun 16, 2023
3726935
Merge branch 'upgrade-feature-metadata' of github.com:CesiumGS/cesium…
j9liu Jun 16, 2023
2a29791
Update upsampleGltfForRasterOverlays for EXT_structural_metadata
j9liu Jun 16, 2023
e0f4932
Prefix EXT_feature_metadata files, rename EXT_mesh_features files
j9liu Jun 16, 2023
1662889
Merge pull request #667 from CesiumGS/update-upsample-gltf
j9liu Jun 16, 2023
f82528c
Formatting, changelog entry, cleanup
j9liu Jun 16, 2023
55ed63a
Regenerate EXT_structural_metadata classes without prefix
j9liu Jun 16, 2023
c329a8d
Replace class names in metadata implementation files
j9liu Jun 16, 2023
0b8aecf
Update changelog
j9liu Jun 16, 2023
037a718
Formatting
j9liu Jun 16, 2023
a333b04
Merge branch 'rename-mesh-features-files' into rename-structural-meta…
j9liu Jun 16, 2023
6b6208b
Merge pull request #668 from CesiumGS/rename-mesh-features-files
joseph-kaile Jun 16, 2023
ffc1ca8
Use helper function in PropertyTableView tests
j9liu Jun 16, 2023
5954989
Formatting
j9liu Jun 16, 2023
1694a9a
Fix typo
j9liu Jun 20, 2023
2fe23b2
Merge pull request #669 from CesiumGS/rename-structural-metadata-files
joseph-kaile Jun 20, 2023
73ea6a1
Merge branch 'upgrade-feature-metadata' into fix-property-texture-view
j9liu Jun 20, 2023
76d5d26
Rework PropertyTexturePropertyView, begin reworking PropertyTextureView
j9liu Jun 23, 2023
8155617
Add tests for templated getPropertyView
j9liu Jun 29, 2023
f3ecde1
Add callbacks and tests
j9liu Jun 29, 2023
bb1dea3
Consolidate CI fixes
j9liu Jul 3, 2023
b024fe5
Stricter reinforcement of unsupported properties
j9liu Jul 3, 2023
047422b
Fix nearest sampling for feature ID textures
j9liu Jul 5, 2023
dff2105
Add assert in status constructor for PropertyTexturePropertyView
j9liu Jul 5, 2023
b726f30
Merge pull request #678 from CesiumGS/fix-property-texture-view
kring Jul 7, 2023
ecd215b
Merge branch 'main' into upgrade-feature-metadata
j9liu Aug 10, 2023
6dcadfe
Create PropertyView
j9liu Aug 15, 2023
bfbb694
Add support for vecN
j9liu Aug 16, 2023
ba779b7
Add support for matN values
j9liu Aug 16, 2023
e7743ea
Change status enum to static consts
j9liu Aug 17, 2023
38a5955
Finish unit tests for PropertyView
j9liu Aug 17, 2023
5da1ca3
Add templating for normalization
j9liu Aug 18, 2023
16565a2
Remove unused file
j9liu Aug 18, 2023
43cd1a5
Try to get CI to compile
j9liu Aug 18, 2023
8cde086
Add missing constructor qualifiers
j9liu Aug 18, 2023
bf32406
Start reworking property view for normalization
j9liu Aug 18, 2023
78099d3
Fix PropertyView and unit tests
j9liu Aug 21, 2023
e19cdae
Try to fix CI, add PropertyTransformations
j9liu Aug 21, 2023
734c8cf
Add get vs. getRaw to property view
j9liu Aug 21, 2023
3800169
Fix offset / scale etc. to only work for fixed-length arrays
j9liu Aug 22, 2023
d43d713
Start adding tests for PropertyTablePropertyView
j9liu Aug 22, 2023
bc9dd9e
Add static casts for integer optionals
j9liu Aug 23, 2023
4f37e7a
Try to fix CI errors
j9liu Aug 23, 2023
fc19000
Reinitialize const ints outside of class to avoid errors
j9liu Aug 23, 2023
12d1bbc
Finish PropertyTablePropertyView tests
j9liu Aug 23, 2023
53bc303
Integrate normalization with PropertyTableView
j9liu Aug 24, 2023
a00b819
Finish up PropertyTableView tests
j9liu Aug 24, 2023
7642749
Rewrite property texture property tests
j9liu Aug 24, 2023
ed2bdbd
Update PropertyTextureView
j9liu Aug 25, 2023
d5f6944
Formatting.
kring Aug 25, 2023
3e5d630
First round of cleanup / PR feedback
j9liu Aug 25, 2023
8b29b20
Merge branch 'additional-property-details' of github.com:CesiumGS/ces…
j9liu Aug 25, 2023
2c97ce2
Second unit test / cleanup sweep
j9liu Aug 25, 2023
79eaa3e
Final sweep (hopefully)
j9liu Aug 25, 2023
5b33dd7
Fix signed conversions
j9liu Aug 28, 2023
3633730
Fix sign conversion
j9liu Aug 28, 2023
7f13e1c
Another CI fix
j9liu Aug 28, 2023
f51012e
Fix documentation and test
j9liu Aug 28, 2023
763271a
Add missing const int to source file
j9liu Aug 28, 2023
a8f46ab
Add PropertyAttributeView and PropertyAttributePropertyView
j9liu Aug 28, 2023
85ebd3e
Add unit tests for new classes, reorganize old tests
j9liu Aug 29, 2023
a56f7ed
Move function bodies to cpp
j9liu Aug 29, 2023
b0a49c2
Merge branch 'additional-property-details' into property-attributes
j9liu Aug 29, 2023
7bf2d18
Finish writing tests for PropertyAttributeView
j9liu Aug 29, 2023
7a3a5f0
Update changelog and fix sign conversions
j9liu Aug 29, 2023
c7f01d4
Warn about EXT_feature_metadata
j9liu Aug 30, 2023
09e84e2
Add getters for name, semantic, description
j9liu Aug 30, 2023
bdf630b
Add support for sentinel values in batch tables
j9liu Aug 30, 2023
b13b640
Cleanup, add unit tests
j9liu Aug 31, 2023
36cf067
Final unit test pass
j9liu Aug 31, 2023
af9707f
Add additional PropertyView typedefs
j9liu Sep 1, 2023
74fbef5
Add missing pragma once
j9liu Sep 1, 2023
5dba568
Reorder member variables to avoid initialization warnings
j9liu Sep 1, 2023
0004ba4
PR feedback
j9liu Sep 7, 2023
4395928
Merge branch 'additional-property-details' into property-attributes
j9liu Sep 7, 2023
b7c3dae
Check for all-null properties
j9liu Sep 7, 2023
f3b43c5
Slightly improve safety of sampleNearestPixel.
kring Sep 8, 2023
1b9b54c
Merge pull request #713 from CesiumGS/additional-property-details
kring Sep 8, 2023
ea89861
Merge remote-tracking branch 'origin/upgrade-feature-metadata' into p…
kring Sep 8, 2023
aa984d7
Merge pull request #716 from CesiumGS/property-attributes
kring Sep 8, 2023
710c47e
Merge remote-tracking branch 'origin/upgrade-feature-metadata' into f…
kring Sep 8, 2023
fb409b6
Merge pull request #719 from CesiumGS/final-metadata-changes
kring Sep 8, 2023
3c05ac9
Merge remote-tracking branch 'origin/main' into upgrade-feature-metadata
kring Sep 8, 2023
2002f0d
Add missing generated file.
kring Sep 8, 2023
272f0c9
Formatting.
kring Sep 8, 2023
c7a5c70
Fix case of filename.
kring Sep 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Change Log

### ? - ?

##### Breaking Changes :mega:

- Views of the data contained by `EXT_feature_metadata` will no longer supported by Cesium Native. The extension will still be parsed, but it will log a warning.
- Batch tables will be converted to `EXT_structural_metadata` instead of `EXT_feature_metadata`.
- In `CesiumGltf`, all generated classes related to `EXT_feature_metadata` are now prefixed with `ExtensionExtFeatureMetadata`. For example, `ClassProperty` has become `ExtensionExtFeatureMetadataClassProperty`. This also extends to the glTF reader and writer.
- In `CesiumGltf`, all generated classes related to `EXT_structural_metadata` have had their `ExtensionExtStructuralMetadata` prefix removed. For example, `ExtensionExtStructuralMetadataClassProperty` has become `ClassProperty`. This also extends to the glTF reader and writer.
- In `CesiumGltf`, `ExtensionExtMeshFeaturesFeatureId` and `ExtensionExtMeshFeaturesFeatureIdTexture` have been renamed to `FeatureId` and `FeatureIdTexture` respectively.
- Replaced `FeatureIDTextureView` with `FeatureIdTextureView`, which views a `FeatureIdTexture` in `EXT_mesh_features`. Feature ID textures from `EXT_feature_metadata` are no longer supported.
- Replaced `MetadataFeatureTableView` with `PropertyTableView`, which views a `PropertyTable` in `EXT_structural_metadata`.
- Replaced `MetadataPropertyView` with `PropertyTablePropertyView`, which is a view of a `PropertyTableProperty` in `EXT_structural_metadata`. This takes two template parameters: a typename `T` , and a `bool` indicating whether or not the values are normalized.
- Replaced `MetadataPropertyViewStatus` with `PropertyTablePropertyViewStatus`. `PropertyTablePropertyViewStatus` is a class that inherits from `PropertyViewStatus`, defining additional error codes in the form of `static const` values.
- Replaced `FeatureTextureView` with `PropertyTextureView`, which views a `PropertyTexture` in `EXT_structural_metadata`.
- Replaced `FeatureTexturePropertyView` with `PropertyTexturePropertyView`, which is a view of a `PropertyTextureProperty` in `EXT_structural_metadata`. This takes two template parameters: a typename `T` , and a `bool` indicating whether or not the values are normalized.
- Removed `FeatureTexturePropertyComponentType`, `FeatureTexturePropertyChannelOffsets`, and `FeatureTexturePropertyValue`. `PropertyTextureProperty` retrieves the values with the type indicated by its class property.
- Replaced `FeatureTexturePropertyViewStatus` with `PropertyTexturePropertyViewStatus`. `PropertyTexturePropertyViewStatus` is a class that inherits from `PropertyViewStatus`, defining additional error codes in the form of `static const` values.
- Renamed `FeatureIDTextureViewStatus` to `FeatureIdTextureViewStatus` for consistency.
- Renamed `MetadataArrayView` to `PropertyArrayView`.
- Renamed `FeatureTextureViewStatus` to `PropertyTextureViewStatus`.
- Refactored `PropertyType` to reflect the values of `type` in a `ClassProperty` from `EXT_structural_metadata`.

##### Additions :tada:

- Added `PropertyView`, which acts as a base class for all metadata property views. This takes two template parameters: a type `T` , and a `bool` indicating whether or not the values are normalized.
- Added `PropertyViewStatus`, which defines public `static const` values for various property errors.
- Added `PropertyTableViewStatus` to indicate whether a `PropertyTableView` is valid.
- Added `PropertyComponentType` to reflect the values of `componentType` in a `ClassProperty` from `EXT_structural_metadata`.
- Added `PropertyAttributeView`, which views a `PropertyAttribute` in `EXT_structural_metadata`.
- Added `PropertyAttributePropertyView`, which views a `PropertyAttributeProperty` in `EXT_structural_metadata`.
- Added `PropertyAttributePropertyViewStatus`, which reflects the sattus of a `PropertyAttributePropertyView`.

### v0.27.1 - 2023-09-03

##### Fixes :wrench:
Expand Down
10 changes: 5 additions & 5 deletions Cesium3DTilesSelection/src/B3dmToGltfConverter.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "B3dmToGltfConverter.h"

#include "BatchTableToGltfFeatureMetadata.h"
#include "BatchTableToGltfStructuralMetadata.h"
#include "BinaryToGltfConverter.h"

#include <CesiumGltf/ExtensionCesiumRTC.h>
Expand Down Expand Up @@ -176,7 +176,7 @@ rapidjson::Document parseFeatureTableJsonData(
return document;
}

void convertB3dmMetadataToGltfFeatureMetadata(
void convertB3dmMetadataToGltfStructuralMetadata(
const gsl::span<const std::byte>& b3dmBinary,
const B3dmHeader& header,
uint32_t headerLength,
Expand Down Expand Up @@ -219,8 +219,8 @@ void convertB3dmMetadataToGltfFeatureMetadata(
return;
}

// upgrade batch table to glTF feature metadata and append the result
result.errors.merge(BatchTableToGltfFeatureMetadata::convertFromB3dm(
// upgrade batch table to glTF structural metadata and append the result
result.errors.merge(BatchTableToGltfStructuralMetadata::convertFromB3dm(
featureTableJson,
batchTableJson,
batchTableBinaryData,
Expand All @@ -246,7 +246,7 @@ GltfConverterResult B3dmToGltfConverter::convert(
return result;
}

convertB3dmMetadataToGltfFeatureMetadata(
convertB3dmMetadataToGltfStructuralMetadata(
b3dmBinary,
header,
headerLength,
Expand Down
Loading