Commit Graph

784 Commits

Author SHA1 Message Date
Kevin Ring 8762721d03 Regenerated glTF classes and re-run the formatter.
The only changes are to incorrectly-wrapped comments, now that comments
no longer get incorrectly wrapped.
2021-05-05 16:38:35 +10:00
Marco Hutter 51e43bbd49 Comment fixes for clang formatting 2021-04-29 17:06:34 +02:00
Kevin Ring acd13e2992
Merge pull request #219 from CesiumGS/gltf-writer-tech-debt
Address technical debt in CesiumGltfWriter
2021-04-22 10:27:21 +10:00
Samuel Vargas 00870929ee
Remove extraneous CESIUM_NATIVE_GSL_INCLUDE_DIR from CMakeLists.txt 2021-04-21 16:03:36 -04:00
Kevin Ring 10b0f92a64 Use std::as_const instead of const_cast. 2021-04-20 21:00:36 +10:00
Kevin Ring 3df9f5ef32 Fix test failure. 2021-04-19 10:35:21 +10:00
Kevin Ring 999c382cc1 Merge remote-tracking branch 'origin/main' into gltf-extensions 2021-04-16 16:07:23 +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
Samuel Vargas 8070d85023
Merge remote-tracking branch 'origin/main' into gltf-writer 2021-04-15 13:49:04 -04:00
Kevin Ring 02e3be9b03 Merge remote-tracking branch 'origin/main' into gltf-extensions 2021-04-15 21:54:03 +10:00
Kevin Ring 940d8fc8f2 Merge remote-tracking branch 'origin/main' into gltf-extensions 2021-04-15 09:58:01 +10:00
Kevin Ring 94ea03847c Move CesiumJsonReader stuff to the right namespace. 2021-04-14 14:22:22 +10:00
Kevin Ring 88795c0045 Move JsonValue to CesiumUtility. 2021-04-13 23:24:53 +10:00
Jordi Torres 6333b1cb0a First pass of clang tidy
Mainly caching else after return, not using empty() instead of size() == 0, missing const references to avoid copies and removing redundant initializations
2021-04-12 13:22:03 +02:00
Kevin Ring b2d278972a Use ExtensionName, cause it might be different from the type name. 2021-04-08 21:18:02 +10:00
Samuel Vargas dbd975f6d7
Run clang-format on `JsonValue.h` 2021-04-06 14:28:45 -04:00
Samuel Vargas b2ba45f5c1
Add comment explaining std::enable_if 2021-04-06 13:41:56 -04:00
Samuel Vargas b03dac82af
Add trailing newline to misc files [ skip ci ] 2021-04-06 13:07:48 -04:00
Kevin Ring 987ca69614 Support for external glTF extensions. 2021-04-06 21:49:12 +10:00
Kevin Ring 0884fdba27 Don't always report zero-length images as errors. 2021-04-02 12:10:30 +11: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
Shehzan Mohammed 8a2957d32f Run clang format 2021-03-08 20:39:46 -05:00
Samuel Vargas 506f76c34b
Use std::byte for image.cesium.pixelData 2021-03-05 10:04:10 -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 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 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
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
Marco Hutter 10efc9e894 Fixed the expected CLang error 2021-03-04 17:36:27 +01:00
Marco Hutter f1078aeb4c Use bytes for raw data 2021-03-04 17:22:38 +01:00
Shehzan Mohammed 3faff010d7 Installing thirdparty deps working on linux 2021-03-03 20:47:31 -05:00
Kevin Ring 34bbd2aa31 WIP cmake install. 2021-03-04 09:48:09 +11:00
Samuel Vargas 5d03477551
Rearchitecture cesium-native's CMake structure
This is necessary to support using cesium-native as submodule in
in asset-pipeline

- `draco` and `sqlite3` are guarded with if target blocks to allow
  asset-pipeline to provide their own version of the targets.
- Tests are now a dedicated target that clients don't have to build
- Test sources / headers are now a target property instead of using the $<BUILD_INTERFACE... hack
- Added common include variables in extern/CMakeLists.txt
- Defined `RAPIDJSON_HAS_CXX11_RVALUE_REFS` for move support for RapidJson
- Private include directories are automatically extracted via CMake magic
  for use in catch tests
- Globbing is now wrapped in a dedicated function that allows one to use
  CONFIGURE_DEPENDS depending on their preferences (defaults to OFF)
  to retain the old behavior.
