Marco Hutter
51e43bbd49
Comment fixes for clang formatting
2021-04-29 17:06:34 +02:00
Kevin Ring
33951541b7
magic_enum via cmake, tiny optimization, some cleanup.
2021-04-22 10:15:24 +10:00
Samuel Vargas
091b4a3232
Improve error messages for Animation / Buffer / Image writer
...
Primarily fixes spacing issues, we also write the index of the
image in the images array that triggered the error now.
2021-04-21 16:20:47 -04:00
Samuel Vargas
03f4694420
Remove extraneous iostream input
2021-04-21 16:06:25 -04:00
Samuel Vargas
33db5cc76e
Fix @link doxygen command that clang-format busted
2021-04-21 15:46:22 -04:00
Samuel Vargas
91c7b7f663
Rewrite encodeAsBase64String to avoid extra copy
...
Also add additional unittests for the class.
2021-04-21 15:18:42 -04:00
Samuel Vargas
10dfa6823c
Replace thrown exceptions with `WriteModelResult`
...
The API should now mimic the reading api, where errors encountered
during the serialization process don't cause crashes. The caller receives
two vectors of strings detailing all errors and warnings that were
generated, and the json serialization functions stop gracefully.
2021-04-20 13:58:20 -04:00
Samuel Vargas
6abd456a0b
Replace std::transform + std::back_inserter with reinterpret_cast
2021-04-19 17:25:17 -04:00
Samuel Vargas
29f3f9f07e
Add noexcept back to encodeAsBase64String
2021-04-19 17:18:11 -04:00
Samuel Vargas
dbd8f67402
WriteOptions -> WriteModelOptions
...
Renamed it for better consistency with ReadModelOptions
2021-04-19 17:09:38 -04:00
Samuel Vargas
cb595c1b55
Replace base64_encode.hpp with modp_b64
2021-04-19 16:57:03 -04:00
Samuel Vargas
37f826ead7
Log to stderr on non standard animation channel count.
...
We can change this logging to be configurable later, or use spdlog
2021-04-19 16:54:44 -04:00
Samuel Vargas
2fbc6f4e1a
Improve doxygen for callback function, fix wrapping
2021-04-19 15:37:30 -04:00
Samuel Vargas
ca6c119632
Swap \link syntax with {@link}
2021-04-19 15:25:58 -04:00
Samuel Vargas
3412704062
Replace bitmask options with dedicated struct
2021-04-19 14:28:43 -04:00
Kevin Ring
bc3a1951c7
Add another missing include.
2021-04-17 18:57:57 +10:00
Kevin Ring
52eaf76af1
Add missing includes.
2021-04-17 00:23:20 +10:00
Kevin Ring
d64d3bf882
Add missing include.
2021-04-16 23:37:20 +10:00
Kevin Ring
6c0a55c090
Fix formatting.
2021-04-16 16:23:08 +10:00
Kevin Ring
999c382cc1
Merge remote-tracking branch 'origin/main' into gltf-extensions
2021-04-16 16:07:23 +10:00
Samuel Vargas
b03dac82af
Add trailing newline to misc files [ skip ci ]
2021-04-06 13:07:48 -04:00
Samuel Vargas
94c77dd89e
Merge tag 'post-clang-format' into gltf-writer-clang-format
...
The commit that ran clang-format on the entire codebase and made no other changes.
2021-03-09 16:36:39 -05:00
Samuel Vargas
a65dac301b
Implement basic triangle serialization test
2021-03-05 14:29:48 -05:00
Samuel Vargas
0d803ba646
Add detailed doxygen for the serialization functions [ skip ci ]
2021-03-05 13:18:27 -05:00
Samuel Vargas
7de726a364
Add trailing newlines [skip ci]
2021-03-05 11:38:53 -05:00
Samuel Vargas
6babc551a0
Replace std::uint8_t with std::byte for data containers
2021-03-05 10:16:12 -05:00
Samuel Vargas
477576d1a6
Fix extras writing for other glTF objects
...
They need a object created on their behalf.
2021-03-05 07:41:23 -05:00
Samuel Vargas
510f5a6d8c
Add missing camera orthographic extensions serialzier
2021-03-05 07:41:23 -05:00
Samuel Vargas
53801b27e7
Only serialize JsonValue::Objects as extensions
2021-03-05 07:41:23 -05:00
Samuel Vargas
fefc4c3b8f
Update ImageWriter to work like BufferWriter
...
- Now supports writing images to the user lambda
- Now supports auto converting pixelData to base64
2021-03-05 07:41:22 -05:00
Samuel Vargas
e0463a54dc
Update base64 include path, update comment
2021-03-05 07:41:22 -05:00
Samuel Vargas
37b0d11c1a
Move Base64 encoding to dedicated .cpp
2021-03-05 07:41:21 -05:00
Samuel Vargas
5e55a3a7f3
Remove extraneous space in WriteFlags.h
2021-03-05 07:41:21 -05:00
Samuel Vargas
1000fe2e15
Throw exception if GLB or GLTF not passed to writeModel
2021-03-05 07:41:21 -05:00
Samuel Vargas
98480a4c02
Increase BufferWriter coverage to 100%
2021-03-05 07:41:20 -05:00
Samuel Vargas
adc0317b60
Add toString() / toStringView() methods for CesiumGltf::JsonWriter
2021-03-05 07:41:20 -05:00
Samuel Vargas
6601266f7d
Add mutual exclusion test
2021-03-05 07:41:19 -05:00
Samuel Vargas
7337177771
Add test for root array / single primitive value
2021-03-05 07:41:19 -05:00
Samuel Vargas
080a4bdd85
Remove FindMinMax / PrimitiveVectorToLittleEndian
2021-03-05 07:41:19 -05:00
Samuel Vargas
865388c0dc
Add additional smoketests for glTF / GLB generation
2021-03-05 07:41:18 -05:00
Samuel Vargas
d636270d37
Rename GLTF_VERSION to GLB_CONTAINER_VERSION
2021-03-05 07:41:18 -05:00
Samuel Vargas
7bfb800ab9
Rework the Writer / BufferWriter API
...
- Removed unused EmbedImages / EmbedBuffers / ExternalBuffers parameters
- Split the writing function into two separate functions.
2021-03-05 07:41:17 -05:00
Samuel Vargas
f643405726
Add CesiumGltfWriter
2021-03-05 07:41:16 -05:00