Commit Graph

1325 Commits

Author SHA1 Message Date
Shehzan Mohammed d9172461e2
Merge pull request #158 from CesiumGS/fix-headers
Fix missing header files
2021-03-08 20:39:17 -05:00
Shehzan Mohammed ef8bf72710 Fix missing header files 2021-03-08 20:30:50 -05:00
Marco Hutter c721f01541 Finally, no more sstream 2021-03-08 14:59:33 +01:00
Kevin Ring ebb6ac226c
Merge pull request #156 from CesiumGS/crash
Prevent crash when shutting down and changing imagery
2021-03-08 21:22:49 +11:00
Kevin Ring 0631cb4c99 Merge remote-tracking branch 'origin/master' into crash 2021-03-08 21:14:23 +11:00
Kevin Ring b7de888c32
Merge pull request #157 from CesiumGS/connection-token
Add methods to get the parameters used to construct a CesiumIonClient::Connection
2021-03-08 19:19:18 +11:00
Kevin Ring d20f89c421 Add methods to get other Connection params too. 2021-03-08 19:02:25 +11:00
Kevin Ring ab4efdf555 Add method to get the access token from a Connection. 2021-03-08 18:59:53 +11:00
unknown 26b62c68a4 prevent crash when changing imagery 2021-03-07 17:34:14 -05:00
Marco Hutter 8ae345dc30 Merge remote-tracking branch 'origin/master' into handle-images-404 2021-03-07 19:48:52 +01:00
Marco Hutter b4564edb00 Handle the case that images are 404 2021-03-07 19:47:20 +01:00
Kevin Ring 094e7059bd
Merge pull request #154 from CesiumGS/install-2
Add debug postfixes to libs
2021-03-07 16:52:30 +11:00
Shehzan Mohammed c61e2185b0 Add debug postfixes to libs 2021-03-06 11:59:47 -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 30057e9539
Fix casting warning in Reader.cpp 2021-03-05 10:40:12 -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 506f76c34b
Use std::byte for image.cesium.pixelData 2021-03-05 10:04:10 -05:00
Samuel Vargas a582c7c32f
Remove unused exception variable to prevent MSVC from screaming 2021-03-05 09:59:31 -05:00
Samuel Vargas 5599075907
Remove 'o' typo from CMakeLists.txt 2021-03-05 07:46:08 -05:00
Samuel Vargas e5f90d3b16
Add GSL_INCLUDE_DIR to target_include_directories
This is necessary to link against CesiumGltf as we use
gsl/narrow in JsonValue.h
2021-03-05 07:41:24 -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 7c19d7d828
Add unittests for JsonValue 2021-03-05 07:41:17 -05:00
Samuel Vargas f1076ea0ee
Rename getNumberOrDefault to getSafeNumberOrDefault 2021-03-05 07:41:17 -05:00
Samuel Vargas 5ee7b03529
Add a custom target for generating code coverage 2021-03-05 07:41:16 -05:00
Samuel Vargas f643405726
Add CesiumGltfWriter 2021-03-05 07:41:16 -05:00
Samuel Vargas c4f6025420
Add integer support to JsonValue
This also fixes a narrowing conversion bug. Previously if
a type that was larger than 2^53 was stored in a JsonValue
it would be silently casted into a double, causing an unexpected
precision loss. This changes JsonValue to use the largest signed,
unsigned, or floating point value available to support both types
of Numbers.

Also updates GSL version because they added a narrowing cast
function and we use that for safe type casting.
2021-03-05 07:41:15 -05:00
Samuel Vargas 33bdceca64
Add base64_encode and magic_enum
These libraries are needed for CesiumGltfWriter, the writer can automatically
convert binary data to base64 on behalf of the user. Magic enum is used
to automatically convert `CesiumGltf` enums to their string constants
without having to write a dedicated enum to string method.
2021-03-05 07:41:15 -05:00
Kevin Ring 589a0098fc
Merge pull request #145 from CesiumGS/install
Add ability to CMake install cesium-native
2021-03-05 16:03:29 +11:00
Kevin Ring 00dde7cd9c
Merge pull request #148 from CesiumGS/use-std-byte
Use bytes for raw data
2021-03-05 14:57:30 +11:00
Kevin Ring 3e45ddf3f2
Merge pull request #144 from CesiumGS/initialize-gltf-handler-members
Initialize member of handlers
2021-03-05 14:53:52 +11:00
Kevin Ring 5d991f9ebc
Merge pull request #143 from CesiumGS/add-license
Add license.
2021-03-05 14:52:31 +11:00
Shehzan Mohammed 24be81bc43
Merge pull request #151 from CesiumGS/install-with-exclude 2021-03-04 22:47:25 -05:00
Kevin Ring 68d711e1de Mark some libs private, remove commented-out code. 2021-03-05 14:21:55 +11:00