Commit Graph

22 Commits

Author SHA1 Message Date
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 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
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 8babc264aa Comments for local glTF classes 2021-02-21 17:27:14 +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 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 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