2021-03-02 14:28:04 -05:00
Kevin Ring a21fd37719 And yet more clang warning fixes. 2021-02-26 17:25:11 +11:00
Kevin Ring 1e2ceaf2bf Another clang error. 2021-02-26 17:17:44 +11:00
Kevin Ring b1f5cf949a Better fix for clang warning. 2021-02-26 17:11:53 +11:00
Kevin Ring 126cea4b76 Fix clang warning. 2021-02-26 17:10:31 +11:00
Kevin Ring a69628b785 Merge remote-tracking branch 'origin/master' into ion-ui 2021-02-24 12:59:44 +11:00
Marco Hutter 613245fe80 Tabs to spaces...
... not consistent globally, but locally, at least.
2021-02-21 17:32:47 +01:00
Marco Hutter 8babc264aa Comments for local glTF classes 2021-02-21 17:27:14 +01:00
Marco Hutter ce41c77d6a Added missing documentation for glTF classes
Even though many of the comments are trivial, the
documentation now is no longer empty...
2021-02-16 01:06:59 +01:00
Kevin Ring d10bd2a16d Move JsonHelps to CesiumUtility, at ion "me" service. 2021-02-09 22:50:18 +11:00
Kevin Ring 13ce898f6f Fix copy/paste fail. 2021-02-02 11:47:13 +11:00
Kevin Ring 8bc5d73959 Fix gcc/clang build errors. 2021-01-29 13:34:48 +11:00
Kevin Ring 358e2a5b2d Remove AccessorView, replace with an AccessorView helper. 2021-01-25 23:56:38 +11:00
Kevin Ring 05d626285b Add AccessorVisitor.
I'm not quite convinced this is the right approach yet.
2021-01-25 22:43:34 +11:00
Kevin Ring dccfcf0a23 More picky clang signedness warnings. 2021-01-25 14:53:28 +11:00
Kevin Ring f11089f5c9 Fix warnings. 2021-01-25 14:43:46 +11:00
Kevin Ring 28b64347b7 Incorporate changes from review and from the cmpt branch. 2021-01-25 12:17:13 +11:00
Kevin Ring 8d0b1f9210 Move and rename test. 2021-01-20 19:55:34 +11:00
Kevin Ring 8fdc7518b9 Fix Clang problems. 2021-01-20 17:25:00 +11:00
Kevin Ring 5b1550da39 Remove another "default". 2021-01-20 15:28:01 +11:00
Kevin Ring 168798fe4a Don't use a C++ reserved word as a parameter name. 2021-01-20 15:19:42 +11:00
Kevin Ring 614b59db21 Remove GltfAccessor and GltfWriter. 2021-01-20 00:15:57 +11:00
Kevin Ring 3bd988f0e4 Remove Helpers entirely. 2021-01-18 23:22:12 +11: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 6d9e83447b Merge remote-tracking branch 'origin/master' into gltf 2021-01-14 23:46:26 +11:00
Kevin Ring edb8fe209b Add extras, reactivate support for RTC_CENTER. 2021-01-14 17:44:19 +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 c999c7628b Load embedded images. 2021-01-12 21:57:42 +11:00
Kevin Ring 6a6d2d94de Draco loading. 2021-01-12 21:40:35 +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 c153c4c0bb Fix test failure. 2021-01-06 22:44:42 +11:00
Kevin Ring 32dca3f5d8 Improved error reporting. 2021-01-06 20:56:53 +11:00
Kevin Ring 068df1c3ef Improve error handling. 2021-01-06 13:00:54 +11:00
Kevin Ring 87a030abe3 Generated classes now compiling. 2021-01-06 11:57:32 +11:00
Kevin Ring e49e6552a9 Deserialize materials. 2021-01-04 23:26:47 +11:00
Kevin Ring 1504ed3d90 Add materials. 2021-01-04 22:54:54 +11:00
Kevin Ring a67ed6a6ca Add support for primitive targets. 2021-01-04 22:32:35 +11:00
Kevin Ring e4a69c6559 Support attributes, names. 2021-01-04 22:21:54 +11:00
Kevin Ring ae16a4888f Separate files for glTF reader PoC. 2021-01-04 17:41:37 +11:00
Kevin Ring 0d7d7d0414 Add Mesh and Primitve to POC. 2021-01-04 13:36:34 +11:00
Kevin Ring a72c111c0f Another experiment. 2021-01-03 00:15:47 +11:00
Kevin Ring c29069f613 Some very broken experiments. 2021-01-02 22:23:04 +11:00
Kevin Ring 767b5d3a6d WIP glTF 2020-12-27 23:11:01 +11:00
Kevin Ring 72b07bc8d2 WIP glTF wrapper 2020-12-23 21:23:53 +11:00
Kevin Ring 6cb6cddac0 Add simdjson. 2020-12-19 22:26:09 +11:00
Kevin Ring 7a0f1907af WIP transition to cgltf. 2020-12-08 14:02:09 +11:00