Kevin Ring
ee5c9f0857
Merge pull request #351 from CesiumGS/gltf-schema-updates
...
Update generated files with newer glTF schema
2021-10-06 12:41:10 +11:00
Sean Lilley
525f8e15be
Support const property in anyOf elements
2021-10-03 14:19:14 -04:00
Kevin Ring
c1b9096abc
Merge remote-tracking branch 'origin/main' into gltf-generator-enum-fixes
2021-10-02 01:10:06 +10:00
Marco Hutter
e42e3ca6db
Use relative paths in auto-generated classes
2021-09-28 17:43:20 +02:00
Sean Lilley
f917c9ee21
Update glTF schema links
2021-09-26 11:38:44 -04:00
Marco Hutter
c2684cb3b8
Initialize the members with the proper defaults.
...
The tests assumed that the enum members are initialized
with "the first" enum value, if no explicit default value
was given. In the schema, the "type" is only specified in
every element of "anyOf" when the type is "integer" (but
not when it is "string"). Not sure who to blame here...
2021-09-26 16:52:04 +02:00
Marco Hutter
8966e91a82
Use struct and constexpr, as per review comment
2021-09-26 14:41:25 +02:00
Marco Hutter
a96ca64203
An attempt to fix the enum typing
2021-09-23 01:31:32 +02:00
Kevin Ring
449068c3d6
Merge pull request #281 from CesiumGS/feature-metadata-extension
...
Upgrade batch table to EXT_feature_metadata extension
2021-07-24 21:32:14 +10:00
Kevin Ring
33b40b6dad
Generate JSON handlers into a single source file.
...
To speed up compilation.
2021-07-06 22:34:18 +10:00
Kevin Ring
30f22898b1
Feature metadata working well for simple case.
2021-05-17 12:30:09 +10:00
Kevin Ring
8f85fd8bbe
WIP conversion of b3dm batch table to EXT_feature_metadata.
2021-05-14 22:28:31 +10:00
Kevin Ring
ed42e46d5f
Add support for EXT_feature_metadata on Primitives.
2021-05-07 16:18:13 +10:00
Kevin Ring
0d6295168f
Use 3d-tiles-next branch of glTF instead of my fork.
2021-05-07 15:40:53 +10:00
Kevin Ring
b29b8c64ad
EXT_feature_metadata progress.
2021-05-07 15:34:16 +10:00
Kevin Ring
527e6051c1
Fix more code gen problems.
2021-05-06 17:30:39 +10:00
Kevin Ring
b8b44c871e
WIP support for EXT_feature_metadata.
2021-05-06 10:42:26 +10:00
Kevin Ring
e5c5408804
More constier.
2021-04-16 13:18:25 +10:00
Kevin Ring
8aab8bbec2
Don't construct so many GltfReaders.
...
Also switch to constexpr char* for extension and type names to avoid
static initializer ordering problems.
2021-04-16 12:52:29 +10:00
Kevin Ring
0c7c949ce8
Remove unused code.
2021-04-15 09:47:33 +10:00
Kevin Ring
45f44fa034
Reader -> GltfReader.
2021-04-15 00:37:37 +10:00
Kevin Ring
fc4f25515f
JSON reader.
2021-04-14 23:31:40 +10:00
Kevin Ring
cb91ccf8a6
JsonReader -> JsonHandler ♻
2021-04-14 18:31:12 +10:00
Kevin Ring
94ea03847c
Move CesiumJsonReader stuff to the right namespace.
2021-04-14 14:22:22 +10:00
Kevin Ring
222692b590
Separate CesiumJsonReader library.
2021-04-13 22:05:36 +10:00
Kevin Ring
cfff453f8c
Rename protected key methods.
2021-04-08 22:34:12 +10:00
Kevin Ring
2ab38cd0fb
Don't qualify reader methods in extensions.
2021-04-08 22:26:22 +10:00
Kevin Ring
b2d278972a
Use ExtensionName, cause it might be different from the type name.
2021-04-08 21:18:02 +10:00
Kevin Ring
e3148aedc6
Reactivate Draco extension.
2021-04-08 14:44:39 +10:00
Kevin Ring
f33f7b1dd5
Make CesiumGltf::Reader a proper class, mange its own extensions.
2021-04-07 23:41:37 +10:00
Kevin Ring
3566ba5b29
Clean up JsonReader function signatures.
2021-04-07 14:35:19 +10:00
Kevin Ring
d6d9de643d
Rename JsonReader methods.
2021-04-06 22:26:16 +10:00
Kevin Ring
987ca69614
Support for external glTF extensions.
2021-04-06 21:49:12 +10:00
Samuel Vargas
49cba1547c
Remove accidentally added fi le
2021-03-11 15:14:50 -05:00
Samuel Vargas
f81dd2c218
Use references to avoid extraneous copies.
2021-03-11 14:40:13 -05:00
Samuel Vargas
f685ceff51
Propagate `ReadModelOptions` to ALL JsonHandlers
...
This commit adds conditional support for propagating the
`ReadModelOptions` variable to the root JsonValue class for all of
its children. CesiumGltfReader was designed with the philosophy that
extensions should be well defined and that CesiumGltfReader should
take responsbility for decoding extensions. This is a fine idea, but we've
ran into a usecase where we need CesiumGltfReader to support decoding
new / developing / unknown / WIP extensions.
This commit adds the `deserializeExtensionsAsJsonValue` bool to ReadModelOptions
and for each ***JsonHandler, forwards it to the root via super() constructor invocations.
This opens the door for other "while serializing" options to be stored in
ReadModelOptions
The deserializeExtensionsAsJsonValue variable itself instructs CesiumGltfReader
to add any extensions it encounters in the Gltf string as a `JsonValue::Object` inside
the std::vector<std::any>, so that users of the libraries can retrieve it and do their
own casting.
2021-03-11 14:30:11 -05:00
Marco Hutter
60b6a4651e
Initialize member of handlers
2021-03-03 18:08:04 +01:00
Marco Hutter
8babc264aa
Comments for local glTF classes
2021-02-21 17:27:14 +01:00
Marco Hutter
0b9b02e690
Merge remote-tracking branch 'origin/gltf-from-online-schema' into gltf-from-online-schema
2021-02-03 02:21:41 +01:00
Kevin Ring
474a2b8120
Bring over generator changes from the cmpt branch.
2021-01-28 10:20:22 +11:00
Marco Hutter
3ba75ae429
Download schema from GitHub
...
Or use the files, both can make sense...
2021-01-26 18:53:10 +01:00
Kevin Ring
c36a2710c3
Allow for augmentation of generated classes via inheritance.
2021-01-18 22:51:20 +11:00
Kevin Ring
11ea3103b0
Optional properties, thorough initialization.
2021-01-17 00:18:00 +11:00
Kevin Ring
cb297c4db6
More defaults.
2021-01-13 17:47:08 +11:00
Kevin Ring
082087551e
Default glTF IDs to -1.
2021-01-13 17:16:06 +11:00
Kevin Ring
2b2c4a8b16
Add support for extensions, especially Draco.
2021-01-11 18:05:02 +11:00
Kevin Ring
08d173d573
Use CesiumGltf instead of tinygltf.
2021-01-08 14:09:08 +11:00
Kevin Ring
3f6e301acf
GLB support.
2021-01-07 22:17:55 +11:00
Kevin Ring
bd0290bec8
Generated doc improvements.
2021-01-07 13:54:25 +11:00
Kevin Ring
32dca3f5d8
Improved error reporting.
2021-01-06 20:56:53 +11:00
Kevin Ring
87a030abe3
Generated classes now compiling.
2021-01-06 11:57:32 +11:00
Kevin Ring
a26418ddea
Fix some code generation problems.
2021-01-06 00:10:04 +11:00
Kevin Ring
33db3a2d4b
Generate enum readers.
2021-01-05 23:51:54 +11:00
Kevin Ring
bd1a51cc17
Generate reader implementations.
2021-01-05 23:16:37 +11:00
Kevin Ring
d206b096a0
Generate reader header files.
2021-01-05 23:03:48 +11:00
Kevin Ring
b27f43b057
Include doc in generated classes.
2021-01-05 21:46:21 +11:00
Kevin Ring
232b87c84f
Generate glTF classes from JSON Schema.
2021-01-05 21:21:15 +11:00