From f2ee13ccda8c768fddc68f5208b7dcfa54c07242 Mon Sep 17 00:00:00 2001 From: seungho Date: Thu, 14 Jul 2022 12:51:50 +0900 Subject: [PATCH] Change dali-scene-loader to dali-scene3d Change-Id: Iffdf883fafc2b272326265e0a4b4b121fde7a9cb Signed-off-by: seungho --- .gitignore | 4 +- README.md | 6 +- automated-tests/patch-coverage.pl | 2 +- .../CMakeLists.txt | 6 +- .../tct-dali-scene3d-internal-core.cpp} | 2 +- .../utc-Dali-Gltf2Asset.cpp | 4 +- .../utc-Dali-Hash.cpp | 4 +- .../utc-Dali-JsonReader.cpp | 2 +- .../utc-Dali-JsonUtil.cpp | 4 +- .../CMakeLists.txt | 6 +- .../tct-dali-scene3d-core.cpp} | 2 +- .../utc-Dali-AlphaFunctionHelper.cpp | 4 +- .../utc-Dali-AnimatedProperty.cpp | 4 +- .../utc-Dali-AnimationDefinition.cpp | 4 +- .../utc-Dali-CameraParameters.cpp | 4 +- .../utc-Dali-CubeLoader.cpp | 4 +- .../utc-Dali-CubeMapLoader.cpp | 4 +- .../utc-Dali-DliLoader.cpp | 12 +-- .../utc-Dali-EnvironmentDefinition.cpp | 4 +- .../utc-Dali-FacialAnimation.cpp | 6 +- .../utc-Dali-Gltf2Loader.cpp | 12 +-- .../utc-Dali-KtxLoader.cpp | 4 +- .../utc-Dali-MatrixStack.cpp | 4 +- .../utc-Dali-MeshDefinition.cpp | 6 +- .../utc-Dali-ModelView.cpp | 2 +- .../utc-Dali-NodeDefinition.cpp | 6 +- .../utc-Dali-RendererState.cpp | 10 +-- .../utc-Dali-ResourceBundle.cpp | 6 +- .../utc-Dali-SceneDefinition.cpp | 6 +- .../utc-Dali-ShaderDefinition.cpp | 4 +- .../utc-Dali-ShaderDefinitionFactory.cpp | 10 +-- .../utc-Dali-StringCallback.cpp | 6 +- .../utc-Dali-Utils.cpp | 4 +- .../utc-Dali-ViewProjection.cpp | 4 +- build/tizen/.gitignore | 2 +- build/tizen/CMakeLists.txt | 14 ++-- .../CMakeLists.txt | 34 ++++----- .../{dali-scene-loader => dali-scene3d}/build.sh | 0 .../dali2-scene3d.pc.in} | 8 +- build/tizen/docs-internal/dali-internal.doxy.in | 2 +- build/tizen/docs/dali.doxy.in | 4 +- dali-scene-loader/internal/file.list | 9 --- dali-scene-loader/public-api/file.list | 33 -------- ...-scene-loader.manifest => dali-scene3d.manifest | 0 ...r.manifest-smack => dali-scene3d.manifest-smack | 0 {dali-scene-loader => dali-scene3d}/README.md | 4 +- .../controls/model-view/model-view-impl.cpp | 88 +++++++++++----------- .../internal/controls/model-view/model-view-impl.h | 38 +++++----- dali-scene3d/internal/file.list | 9 +++ .../shaders/default-physically-based-shader.frag | 0 .../shaders/default-physically-based-shader.vert | 0 .../graphics/shaders/scene3d-joint-debug.frag | 0 .../graphics/shaders/scene3d-joint-debug.vert | 0 .../internal/loader}/gltf2-asset.cpp | 4 +- .../internal/loader}/gltf2-asset.h | 14 ++-- .../internal/loader}/hash.cpp | 11 ++- .../internal/loader}/hash.h | 15 ++-- .../internal/loader}/json-reader.cpp | 4 +- .../internal/loader}/json-reader.h | 10 +-- .../internal/loader}/json-util.cpp | 11 ++- .../internal/loader}/json-util.h | 17 +++-- .../public-api/api.h | 18 ++--- .../public-api/controls/model-view/model-view.cpp | 4 +- .../public-api/controls/model-view/model-view.h | 10 +-- dali-scene3d/public-api/file.list | 33 ++++++++ .../public-api/loader}/alpha-function-helper.cpp | 11 ++- .../public-api/loader}/alpha-function-helper.h | 21 +++--- .../public-api/loader}/animated-property.cpp | 11 ++- .../public-api/loader}/animated-property.h | 19 +++-- .../public-api/loader}/animation-definition.cpp | 11 ++- .../public-api/loader}/animation-definition.h | 21 +++--- .../public-api/loader}/blend-shape-details.cpp | 11 ++- .../public-api/loader}/blend-shape-details.h | 19 +++-- .../public-api/loader}/camera-parameters.cpp | 13 ++-- .../public-api/loader}/camera-parameters.h | 23 +++--- .../public-api/loader}/cube-data.cpp | 10 ++- .../public-api/loader}/cube-data.h | 17 +++-- .../public-api/loader}/cube-loader.cpp | 9 ++- .../public-api/loader}/cube-loader.h | 18 +++-- .../public-api/loader}/cube-map-loader.cpp | 18 ++--- .../public-api/loader}/cube-map-loader.h | 18 +++-- .../public-api/loader}/customization.cpp | 11 ++- .../public-api/loader}/customization.h | 23 +++--- .../public-api/loader}/dli-loader.cpp | 33 ++++---- .../public-api/loader}/dli-loader.h | 27 ++++--- .../public-api/loader}/environment-definition.cpp | 13 ++-- .../public-api/loader}/environment-definition.h | 19 +++-- .../public-api/loader}/facial-animation-loader.cpp | 15 ++-- .../public-api/loader}/facial-animation-loader.h | 14 ++-- .../public-api/loader}/gltf2-loader.cpp | 26 ++++--- .../public-api/loader}/gltf2-loader.h | 19 +++-- .../public-api/loader}/index.h | 17 +++-- .../public-api/loader}/ktx-loader.cpp | 11 ++- .../public-api/loader}/ktx-loader.h | 18 +++-- .../public-api/loader}/light-parameters.h | 19 +++-- .../public-api/loader}/load-result.h | 25 +++--- .../public-api/loader}/material-definition.cpp | 9 ++- .../public-api/loader}/material-definition.h | 29 +++---- .../public-api/loader}/matrix-stack.cpp | 13 ++-- .../public-api/loader}/matrix-stack.h | 19 +++-- .../public-api/loader}/mesh-definition.cpp | 11 ++- .../public-api/loader}/mesh-definition.h | 25 +++--- .../public-api/loader}/mesh-geometry.h | 19 +++-- .../public-api/loader}/node-definition.cpp | 17 +++-- .../public-api/loader}/node-definition.h | 41 +++++----- .../public-api/loader}/parse-renderer-state.cpp | 13 ++-- .../public-api/loader}/parse-renderer-state.h | 21 +++--- .../public-api/loader}/renderer-state.cpp | 13 ++-- .../public-api/loader}/renderer-state.h | 29 +++---- .../public-api/loader}/resource-bundle.cpp | 11 ++- .../public-api/loader}/resource-bundle.h | 31 ++++---- .../public-api/loader}/scene-definition.cpp | 23 +++--- .../public-api/loader}/scene-definition.h | 25 +++--- .../loader}/shader-definition-factory.cpp | 17 +++-- .../public-api/loader}/shader-definition-factory.h | 21 +++--- .../public-api/loader}/shader-definition.cpp | 15 ++-- .../public-api/loader}/shader-definition.h | 19 +++-- .../public-api/loader}/skeleton-definition.h | 19 +++-- .../public-api/loader}/skinning-details.cpp | 11 ++- .../public-api/loader}/skinning-details.h | 19 +++-- .../public-api/loader}/string-callback.cpp | 11 ++- .../public-api/loader}/string-callback.h | 19 +++-- .../public-api/loader}/utils.cpp | 11 ++- .../public-api/loader}/utils.h | 45 +++++------ .../public-api/loader}/view-projection.cpp | 13 ++-- .../public-api/loader}/view-projection.h | 17 +++-- .../third-party/.clang-format | 0 .../third-party/json.h | 0 packaging/dali-toolkit.spec | 32 ++++---- 129 files changed, 955 insertions(+), 771 deletions(-) rename automated-tests/src/{dali-scene-loader-internal => dali-scene3d-internal}/CMakeLists.txt (97%) rename automated-tests/src/{dali-scene-loader-internal/tct-dali-scene-loader-internal-core.cpp => dali-scene3d-internal/tct-dali-scene3d-internal-core.cpp} (71%) rename automated-tests/src/{dali-scene-loader-internal => dali-scene3d-internal}/utc-Dali-Gltf2Asset.cpp (98%) rename automated-tests/src/{dali-scene-loader-internal => dali-scene3d-internal}/utc-Dali-Hash.cpp (94%) rename automated-tests/src/{dali-scene-loader-internal => dali-scene3d-internal}/utc-Dali-JsonReader.cpp (97%) rename automated-tests/src/{dali-scene-loader-internal => dali-scene3d-internal}/utc-Dali-JsonUtil.cpp (99%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/CMakeLists.txt (97%) rename automated-tests/src/{dali-scene-loader/tct-dali-scene-loader-core.cpp => dali-scene3d/tct-dali-scene3d-core.cpp} (75%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-AlphaFunctionHelper.cpp (95%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-AnimatedProperty.cpp (93%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-AnimationDefinition.cpp (96%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-CameraParameters.cpp (95%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-CubeLoader.cpp (97%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-CubeMapLoader.cpp (96%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-DliLoader.cpp (98%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-EnvironmentDefinition.cpp (97%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-FacialAnimation.cpp (95%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-Gltf2Loader.cpp (97%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-KtxLoader.cpp (97%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-MatrixStack.cpp (94%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-MeshDefinition.cpp (94%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-ModelView.cpp (99%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-NodeDefinition.cpp (97%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-RendererState.cpp (97%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-ResourceBundle.cpp (93%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-SceneDefinition.cpp (98%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-ShaderDefinition.cpp (93%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-ShaderDefinitionFactory.cpp (97%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-StringCallback.cpp (88%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-Utils.cpp (95%) rename automated-tests/src/{dali-scene-loader => dali-scene3d}/utc-Dali-ViewProjection.cpp (95%) rename build/tizen/{dali-scene-loader => dali-scene3d}/CMakeLists.txt (82%) rename build/tizen/{dali-scene-loader => dali-scene3d}/build.sh (100%) rename build/tizen/{dali-scene-loader/dali2-scene-loader.pc.in => dali-scene3d/dali2-scene3d.pc.in} (51%) delete mode 100644 dali-scene-loader/internal/file.list delete mode 100644 dali-scene-loader/public-api/file.list rename dali-scene-loader.manifest => dali-scene3d.manifest (100%) rename dali-scene-loader.manifest-smack => dali-scene3d.manifest-smack (100%) rename {dali-scene-loader => dali-scene3d}/README.md (99%) rename {dali-scene-loader => dali-scene3d}/internal/controls/model-view/model-view-impl.cpp (78%) rename {dali-scene-loader => dali-scene3d}/internal/controls/model-view/model-view-impl.h (85%) create mode 100644 dali-scene3d/internal/file.list rename {dali-scene-loader => dali-scene3d}/internal/graphics/shaders/default-physically-based-shader.frag (100%) rename {dali-scene-loader => dali-scene3d}/internal/graphics/shaders/default-physically-based-shader.vert (100%) rename dali-scene-loader/internal/graphics/shaders/scene-loader-joint-debug.frag => dali-scene3d/internal/graphics/shaders/scene3d-joint-debug.frag (100%) rename dali-scene-loader/internal/graphics/shaders/scene-loader-joint-debug.vert => dali-scene3d/internal/graphics/shaders/scene3d-joint-debug.vert (100%) rename {dali-scene-loader/internal => dali-scene3d/internal/loader}/gltf2-asset.cpp (97%) rename {dali-scene-loader/internal => dali-scene3d/internal/loader}/gltf2-asset.h (97%) rename {dali-scene-loader/internal => dali-scene3d/internal/loader}/hash.cpp (90%) rename {dali-scene-loader/internal => dali-scene3d/internal/loader}/hash.h (91%) rename {dali-scene-loader/internal => dali-scene3d/internal/loader}/json-reader.cpp (94%) rename {dali-scene-loader/internal => dali-scene3d/internal/loader}/json-reader.h (97%) rename {dali-scene-loader/internal => dali-scene3d/internal/loader}/json-util.cpp (98%) rename {dali-scene-loader/internal => dali-scene3d/internal/loader}/json-util.h (90%) rename {dali-scene-loader => dali-scene3d}/public-api/api.h (61%) rename {dali-scene-loader => dali-scene3d}/public-api/controls/model-view/model-view.cpp (93%) rename {dali-scene-loader => dali-scene3d}/public-api/controls/model-view/model-view.h (96%) create mode 100644 dali-scene3d/public-api/file.list rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/alpha-function-helper.cpp (90%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/alpha-function-helper.h (63%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/animated-property.cpp (85%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/animated-property.h (87%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/animation-definition.cpp (92%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/animation-definition.h (84%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/blend-shape-details.cpp (93%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/blend-shape-details.h (85%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/camera-parameters.cpp (96%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/camera-parameters.h (76%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/cube-data.cpp (91%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/cube-data.h (80%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/cube-loader.cpp (97%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/cube-loader.h (76%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/cube-map-loader.cpp (72%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/cube-map-loader.h (75%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/customization.cpp (92%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/customization.h (86%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/dli-loader.cpp (98%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/dli-loader.h (88%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/environment-definition.cpp (91%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/environment-definition.h (85%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/facial-animation-loader.cpp (93%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/facial-animation-loader.h (67%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/gltf2-loader.cpp (98%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/gltf2-loader.h (69%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/index.h (72%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/ktx-loader.cpp (98%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/ktx-loader.h (76%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/light-parameters.h (71%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/load-result.h (74%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/material-definition.cpp (98%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/material-definition.h (91%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/matrix-stack.cpp (82%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/matrix-stack.h (77%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/mesh-definition.cpp (99%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/mesh-definition.h (93%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/mesh-geometry.h (77%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/node-definition.cpp (96%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/node-definition.h (89%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/parse-renderer-state.cpp (95%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/parse-renderer-state.h (72%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/renderer-state.cpp (93%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/renderer-state.h (86%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/resource-bundle.cpp (95%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/resource-bundle.h (81%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/scene-definition.cpp (98%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/scene-definition.h (95%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/shader-definition-factory.cpp (94%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/shader-definition-factory.h (76%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/shader-definition.cpp (93%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/shader-definition.h (86%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/skeleton-definition.h (78%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/skinning-details.cpp (81%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/skinning-details.h (72%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/string-callback.cpp (79%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/string-callback.h (69%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/utils.cpp (95%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/utils.h (76%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/view-projection.cpp (78%) rename {dali-scene-loader/public-api => dali-scene3d/public-api/loader}/view-projection.h (82%) rename {dali-scene-loader => dali-scene3d}/third-party/.clang-format (100%) rename {dali-scene-loader => dali-scene3d}/third-party/json.h (100%) diff --git a/.gitignore b/.gitignore index 8fef0e8..e4e5fe8 100644 --- a/.gitignore +++ b/.gitignore @@ -50,5 +50,5 @@ core compile_commands.json dali-toolkit/internal/graphics/generated/* dali-toolkit/internal/graphics/builtin-shader-extern-gen.h -dali-scene-loader/internal/graphics/generated/* -dali-scene-loader/internal/graphics/builtin-shader-extern-gen.h +dali-scene3d/internal/graphics/generated/* +dali-scene3d/internal/graphics/builtin-shader-extern-gen.h diff --git a/README.md b/README.md index e4cfdbc..b744509 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ * Build with the Visual Studio project. * Build with CMake. * [4. Building for MacOS](#4-building-for-macos) - * [DALi Scene Loader](#dali-scene-loader) + * [DALi Scene3D](#dali-scene3d) # Build Instructions @@ -131,6 +131,6 @@ To build, run: % make install -j8 ``` -# DALi Scene Loader +# DALi Scene3D -For information about the DALi Scene Loader library, refer to dali-scene-loader/README.md. +For information about the DALi Scene3D library, refer to dali-scene3d/README.md. diff --git a/automated-tests/patch-coverage.pl b/automated-tests/patch-coverage.pl index 1f836a4..2f8bdb4 100755 --- a/automated-tests/patch-coverage.pl +++ b/automated-tests/patch-coverage.pl @@ -985,7 +985,7 @@ sub parse_diff $files{$file}->{"patch"} = [@checklines]; $files{$file}->{"b_lines"} = {%b_lines}; - my %filter = map { $_ => $files{$_} } grep {m!^dali(-toolkit|-scene-loader)?/!} (keys(%files)); + my %filter = map { $_ => $files{$_} } grep {m!^dali(-toolkit|-scene3d)?/!} (keys(%files)); if($pd_debug) { diff --git a/automated-tests/src/dali-scene-loader-internal/CMakeLists.txt b/automated-tests/src/dali-scene3d-internal/CMakeLists.txt similarity index 97% rename from automated-tests/src/dali-scene-loader-internal/CMakeLists.txt rename to automated-tests/src/dali-scene3d-internal/CMakeLists.txt index 0270d3d..4b454c9 100755 --- a/automated-tests/src/dali-scene-loader-internal/CMakeLists.txt +++ b/automated-tests/src/dali-scene3d-internal/CMakeLists.txt @@ -1,9 +1,9 @@ -SET(PKG_NAME "dali-scene-loader-internal") +SET(PKG_NAME "dali-scene3d-internal") SET(EXEC_NAME "tct-${PKG_NAME}-core") SET(RPM_NAME "core-${PKG_NAME}-tests") -SET(CAPI_LIB "dali-scene-loader") +SET(CAPI_LIB "dali-scene3d") # List of test case sources (Only these get parsed for test cases) SET(TC_SOURCES @@ -63,7 +63,7 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED dali2-core dali2-adaptor dali2-toolkit - dali2-scene-loader + dali2-scene3d ) ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror -DDEBUG_ENABLED) diff --git a/automated-tests/src/dali-scene-loader-internal/tct-dali-scene-loader-internal-core.cpp b/automated-tests/src/dali-scene3d-internal/tct-dali-scene3d-internal-core.cpp similarity index 71% rename from automated-tests/src/dali-scene-loader-internal/tct-dali-scene-loader-internal-core.cpp rename to automated-tests/src/dali-scene3d-internal/tct-dali-scene3d-internal-core.cpp index 7bfea6e..c5ed18f 100644 --- a/automated-tests/src/dali-scene-loader-internal/tct-dali-scene-loader-internal-core.cpp +++ b/automated-tests/src/dali-scene3d-internal/tct-dali-scene3d-internal-core.cpp @@ -1,5 +1,5 @@ #include -#include "tct-dali-scene-loader-internal-core.h" +#include "tct-dali-scene3d-internal-core.h" int main(int argc, char * const argv[]) { diff --git a/automated-tests/src/dali-scene-loader-internal/utc-Dali-Gltf2Asset.cpp b/automated-tests/src/dali-scene3d-internal/utc-Dali-Gltf2Asset.cpp similarity index 98% rename from automated-tests/src/dali-scene-loader-internal/utc-Dali-Gltf2Asset.cpp rename to automated-tests/src/dali-scene3d-internal/utc-Dali-Gltf2Asset.cpp index 8574137..9b01631 100644 --- a/automated-tests/src/dali-scene-loader-internal/utc-Dali-Gltf2Asset.cpp +++ b/automated-tests/src/dali-scene3d-internal/utc-Dali-Gltf2Asset.cpp @@ -18,12 +18,12 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/internal/gltf2-asset.h" +#include "dali-scene3d/internal/loader/gltf2-asset.h" #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliGltf2AssetComponentIsUnsigned(void) { diff --git a/automated-tests/src/dali-scene-loader-internal/utc-Dali-Hash.cpp b/automated-tests/src/dali-scene3d-internal/utc-Dali-Hash.cpp similarity index 94% rename from automated-tests/src/dali-scene-loader-internal/utc-Dali-Hash.cpp rename to automated-tests/src/dali-scene3d-internal/utc-Dali-Hash.cpp index efd5053..74aa2c5 100644 --- a/automated-tests/src/dali-scene-loader-internal/utc-Dali-Hash.cpp +++ b/automated-tests/src/dali-scene3d-internal/utc-Dali-Hash.cpp @@ -18,12 +18,12 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/internal/hash.h" +#include "dali-scene3d/internal/loader/hash.h" #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliHash(void) { diff --git a/automated-tests/src/dali-scene-loader-internal/utc-Dali-JsonReader.cpp b/automated-tests/src/dali-scene3d-internal/utc-Dali-JsonReader.cpp similarity index 97% rename from automated-tests/src/dali-scene-loader-internal/utc-Dali-JsonReader.cpp rename to automated-tests/src/dali-scene3d-internal/utc-Dali-JsonReader.cpp index 6b7e000..abeb99c 100644 --- a/automated-tests/src/dali-scene-loader-internal/utc-Dali-JsonReader.cpp +++ b/automated-tests/src/dali-scene3d-internal/utc-Dali-JsonReader.cpp @@ -18,7 +18,7 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/internal/json-reader.h" +#include "dali-scene3d/internal/loader/json-reader.h" #include #include diff --git a/automated-tests/src/dali-scene-loader-internal/utc-Dali-JsonUtil.cpp b/automated-tests/src/dali-scene3d-internal/utc-Dali-JsonUtil.cpp similarity index 99% rename from automated-tests/src/dali-scene-loader-internal/utc-Dali-JsonUtil.cpp rename to automated-tests/src/dali-scene3d-internal/utc-Dali-JsonUtil.cpp index 41ac039..b9f25be 100644 --- a/automated-tests/src/dali-scene-loader-internal/utc-Dali-JsonUtil.cpp +++ b/automated-tests/src/dali-scene3d-internal/utc-Dali-JsonUtil.cpp @@ -18,7 +18,7 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/internal/json-util.h" +#include "dali-scene3d/internal/loader/json-util.h" #include "dali-toolkit/devel-api/builder/json-parser.h" #include #include @@ -27,7 +27,7 @@ using namespace Dali; using namespace Dali::Toolkit; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; namespace { diff --git a/automated-tests/src/dali-scene-loader/CMakeLists.txt b/automated-tests/src/dali-scene3d/CMakeLists.txt similarity index 97% rename from automated-tests/src/dali-scene-loader/CMakeLists.txt rename to automated-tests/src/dali-scene3d/CMakeLists.txt index 1862dfe..030aa8b 100755 --- a/automated-tests/src/dali-scene-loader/CMakeLists.txt +++ b/automated-tests/src/dali-scene3d/CMakeLists.txt @@ -1,9 +1,9 @@ -SET(PKG_NAME "dali-scene-loader") +SET(PKG_NAME "dali-scene3d") SET(EXEC_NAME "tct-${PKG_NAME}-core") SET(RPM_NAME "core-${PKG_NAME}-tests") -SET(CAPI_LIB "dali-scene-loader") +SET(CAPI_LIB "dali-scene3d") # List of test case sources (Only these get parsed for test cases) SET(TC_SOURCES @@ -82,7 +82,7 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED dali2-core dali2-adaptor dali2-toolkit - dali2-scene-loader + dali2-scene3d ) ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror -DDEBUG_ENABLED) diff --git a/automated-tests/src/dali-scene-loader/tct-dali-scene-loader-core.cpp b/automated-tests/src/dali-scene3d/tct-dali-scene3d-core.cpp similarity index 75% rename from automated-tests/src/dali-scene-loader/tct-dali-scene-loader-core.cpp rename to automated-tests/src/dali-scene3d/tct-dali-scene3d-core.cpp index 5b79502..3a43985 100644 --- a/automated-tests/src/dali-scene-loader/tct-dali-scene-loader-core.cpp +++ b/automated-tests/src/dali-scene3d/tct-dali-scene3d-core.cpp @@ -1,5 +1,5 @@ #include -#include "tct-dali-scene-loader-core.h" +#include "tct-dali-scene3d-core.h" int main(int argc, char * const argv[]) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-AlphaFunctionHelper.cpp b/automated-tests/src/dali-scene3d/utc-Dali-AlphaFunctionHelper.cpp similarity index 95% rename from automated-tests/src/dali-scene-loader/utc-Dali-AlphaFunctionHelper.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-AlphaFunctionHelper.cpp index da40b27..53de7d2 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-AlphaFunctionHelper.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-AlphaFunctionHelper.cpp @@ -18,11 +18,11 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/alpha-function-helper.h" +#include "dali-scene3d/public-api/loader/alpha-function-helper.h" #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; #define ALPHA_FN_PAIR(x) { #x, AlphaFunction::x } diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-AnimatedProperty.cpp b/automated-tests/src/dali-scene3d/utc-Dali-AnimatedProperty.cpp similarity index 93% rename from automated-tests/src/dali-scene-loader/utc-Dali-AnimatedProperty.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-AnimatedProperty.cpp index c660a1d..0a59e26 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-AnimatedProperty.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-AnimatedProperty.cpp @@ -18,11 +18,11 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/animated-property.h" +#include "dali-scene3d/public-api/loader/animated-property.h" #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliAnimatedPropertyGetPropertyType(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-AnimationDefinition.cpp b/automated-tests/src/dali-scene3d/utc-Dali-AnimationDefinition.cpp similarity index 96% rename from automated-tests/src/dali-scene-loader/utc-Dali-AnimationDefinition.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-AnimationDefinition.cpp index e27fb36..5cde1b9 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-AnimationDefinition.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-AnimationDefinition.cpp @@ -18,11 +18,11 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/animation-definition.h" +#include "dali-scene3d/public-api/loader/animation-definition.h" #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliAnimationDefinitionStopForModification(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-CameraParameters.cpp b/automated-tests/src/dali-scene3d/utc-Dali-CameraParameters.cpp similarity index 95% rename from automated-tests/src/dali-scene-loader/utc-Dali-CameraParameters.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-CameraParameters.cpp index 5ad4a40..15e575b 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-CameraParameters.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-CameraParameters.cpp @@ -18,12 +18,12 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/camera-parameters.h" +#include "dali-scene3d/public-api/loader/camera-parameters.h" #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliCameraParameters(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-CubeLoader.cpp b/automated-tests/src/dali-scene3d/utc-Dali-CubeLoader.cpp similarity index 97% rename from automated-tests/src/dali-scene-loader/utc-Dali-CubeLoader.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-CubeLoader.cpp index e48f0cd..57482c3 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-CubeLoader.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-CubeLoader.cpp @@ -18,14 +18,14 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/cube-loader.h" +#include "dali-scene3d/public-api/loader/cube-loader.h" #include #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliCubeLoaderFailNonexistent(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-CubeMapLoader.cpp b/automated-tests/src/dali-scene3d/utc-Dali-CubeMapLoader.cpp similarity index 96% rename from automated-tests/src/dali-scene-loader/utc-Dali-CubeMapLoader.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-CubeMapLoader.cpp index 4c6f4f0..d00a15b 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-CubeMapLoader.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-CubeMapLoader.cpp @@ -18,14 +18,14 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/cube-map-loader.h" +#include "dali-scene3d/public-api/loader/cube-map-loader.h" #include #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliCubeMapLoaderFailNonexistent(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-DliLoader.cpp b/automated-tests/src/dali-scene3d/utc-Dali-DliLoader.cpp similarity index 98% rename from automated-tests/src/dali-scene-loader/utc-Dali-DliLoader.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-DliLoader.cpp index b63df36..6a33200 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-DliLoader.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-DliLoader.cpp @@ -20,14 +20,14 @@ #include #include -#include "dali-scene-loader/internal/json-util.h" -#include "dali-scene-loader/public-api/dli-loader.h" -#include "dali-scene-loader/public-api/load-result.h" -#include "dali-scene-loader/public-api/resource-bundle.h" -#include "dali-scene-loader/public-api/scene-definition.h" +#include "dali-scene3d/internal/loader/json-util.h" +#include "dali-scene3d/public-api/loader/dli-loader.h" +#include "dali-scene3d/public-api/loader/load-result.h" +#include "dali-scene3d/public-api/loader/resource-bundle.h" +#include "dali-scene3d/public-api/loader/scene-definition.h" using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; namespace { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-EnvironmentDefinition.cpp b/automated-tests/src/dali-scene3d/utc-Dali-EnvironmentDefinition.cpp similarity index 97% rename from automated-tests/src/dali-scene-loader/utc-Dali-EnvironmentDefinition.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-EnvironmentDefinition.cpp index e151c6a..8286bc3 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-EnvironmentDefinition.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-EnvironmentDefinition.cpp @@ -18,12 +18,12 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/environment-definition.h" +#include "dali-scene3d/public-api/loader/environment-definition.h" #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliEnvironmentDefinitionLoadRawDefault(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-FacialAnimation.cpp b/automated-tests/src/dali-scene3d/utc-Dali-FacialAnimation.cpp similarity index 95% rename from automated-tests/src/dali-scene-loader/utc-Dali-FacialAnimation.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-FacialAnimation.cpp index f6eb2fa..22692e0 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-FacialAnimation.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-FacialAnimation.cpp @@ -16,11 +16,11 @@ */ #include -#include -#include +#include +#include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliLoadFacialAnimation(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-Gltf2Loader.cpp b/automated-tests/src/dali-scene3d/utc-Dali-Gltf2Loader.cpp similarity index 97% rename from automated-tests/src/dali-scene-loader/utc-Dali-Gltf2Loader.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-Gltf2Loader.cpp index 4a40524..a9ba508 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-Gltf2Loader.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-Gltf2Loader.cpp @@ -20,14 +20,14 @@ #include #include -#include "dali-scene-loader/public-api/gltf2-loader.h" -#include "dali-scene-loader/public-api/load-result.h" -#include "dali-scene-loader/public-api/resource-bundle.h" -#include "dali-scene-loader/public-api/scene-definition.h" -#include "dali-scene-loader/public-api/shader-definition-factory.h" +#include "dali-scene3d/public-api/loader/gltf2-loader.h" +#include "dali-scene3d/public-api/loader/load-result.h" +#include "dali-scene3d/public-api/loader/resource-bundle.h" +#include "dali-scene3d/public-api/loader/scene-definition.h" +#include "dali-scene3d/public-api/loader/shader-definition-factory.h" using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; #define DALI_TEST_THROW(expression, exception, predicate) \ { \ diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-KtxLoader.cpp b/automated-tests/src/dali-scene3d/utc-Dali-KtxLoader.cpp similarity index 97% rename from automated-tests/src/dali-scene-loader/utc-Dali-KtxLoader.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-KtxLoader.cpp index f351b55..55f48d7 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-KtxLoader.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-KtxLoader.cpp @@ -18,14 +18,14 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/ktx-loader.h" +#include "dali-scene3d/public-api/loader/ktx-loader.h" #include #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliKtxLoaderFailNonexistent(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-MatrixStack.cpp b/automated-tests/src/dali-scene3d/utc-Dali-MatrixStack.cpp similarity index 94% rename from automated-tests/src/dali-scene-loader/utc-Dali-MatrixStack.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-MatrixStack.cpp index 776ded7..b9d8aff 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-MatrixStack.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-MatrixStack.cpp @@ -18,12 +18,12 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/matrix-stack.h" +#include "dali-scene3d/public-api/loader/matrix-stack.h" #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliMatrixStack(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-MeshDefinition.cpp b/automated-tests/src/dali-scene3d/utc-Dali-MeshDefinition.cpp similarity index 94% rename from automated-tests/src/dali-scene-loader/utc-Dali-MeshDefinition.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-MeshDefinition.cpp index 37c170b..377e68d 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-MeshDefinition.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-MeshDefinition.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +17,11 @@ #include -#include "dali-scene-loader/public-api/mesh-definition.h" +#include "dali-scene3d/public-api/loader/mesh-definition.h" #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliMeshDefinitionBlobApplyMinMaxBothMinMaxApplied(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-ModelView.cpp b/automated-tests/src/dali-scene3d/utc-Dali-ModelView.cpp similarity index 99% rename from automated-tests/src/dali-scene-loader/utc-Dali-ModelView.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-ModelView.cpp index 4c374a4..5424874 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-ModelView.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-ModelView.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include using namespace Dali; using namespace Dali::Toolkit; diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-NodeDefinition.cpp b/automated-tests/src/dali-scene3d/utc-Dali-NodeDefinition.cpp similarity index 97% rename from automated-tests/src/dali-scene-loader/utc-Dali-NodeDefinition.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-NodeDefinition.cpp index 7f1a7cf..835fdbf 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-NodeDefinition.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-NodeDefinition.cpp @@ -18,14 +18,14 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/node-definition.h" -#include "dali-scene-loader/public-api/view-projection.h" +#include "dali-scene3d/public-api/loader/node-definition.h" +#include "dali-scene3d/public-api/loader/view-projection.h" #include #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; namespace { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-RendererState.cpp b/automated-tests/src/dali-scene3d/utc-Dali-RendererState.cpp similarity index 97% rename from automated-tests/src/dali-scene-loader/utc-Dali-RendererState.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-RendererState.cpp index a6f6251..fb1e23d 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-RendererState.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-RendererState.cpp @@ -18,15 +18,15 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/renderer-state.h" -#include "dali-scene-loader/public-api/parse-renderer-state.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/renderer-state.h" +#include "dali-scene3d/public-api/loader/parse-renderer-state.h" +#include "dali-scene3d/public-api/loader/utils.h" #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; -namespace sl = SceneLoader; +namespace sl = Dali::Scene3D::Loader; namespace rs = RendererState; int UtcDaliRendererStateFromBlendFactors(void) diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-ResourceBundle.cpp b/automated-tests/src/dali-scene3d/utc-Dali-ResourceBundle.cpp similarity index 93% rename from automated-tests/src/dali-scene-loader/utc-Dali-ResourceBundle.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-ResourceBundle.cpp index 8f03828..20c1bcb 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-ResourceBundle.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-ResourceBundle.cpp @@ -18,13 +18,13 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/resource-bundle.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/resource-bundle.h" +#include "dali-scene3d/public-api/loader/utils.h" #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliResourceRefCounts(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-SceneDefinition.cpp b/automated-tests/src/dali-scene3d/utc-Dali-SceneDefinition.cpp similarity index 98% rename from automated-tests/src/dali-scene-loader/utc-Dali-SceneDefinition.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-SceneDefinition.cpp index 9b163bd..dc2fc92 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-SceneDefinition.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-SceneDefinition.cpp @@ -18,12 +18,12 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/scene-definition.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/scene-definition.h" +#include "dali-scene3d/public-api/loader/utils.h" #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliSceneDefinitionAddNode(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-ShaderDefinition.cpp b/automated-tests/src/dali-scene3d/utc-Dali-ShaderDefinition.cpp similarity index 93% rename from automated-tests/src/dali-scene-loader/utc-Dali-ShaderDefinition.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-ShaderDefinition.cpp index e58e702..3804038 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-ShaderDefinition.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-ShaderDefinition.cpp @@ -18,12 +18,12 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/shader-definition.h" +#include "dali-scene3d/public-api/loader/shader-definition.h" #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; int UtcDaliShaderDefinitionFailedToLoad(void) { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-ShaderDefinitionFactory.cpp b/automated-tests/src/dali-scene3d/utc-Dali-ShaderDefinitionFactory.cpp similarity index 97% rename from automated-tests/src/dali-scene-loader/utc-Dali-ShaderDefinitionFactory.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-ShaderDefinitionFactory.cpp index 534189e..b8e6357 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-ShaderDefinitionFactory.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-ShaderDefinitionFactory.cpp @@ -21,13 +21,13 @@ #include #include #include -#include "dali-scene-loader/public-api/gltf2-loader.h" -#include "dali-scene-loader/public-api/node-definition.h" -#include "dali-scene-loader/public-api/resource-bundle.h" -#include "dali-scene-loader/public-api/shader-definition-factory.h" +#include "dali-scene3d/public-api/loader/gltf2-loader.h" +#include "dali-scene3d/public-api/loader/node-definition.h" +#include "dali-scene3d/public-api/loader/resource-bundle.h" +#include "dali-scene3d/public-api/loader/shader-definition-factory.h" using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; namespace { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-StringCallback.cpp b/automated-tests/src/dali-scene3d/utc-Dali-StringCallback.cpp similarity index 88% rename from automated-tests/src/dali-scene-loader/utc-Dali-StringCallback.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-StringCallback.cpp index 113f40a..f89ec02 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-StringCallback.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-StringCallback.cpp @@ -18,12 +18,12 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/string-callback.h" +#include "dali-scene3d/public-api/loader/string-callback.h" #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; namespace { @@ -41,6 +41,6 @@ int UtcDaliUtilsDefaultStringCallback(void) { InstallLogFunction(TestLogFunction); DefaultErrorCallback("Hello world!"); - DALI_TEST_EQUAL(std::string(sBuffer), "2: string-callback.cpp: DefaultErrorCallback(26) > Hello world!"); + DALI_TEST_EQUAL(std::string(sBuffer), "2: string-callback.cpp: DefaultErrorCallback(28) > Hello world!"); END_TEST; } diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-Utils.cpp b/automated-tests/src/dali-scene3d/utc-Dali-Utils.cpp similarity index 95% rename from automated-tests/src/dali-scene-loader/utc-Dali-Utils.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-Utils.cpp index 68e30a0..05b53e7 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-Utils.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-Utils.cpp @@ -18,12 +18,12 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/utils.h" #include #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; namespace { diff --git a/automated-tests/src/dali-scene-loader/utc-Dali-ViewProjection.cpp b/automated-tests/src/dali-scene3d/utc-Dali-ViewProjection.cpp similarity index 95% rename from automated-tests/src/dali-scene-loader/utc-Dali-ViewProjection.cpp rename to automated-tests/src/dali-scene3d/utc-Dali-ViewProjection.cpp index c4567ab..0c47b6b 100644 --- a/automated-tests/src/dali-scene-loader/utc-Dali-ViewProjection.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-ViewProjection.cpp @@ -18,11 +18,11 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene-loader/public-api/view-projection.h" +#include "dali-scene3d/public-api/loader/view-projection.h" #include using namespace Dali; -using namespace Dali::SceneLoader; +using namespace Dali::Scene3D::Loader; namespace { diff --git a/build/tizen/.gitignore b/build/tizen/.gitignore index 2d253c9..f09a06e 100644 --- a/build/tizen/.gitignore +++ b/build/tizen/.gitignore @@ -2,5 +2,5 @@ build dali.info *.dylib dali2-*-config.cmake -libdali2-scene-loader.so* +libdali2-scene3d.so* dali-shader-generator diff --git a/build/tizen/CMakeLists.txt b/build/tizen/CMakeLists.txt index 31cfe9f..6609ae5 100644 --- a/build/tizen/CMakeLists.txt +++ b/build/tizen/CMakeLists.txt @@ -34,7 +34,7 @@ OPTION(ENABLE_LINK_TEST "Enable the link test" ON) OPTION(INSTALL_DOXYGEN_DOC "Install doxygen doc" ON) OPTION(CONFIGURE_AUTOMATED_TESTS "Configure automated tests" ON) OPTION(USE_DEFAULT_RESOURCE_DIR "Whether to use the default resource folders. Otherwise set environment variables for DALI_IMAGE_DIR, DALI_SOUND_DIR, DALI_STYLE_DIR, DALI_STYLE_IMAGE_DIR and DALI_DATA_READ_ONLY_DIR" ON) -OPTION(BUILD_SCENE_LOADER "Whether to build dali-scene-loader." ON) +OPTION(BUILD_SCENE3D "Whether to build dali-scene3d." ON) IF( ENABLE_PKG_CONFIGURE ) FIND_PACKAGE( PkgConfig REQUIRED ) @@ -511,7 +511,7 @@ IF( ENABLE_COVERAGE ) ADD_CUSTOM_TARGET( ${DALI_TOOLKIT_PREFIX}rename_cov_data ./rename-cov-data ) ADD_CUSTOM_TARGET( ${DALI_TOOLKIT_PREFIX}cov_data ${LCOV_BIN} ${LCOV_OPTS} --base-directory . --directory . -c -o dali.info - COMMAND ${LCOV_BIN} ${LCOV_OPTS} --remove dali.info \"*/dali-env/*\" \"/usr/include/*\" \"*/dali-env/*\" \"*solid-color-actor*\" \"*/dali-toolkit/third-party/*\" \"*/dali-scene-loader/third-party/*\" -o dali.info ) + COMMAND ${LCOV_BIN} ${LCOV_OPTS} --remove dali.info \"*/dali-env/*\" \"/usr/include/*\" \"*/dali-env/*\" \"*solid-color-actor*\" \"*/dali-toolkit/third-party/*\" \"*/dali-scene3d/third-party/*\" -o dali.info ) ADD_CUSTOM_TARGET( ${DALI_TOOLKIT_PREFIX}coverage genhtml -p ${ROOT_SRC_DIR} ${LCOV_OPTS} -o ${COVERAGE_OUTPUT_DIR} dali.info DEPENDS cov_data ) @@ -554,8 +554,8 @@ IF( ENABLE_COVERAGE ) ENDIF( LCOV_BIN ) ENDIF() -IF ( BUILD_SCENE_LOADER ) - ADD_SUBDIRECTORY( ${CMAKE_CURRENT_SOURCE_DIR}/dali-scene-loader ) +IF ( BUILD_SCENE3D ) + ADD_SUBDIRECTORY( ${CMAKE_CURRENT_SOURCE_DIR}/dali-scene3d ) ENDIF() @@ -572,9 +572,9 @@ IF( DOXYGEN_FOUND ) CONFIGURE_FILE( ${DOXYGEN_SRC_DIR}/dali.doxy.in ${DOXYGEN_SRC_DIR}/dali.doxy @ONLY ) CONFIGURE_FILE( ${DOXYGEN_INTERNAL_SRC_DIR}/dali-internal.doxy.in ${DOXYGEN_INTERNAL_SRC_DIR}/dali-internal.doxy @ONLY ) - IF ( BUILD_SCENE_LOADER ) + IF ( BUILD_SCENE3D ) ADD_CUSTOM_TARGET( doc_doxygen ALL - DEPENDS ${name} dali2-scene-loader + DEPENDS ${name} dali2-scene3d COMMAND ${DOXYGEN_EXECUTABLE} -u ${DOXYGEN_SRC_DIR}/dali.doxy COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_SRC_DIR}/dali.doxy COMMAND ${CMAKE_COMMAND} -P ${DOXYGEN_SRC_DIR}/check_for_errors.cmake @@ -630,7 +630,7 @@ MESSAGE( STATUS "Use pkg configure: " ${ENABLE_PKG_CONFIGURE} ) MESSAGE( STATUS "Vector Based Text Rendering: " ${ENABLE_VECTOR_BASED_TEXT_RENDERING} ) MESSAGE( STATUS "Enable link test: " ${ENABLE_LINK_TEST} ) MESSAGE( STATUS "Configure automated tests: " ${CONFIGURE_AUTOMATED_TESTS} ) -MESSAGE( STATUS "Build Dali Scene Loader: " ${BUILD_SCENE_LOADER} ) +MESSAGE( STATUS "Build Dali Scene3D: " ${BUILD_SCENE3D} ) MESSAGE( STATUS "CXXFLAGS: " ${CMAKE_CXX_FLAGS} ) MESSAGE( STATUS "LDFLAGS: " ${CMAKE_SHARED_LINKER_FLAGS_INIT}${CMAKE_SHARED_LINKER_FLAGS} ) diff --git a/build/tizen/dali-scene-loader/CMakeLists.txt b/build/tizen/dali-scene3d/CMakeLists.txt similarity index 82% rename from build/tizen/dali-scene-loader/CMakeLists.txt rename to build/tizen/dali-scene3d/CMakeLists.txt index f900b5a..08e646e 100644 --- a/build/tizen/dali-scene-loader/CMakeLists.txt +++ b/build/tizen/dali-scene3d/CMakeLists.txt @@ -1,5 +1,5 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.8.2) -set(name "dali2-scene-loader") +set(name "dali2-scene3d") project(${name} CXX) @@ -8,13 +8,13 @@ set(${name}_VERSION_MINOR 0) set(${name}_VERSION_PATCH 0) set(${name}_VERSION ${${name}_VERSION_MAJOR}.${${name}_VERSION_MINOR}.${${name}_VERSION_PATCH} ) -SET(DALI_SCENE_LOADER_VERSION ${${name}_VERSION} ) +SET(DALI_SCENE3D_VERSION ${${name}_VERSION} ) if(CMAKE_BUILD_TYPE MATCHES Debug) add_definitions("-DDEBUG_ENABLED") endif() -ADD_DEFINITIONS( "-DBUILDING_DALI_SCENE_LOADER" ) +ADD_DEFINITIONS( "-DBUILDING_DALI_SCENE3D" ) foreach(flag ${PKGS_CFLAGS}) set(extra_flags "${extra_flags} ${flag}") @@ -34,7 +34,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${extra_flags}") set(prefix ${CMAKE_INSTALL_PREFIX}) set(repo_root_dir "${CMAKE_CURRENT_LIST_DIR}/../../../") -set(scene_loader_dir "${repo_root_dir}/dali-scene-loader") +set(scene3d_dir "${repo_root_dir}/dali-scene3d") option(ENABLE_PKG_CONFIGURE "Use pkgconfig" ON) option(ENABLE_COVERAGE "Coverage" OFF) @@ -66,13 +66,13 @@ if (ENABLE_PKG_CONFIGURE) set(EXEC_PREFIX ${CMAKE_INSTALL_PREFIX}) set(DEV_INCLUDE_PATH ${INCLUDE_DIR}) - set(core_pkg_cfg_file dali2-scene-loader.pc) + set(core_pkg_cfg_file dali2-scene3d.pc) configure_file(${CMAKE_CURRENT_LIST_DIR}/${core_pkg_cfg_file}.in ${core_pkg_cfg_file} @ONLY) endif() -set(scene_loader_src_files "") -include("${scene_loader_dir}/internal/file.list") -include("${scene_loader_dir}/public-api/file.list") +set(scene3d_src_files "") +include("${scene3d_dir}/internal/file.list") +include("${scene3d_dir}/public-api/file.list") set(prefix_include_dir "${prefix}/include") include_directories(${repo_root_dir} @@ -80,10 +80,10 @@ include_directories(${repo_root_dir} ) # Generate source files for shaders -SET(SHADER_SOURCE_DIR "${scene_loader_dir}/internal/graphics/shaders/") -SET(SHADER_GENERATED_DIR "${scene_loader_dir}/internal/graphics/generated") +SET(SHADER_SOURCE_DIR "${scene3d_dir}/internal/graphics/shaders/") +SET(SHADER_GENERATED_DIR "${scene3d_dir}/internal/graphics/generated") -SET(GENERATED_SHADER_DIR ${scene_loader_dir}/internal/graphics/) +SET(GENERATED_SHADER_DIR ${scene3d_dir}/internal/graphics/) SET_PROPERTY(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${GENERATED_SHADER_DIR}/generated/" "${GENERATED_SHADER_DIR}/builtin-shader-extern-gen.h") @@ -104,9 +104,9 @@ ADD_CUSTOM_COMMAND(OUTPUT ${BUILT_IN_SHADER_GEN_CPP} DEPENDS ${SHADER_GENERATOR_BINARY} COMMAND ${SHADER_GENERATOR_BINARY} ${SHADER_SOURCE_DIR} ${SHADER_GENERATED_DIR}) -SET( scene_loader_src_files ${scene_loader_src_files} ${BUILT_IN_SHADER_GEN_CPP} ) +SET( scene3d_src_files ${scene3d_src_files} ${BUILT_IN_SHADER_GEN_CPP} ) -add_library(${name} SHARED ${scene_loader_src_files}) +add_library(${name} SHARED ${scene3d_src_files}) target_link_libraries(${name} ${DALICORE_LDFLAGS} ${DALIADAPTOR_LDFLAGS} dali2-toolkit @@ -119,7 +119,7 @@ endif() IF( INSTALL_CMAKE_MODULES ) SET_TARGET_PROPERTIES( ${name} PROPERTIES - VERSION ${DALI_SCENE_LOADER_VERSION} + VERSION ${DALI_SCENE3D_VERSION} SOVERSION ${${name}_VERSION_MAJOR} CLEAN_DIRECT_OUPUT 1 ) @@ -160,9 +160,9 @@ ELSE() INSTALL( TARGETS ${name} DESTINATION ${LIB_DIR} ) ENDIF() -file(GLOB scene_loader_include_files ${scene_loader_public_api_dir}) -install(DIRECTORY ${scene_loader_include_files} - DESTINATION "${prefix_include_dir}/dali-scene-loader" +file(GLOB scene3d_include_files ${scene3d_public_api_dir}) +install(DIRECTORY ${scene3d_include_files} + DESTINATION "${prefix_include_dir}/dali-scene3d" FILES_MATCHING PATTERN "*.h" ) diff --git a/build/tizen/dali-scene-loader/build.sh b/build/tizen/dali-scene3d/build.sh similarity index 100% rename from build/tizen/dali-scene-loader/build.sh rename to build/tizen/dali-scene3d/build.sh diff --git a/build/tizen/dali-scene-loader/dali2-scene-loader.pc.in b/build/tizen/dali-scene3d/dali2-scene3d.pc.in similarity index 51% rename from build/tizen/dali-scene-loader/dali2-scene-loader.pc.in rename to build/tizen/dali-scene3d/dali2-scene3d.pc.in index 8f7e885..106e032 100644 --- a/build/tizen/dali-scene-loader/dali2-scene-loader.pc.in +++ b/build/tizen/dali-scene3d/dali2-scene3d.pc.in @@ -1,12 +1,12 @@ prefix=@PREFIX@ exec_prefix=@EXEC_PREFIX@ -apiversion=@DALI_SCENE_LOADER_VERSION@ +apiversion=@DALI_SCENE3D_VERSION@ libdir=@LIB_DIR@ includedir=@DEV_INCLUDE_PATH@ -Name: Dali 3D Engine Scene Loader -Description: Dali Scene Loader library +Name: Dali 3D Engine Scene3D +Description: Dali Scene3D library Version: ${apiversion} Requires: dali2-toolkit -Libs: -L${libdir} -ldali2-scene-loader +Libs: -L${libdir} -ldali2-scene3d Cflags: -I${includedir} diff --git a/build/tizen/docs-internal/dali-internal.doxy.in b/build/tizen/docs-internal/dali-internal.doxy.in index 7cf973a..1807df0 100644 --- a/build/tizen/docs-internal/dali-internal.doxy.in +++ b/build/tizen/docs-internal/dali-internal.doxy.in @@ -2293,7 +2293,7 @@ INCLUDE_FILE_PATTERNS = PREDEFINED = DALI_CORE_API \ DALI_ADAPTOR_API \ DALI_TOOLKIT_API \ - DALI_SCENE_LOADER_API \ + DALI_SCENE3D_API \ DALI_INTERNAL \ # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this diff --git a/build/tizen/docs/dali.doxy.in b/build/tizen/docs/dali.doxy.in index 0fefc0e..f60c723 100644 --- a/build/tizen/docs/dali.doxy.in +++ b/build/tizen/docs/dali.doxy.in @@ -999,7 +999,7 @@ INPUT = @DOXYGEN_DOCS_DIR@/content \ @prefix@/include/dali/devel-api \ ../../../dali-toolkit/public-api \ ../../../dali-toolkit/devel-api \ - ../../../dali-scene-loader/public-api \ + ../../../dali-scene3d/public-api \ ../../../automated-tests/README.md # This tag can be used to specify the character encoding of the source files @@ -2274,7 +2274,7 @@ INCLUDE_FILE_PATTERNS = PREDEFINED = DALI_CORE_API \ DALI_ADAPTOR_API \ DALI_TOOLKIT_API \ - DALI_SCENE_LOADER_API \ + DALI_SCENE3D_API \ DALI_INTERNAL \ # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this diff --git a/dali-scene-loader/internal/file.list b/dali-scene-loader/internal/file.list deleted file mode 100644 index 7987d79..0000000 --- a/dali-scene-loader/internal/file.list +++ /dev/null @@ -1,9 +0,0 @@ -set(scene_loader_internal_dir "${scene_loader_dir}/internal") - -set(scene_loader_src_files ${scene_loader_src_files} - ${scene_loader_internal_dir}/gltf2-asset.cpp - ${scene_loader_internal_dir}/hash.cpp - ${scene_loader_internal_dir}/json-reader.cpp - ${scene_loader_internal_dir}/json-util.cpp - ${scene_loader_internal_dir}/controls/model-view/model-view-impl.cpp -) diff --git a/dali-scene-loader/public-api/file.list b/dali-scene-loader/public-api/file.list deleted file mode 100644 index 92b1c91..0000000 --- a/dali-scene-loader/public-api/file.list +++ /dev/null @@ -1,33 +0,0 @@ -set(scene_loader_public_api_dir "${scene_loader_dir}/public-api") - -set(scene_loader_src_files ${scene_loader_src_files} - ${scene_loader_public_api_dir}/alpha-function-helper.cpp - ${scene_loader_public_api_dir}/animated-property.cpp - ${scene_loader_public_api_dir}/animation-definition.cpp - ${scene_loader_public_api_dir}/blend-shape-details.cpp - ${scene_loader_public_api_dir}/camera-parameters.cpp - ${scene_loader_public_api_dir}/cube-data.cpp - ${scene_loader_public_api_dir}/cube-loader.cpp - ${scene_loader_public_api_dir}/cube-map-loader.cpp - ${scene_loader_public_api_dir}/customization.cpp - ${scene_loader_public_api_dir}/dli-loader.cpp - ${scene_loader_public_api_dir}/environment-definition.cpp - ${scene_loader_public_api_dir}/facial-animation-loader.cpp - ${scene_loader_public_api_dir}/gltf2-loader.cpp - ${scene_loader_public_api_dir}/ktx-loader.cpp - ${scene_loader_public_api_dir}/material-definition.cpp - ${scene_loader_public_api_dir}/matrix-stack.cpp - ${scene_loader_public_api_dir}/mesh-definition.cpp - ${scene_loader_public_api_dir}/controls/model-view/model-view.cpp - ${scene_loader_public_api_dir}/node-definition.cpp - ${scene_loader_public_api_dir}/parse-renderer-state.cpp - ${scene_loader_public_api_dir}/renderer-state.cpp - ${scene_loader_public_api_dir}/resource-bundle.cpp - ${scene_loader_public_api_dir}/scene-definition.cpp - ${scene_loader_public_api_dir}/shader-definition.cpp - ${scene_loader_public_api_dir}/shader-definition-factory.cpp - ${scene_loader_public_api_dir}/skinning-details.cpp - ${scene_loader_public_api_dir}/string-callback.cpp - ${scene_loader_public_api_dir}/utils.cpp - ${scene_loader_public_api_dir}/view-projection.cpp -) \ No newline at end of file diff --git a/dali-scene-loader.manifest b/dali-scene3d.manifest similarity index 100% rename from dali-scene-loader.manifest rename to dali-scene3d.manifest diff --git a/dali-scene-loader.manifest-smack b/dali-scene3d.manifest-smack similarity index 100% rename from dali-scene-loader.manifest-smack rename to dali-scene3d.manifest-smack diff --git a/dali-scene-loader/README.md b/dali-scene3d/README.md similarity index 99% rename from dali-scene-loader/README.md rename to dali-scene3d/README.md index b29c463..4174487 100644 --- a/dali-scene-loader/README.md +++ b/dali-scene3d/README.md @@ -213,7 +213,7 @@ DLI supports meshes that allow deformation by skeletal animation. These must def * `joints0` and `weights0` attributes, as above. * A [`skeleton`](#skeletons) ID, to specify which (joint) nodes' transformations affect the mesh. -:warning: The maximum number of bones supported by DALi Scene Loader is `64`. +:warning: The maximum number of bones supported by DALi Scene3D is `64`. ## Blend shapes Blend shapes provide alternate configurations of vertex `positions`, `normals` and/or `tangents` that may be blended with the same attributes of the base mesh, controlled by an animatable `weight`. @@ -241,7 +241,7 @@ Blend shapes provide alternate configurations of vertex `positions`, `normals` a ``` A `blendShapesHeader`, if present, must define: * the `version` of the blend shapes; supported values are `1.0` and `2.0`. The difference between the versions is that v1.0 requires a per-blend shape definition of an un-normalization factor. - * the `byteOffset` and `byteLength` of a buffer in the binary which defines the width (2 bytes) and height (2 bytes) of the texture that dali-scene-loader creates for blend shape data. + * the `byteOffset` and `byteLength` of a buffer in the binary which defines the width (2 bytes) and height (2 bytes) of the texture that dali-scene3d creates for blend shape data. The `blendShapes` array then defines the shapes that are available to blend between, comprising of: * An initial `weight` numerical, the default is 0; diff --git a/dali-scene-loader/internal/controls/model-view/model-view-impl.cpp b/dali-scene3d/internal/controls/model-view/model-view-impl.cpp similarity index 78% rename from dali-scene-loader/internal/controls/model-view/model-view-impl.cpp rename to dali-scene3d/internal/controls/model-view/model-view-impl.cpp index f3b135a..568b899 100644 --- a/dali-scene-loader/internal/controls/model-view/model-view-impl.cpp +++ b/dali-scene3d/internal/controls/model-view/model-view-impl.cpp @@ -23,24 +23,24 @@ #include #include #include +#include #include #include -#include #include // INTERNAL INCLUDES -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Dali; @@ -115,9 +115,9 @@ struct BoundingVolume Texture LoadCubeMap(const std::string& cubeMapPath) { - Texture cubeTexture; - SceneLoader::CubeData cubeData; - if(SceneLoader::LoadCubeMapData(cubeMapPath, cubeData)) + Texture cubeTexture; + Dali::Scene3D::Loader::CubeData cubeData; + if(Dali::Scene3D::Loader::LoadCubeMapData(cubeMapPath, cubeData)) { cubeTexture = cubeData.CreateTexture(); } @@ -130,13 +130,13 @@ Texture LoadCubeMap(const std::string& cubeMapPath) } void ConfigureBlendShapeShaders( - SceneLoader::ResourceBundle& resources, const SceneLoader::SceneDefinition& scene, Actor root, std::vector&& requests) + Dali::Scene3D::Loader::ResourceBundle& resources, const Dali::Scene3D::Loader::SceneDefinition& scene, Actor root, std::vector&& requests) { std::vector errors; auto onError = [&errors](const std::string& msg) { errors.push_back(msg); }; if(!scene.ConfigureBlendshapeShaders(resources, root, std::move(requests), onError)) { - SceneLoader::ExceptionFlinger flinger(ASSERT_LOCATION); + Dali::Scene3D::Loader::ExceptionFlinger flinger(ASSERT_LOCATION); for(auto& msg : errors) { flinger << msg << '\n'; @@ -144,14 +144,14 @@ void ConfigureBlendShapeShaders( } } -void AddModelTreeToAABB(BoundingVolume& AABB, const SceneLoader::SceneDefinition& scene, const Dali::SceneLoader::Customization::Choices& choices, Dali::SceneLoader::Index iNode, Dali::SceneLoader::NodeDefinition::CreateParams& nodeParams, Matrix parentMatrix) +void AddModelTreeToAABB(BoundingVolume& AABB, const Dali::Scene3D::Loader::SceneDefinition& scene, const Dali::Scene3D::Loader::Customization::Choices& choices, Dali::Scene3D::Loader::Index iNode, Dali::Scene3D::Loader::NodeDefinition::CreateParams& nodeParams, Matrix parentMatrix) { static constexpr uint32_t BOX_POINT_COUNT = 8; static uint32_t BBIndex[BOX_POINT_COUNT][3] = {{0, 0, 0}, {0, 1, 0}, {1, 0, 0}, {1, 1, 0}, {0, 0, 1}, {0, 1, 1}, {1, 0, 1}, {1, 1, 1}}; - Matrix nodeMatrix; - const SceneLoader::NodeDefinition* node = scene.GetNode(iNode); - Matrix localMatrix = node->GetLocalSpace(); + Matrix nodeMatrix; + const Dali::Scene3D::Loader::NodeDefinition* node = scene.GetNode(iNode); + Matrix localMatrix = node->GetLocalSpace(); Matrix::Multiply(nodeMatrix, localMatrix, parentMatrix); Vector3 volume[2]; @@ -171,8 +171,8 @@ void AddModelTreeToAABB(BoundingVolume& AABB, const SceneLoader::SceneDefinition { if(!node->mChildren.empty()) { - auto choice = choices.Get(node->mCustomization->mTag); - Dali::SceneLoader::Index i = std::min(choice != Dali::SceneLoader::Customization::NONE ? choice : 0, static_cast(node->mChildren.size() - 1)); + auto choice = choices.Get(node->mCustomization->mTag); + Dali::Scene3D::Loader::Index i = std::min(choice != Dali::Scene3D::Loader::Customization::NONE ? choice : 0, static_cast(node->mChildren.size() - 1)); AddModelTreeToAABB(AABB, scene, choices, node->mChildren[i], nodeParams, nodeMatrix); } @@ -357,42 +357,42 @@ void ModelView::LoadModel() std::string extension = modelPath.extension(); std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower); - SceneLoader::ResourceBundle::PathProvider pathProvider = [&](SceneLoader::ResourceType::Value type) { + Dali::Scene3D::Loader::ResourceBundle::PathProvider pathProvider = [&](Dali::Scene3D::Loader::ResourceType::Value type) { return mResourcePath; }; - SceneLoader::ResourceBundle resources; - SceneLoader::SceneDefinition scene; - std::vector animGroups; - std::vector cameraParameters; - std::vector lights; + Dali::Scene3D::Loader::ResourceBundle resources; + Dali::Scene3D::Loader::SceneDefinition scene; + std::vector animGroups; + std::vector cameraParameters; + std::vector lights; - std::vector animations; + std::vector animations; animations.clear(); - SceneLoader::LoadResult output{resources, scene, animations, animGroups, cameraParameters, lights}; + Dali::Scene3D::Loader::LoadResult output{resources, scene, animations, animGroups, cameraParameters, lights}; if(extension == DLI_EXTENSION) { - SceneLoader::DliLoader loader; - SceneLoader::DliLoader::InputParams input{ - pathProvider(SceneLoader::ResourceType::Mesh), + Dali::Scene3D::Loader::DliLoader loader; + Dali::Scene3D::Loader::DliLoader::InputParams input{ + pathProvider(Dali::Scene3D::Loader::ResourceType::Mesh), nullptr, {}, {}, nullptr, {}}; - SceneLoader::DliLoader::LoadParams loadParams{input, output}; + Dali::Scene3D::Loader::DliLoader::LoadParams loadParams{input, output}; if(!loader.LoadScene(mModelPath, loadParams)) { - SceneLoader::ExceptionFlinger(ASSERT_LOCATION) << "Failed to load scene from '" << mModelPath << "': " << loader.GetParseError(); + Dali::Scene3D::Loader::ExceptionFlinger(ASSERT_LOCATION) << "Failed to load scene from '" << mModelPath << "': " << loader.GetParseError(); } } else if(extension == GLTF_EXTENSION) { - SceneLoader::ShaderDefinitionFactory sdf; + Dali::Scene3D::Loader::ShaderDefinitionFactory sdf; sdf.SetResources(resources); - SceneLoader::LoadGltfScene(mModelPath, sdf, output); + Dali::Scene3D::Loader::LoadGltfScene(mModelPath, sdf, output); resources.mEnvironmentMaps.push_back({}); } @@ -401,9 +401,9 @@ void ModelView::LoadModel() DALI_LOG_ERROR("Unsupported model type.\n"); } - SceneLoader::Transforms xforms{SceneLoader::MatrixStack{}, SceneLoader::ViewProjection{}}; - SceneLoader::NodeDefinition::CreateParams nodeParams{resources, xforms, {}, {}, {}}; - SceneLoader::Customization::Choices choices; + Dali::Scene3D::Loader::Transforms xforms{Dali::Scene3D::Loader::MatrixStack{}, Dali::Scene3D::Loader::ViewProjection{}}; + Dali::Scene3D::Loader::NodeDefinition::CreateParams nodeParams{resources, xforms, {}, {}, {}}; + Dali::Scene3D::Loader::Customization::Choices choices; mModelRoot = Actor::New(); @@ -455,7 +455,7 @@ void ModelView::LoadModel() SetImageBasedLight(mModelRoot); mNaturalSize = AABB.CalculateSize(); - mModelPivot = AABB.CalculatePivot(); + mModelPivot = AABB.CalculatePivot(); mModelRoot.SetProperty(Dali::Actor::Property::SIZE, mNaturalSize); FitModelPosition(); @@ -518,7 +518,7 @@ void ModelView::SetImageBasedLight(Actor node) uint32_t rendererCount = node.GetRendererCount(); if(rendererCount) { - node.RegisterProperty(SceneLoader::NodeDefinition::GetIblScaleFactorUniformName().data(), mIblScaleFactor); + node.RegisterProperty(Dali::Scene3D::Loader::NodeDefinition::GetIblScaleFactorUniformName().data(), mIblScaleFactor); } for(uint32_t i = 0; i < rendererCount; ++i) diff --git a/dali-scene-loader/internal/controls/model-view/model-view-impl.h b/dali-scene3d/internal/controls/model-view/model-view-impl.h similarity index 85% rename from dali-scene-loader/internal/controls/model-view/model-view-impl.h rename to dali-scene3d/internal/controls/model-view/model-view-impl.h index 75c062a..14b31f9 100644 --- a/dali-scene-loader/internal/controls/model-view/model-view-impl.h +++ b/dali-scene3d/internal/controls/model-view/model-view-impl.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_INTERNAL_MODEL_VIEW_H -#define DALI_SCENE_LOADER_INTERNAL_MODEL_VIEW_H +#ifndef DALI_SCENE3D_INTERNAL_MODEL_VIEW_H +#define DALI_SCENE3D_INTERNAL_MODEL_VIEW_H /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. @@ -19,13 +19,13 @@ */ // EXTERNAL INCLUDES +#include #include #include #include -#include // INTERNAL INCLUDES -#include +#include namespace Dali { @@ -148,19 +148,19 @@ private: void SetImageBasedLight(Actor node); private: - std::string mModelPath; - std::string mResourcePath; - Dali::Layer mModelLayer; - Dali::Actor mModelRoot; - std::vector mAnimations; - - Dali::Texture mSpecularTexture; - Dali::Texture mDiffuseTexture; - Vector3 mNaturalSize; - Vector3 mModelPivot; - float mIblScaleFactor; - bool mFitSize; - bool mFitCenter; + std::string mModelPath; + std::string mResourcePath; + Dali::Layer mModelLayer; + Dali::Actor mModelRoot; + std::vector mAnimations; + + Dali::Texture mSpecularTexture; + Dali::Texture mDiffuseTexture; + Vector3 mNaturalSize; + Vector3 mModelPivot; + float mIblScaleFactor; + bool mFitSize; + bool mFitCenter; }; } // namespace Internal @@ -180,8 +180,8 @@ inline const Dali::Scene3D::Internal::ModelView& GetImpl(const Dali::Scene3D::Mo return static_cast(handle); } -} // namespace Toolkit +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_INTERNAL_MODEL_VIEW_H +#endif // DALI_SCENE3D_INTERNAL_MODEL_VIEW_H diff --git a/dali-scene3d/internal/file.list b/dali-scene3d/internal/file.list new file mode 100644 index 0000000..b236f3c --- /dev/null +++ b/dali-scene3d/internal/file.list @@ -0,0 +1,9 @@ +set(scene3d_internal_dir "${scene3d_dir}/internal") + +set(scene3d_src_files ${scene3d_src_files} + ${scene3d_internal_dir}/loader/gltf2-asset.cpp + ${scene3d_internal_dir}/loader/hash.cpp + ${scene3d_internal_dir}/loader/json-reader.cpp + ${scene3d_internal_dir}/loader/json-util.cpp + ${scene3d_internal_dir}/controls/model-view/model-view-impl.cpp +) diff --git a/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.frag b/dali-scene3d/internal/graphics/shaders/default-physically-based-shader.frag similarity index 100% rename from dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.frag rename to dali-scene3d/internal/graphics/shaders/default-physically-based-shader.frag diff --git a/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.vert b/dali-scene3d/internal/graphics/shaders/default-physically-based-shader.vert similarity index 100% rename from dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.vert rename to dali-scene3d/internal/graphics/shaders/default-physically-based-shader.vert diff --git a/dali-scene-loader/internal/graphics/shaders/scene-loader-joint-debug.frag b/dali-scene3d/internal/graphics/shaders/scene3d-joint-debug.frag similarity index 100% rename from dali-scene-loader/internal/graphics/shaders/scene-loader-joint-debug.frag rename to dali-scene3d/internal/graphics/shaders/scene3d-joint-debug.frag diff --git a/dali-scene-loader/internal/graphics/shaders/scene-loader-joint-debug.vert b/dali-scene3d/internal/graphics/shaders/scene3d-joint-debug.vert similarity index 100% rename from dali-scene-loader/internal/graphics/shaders/scene-loader-joint-debug.vert rename to dali-scene3d/internal/graphics/shaders/scene3d-joint-debug.vert diff --git a/dali-scene-loader/internal/gltf2-asset.cpp b/dali-scene3d/internal/loader/gltf2-asset.cpp similarity index 97% rename from dali-scene-loader/internal/gltf2-asset.cpp rename to dali-scene3d/internal/loader/gltf2-asset.cpp index d0e183a..8297045 100644 --- a/dali-scene-loader/internal/gltf2-asset.cpp +++ b/dali-scene3d/internal/loader/gltf2-asset.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2021 Samsung Electronics Co., Ltd. +* Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "dali-scene-loader/internal/gltf2-asset.h" +#include "dali-scene3d/internal/loader/gltf2-asset.h" #include #include #include "dali/public-api/math/matrix.h" diff --git a/dali-scene-loader/internal/gltf2-asset.h b/dali-scene3d/internal/loader/gltf2-asset.h similarity index 97% rename from dali-scene-loader/internal/gltf2-asset.h rename to dali-scene3d/internal/loader/gltf2-asset.h index e074c28..7769751 100644 --- a/dali-scene-loader/internal/gltf2-asset.h +++ b/dali-scene3d/internal/loader/gltf2-asset.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_GLTF2_ASSET_H_ -#define DALI_SCENE_LOADER_GLTF2_ASSET_H_ +#ifndef DALI_SCENE3D_LOADER_GLTF2_ASSET_H_ +#define DALI_SCENE3D_LOADER_GLTF2_ASSET_H_ /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. * @@ -18,8 +18,8 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/internal/json-reader.h" -#include "dali-scene-loader/public-api/index.h" +#include "dali-scene3d/internal/loader/json-reader.h" +#include "dali-scene3d/public-api/loader/index.h" // EXTERNAL INCLUDES #include @@ -31,7 +31,7 @@ namespace gltf2 { -using Index = Dali::SceneLoader::Index; +using Index = Dali::Scene3D::Loader::Index; template class Ref @@ -88,7 +88,7 @@ public: private: std::vector* mVector = nullptr; - Index mIndex = Dali::SceneLoader::INVALID_INDEX; + Index mIndex = Dali::Scene3D::Loader::INVALID_INDEX; }; struct Asset @@ -595,4 +595,4 @@ Dali::Quaternion ReadQuaternion(const json_value_s& j); } // namespace gltf2 -#endif //DALI_SCENE_LOADER_GLTF2_ASSET_H_ +#endif //DALI_SCENE3D_LOADER_GLTF2_ASSET_H_ diff --git a/dali-scene-loader/internal/hash.cpp b/dali-scene3d/internal/loader/hash.cpp similarity index 90% rename from dali-scene-loader/internal/hash.cpp rename to dali-scene3d/internal/loader/hash.cpp index 43d410f..d1ea70f 100644 --- a/dali-scene-loader/internal/hash.cpp +++ b/dali-scene3d/internal/loader/hash.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. * */ -#include "dali-scene-loader/internal/hash.h" +#include "dali-scene3d/internal/loader/hash.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { Hash::Hash(uint64_t initial) : mValue(initial) @@ -91,5 +93,6 @@ uint64_t Hash::Concatenate(uint64_t value) return mValue * 31 + value; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/internal/hash.h b/dali-scene3d/internal/loader/hash.h similarity index 91% rename from dali-scene-loader/internal/hash.h rename to dali-scene3d/internal/loader/hash.h index 22b770e..a5bba8e 100644 --- a/dali-scene-loader/internal/hash.h +++ b/dali-scene3d/internal/loader/hash.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_HASH_H_ -#define DALI_SCENE_LOADER_HASH_H_ +#ifndef DALI_SCENE3D_LOADER_HASH_H_ +#define DALI_SCENE3D_LOADER_HASH_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief Rudimentary hash generator that follows a builder pattern. @@ -117,7 +119,8 @@ Hash& Hash::AddObjectBytes(const T& value) return *this; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_HASH_H_ +#endif // DALI_SCENE3D_LOADER_HASH_H_ diff --git a/dali-scene-loader/internal/json-reader.cpp b/dali-scene3d/internal/loader/json-reader.cpp similarity index 94% rename from dali-scene-loader/internal/json-reader.cpp rename to dali-scene3d/internal/loader/json-reader.cpp index 0353817..ead6269 100644 --- a/dali-scene-loader/internal/json-reader.cpp +++ b/dali-scene3d/internal/loader/json-reader.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2021 Samsung Electronics Co., Ltd. +* Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "dali-scene-loader/internal/json-reader.h" +#include "dali-scene3d/internal/loader/json-reader.h" #include #include diff --git a/dali-scene-loader/internal/json-reader.h b/dali-scene3d/internal/loader/json-reader.h similarity index 97% rename from dali-scene-loader/internal/json-reader.h rename to dali-scene3d/internal/loader/json-reader.h index 4fb6f7a..c0a8abd 100644 --- a/dali-scene-loader/internal/json-reader.h +++ b/dali-scene3d/internal/loader/json-reader.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_JSON_READER_H_ -#define DALI_SCENE_LOADER_JSON_READER_H_ +#ifndef DALI_SCENE3D_LOADER_JSON_READER_H_ +#define DALI_SCENE3D_LOADER_JSON_READER_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/third-party/json.h" +#include "dali-scene3d/third-party/json.h" // EXTERNAL INCLUDES #include @@ -447,4 +447,4 @@ void SetObjectReader(const Reader& r) } // namespace json -#endif //DALI_SCENE_LOADER_JSON_READER_H_ +#endif //DALI_SCENE3D_LOADER_JSON_READER_H_ diff --git a/dali-scene-loader/internal/json-util.cpp b/dali-scene3d/internal/loader/json-util.cpp similarity index 98% rename from dali-scene-loader/internal/json-util.cpp rename to dali-scene3d/internal/loader/json-util.cpp index 765568d..fcb91ad 100644 --- a/dali-scene-loader/internal/json-util.cpp +++ b/dali-scene3d/internal/loader/json-util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. * */ -#include "dali-scene-loader/internal/json-util.h" +#include "dali-scene3d/internal/loader/json-util.h" // EXTERNAL INCLUDES #include @@ -32,7 +32,9 @@ namespace Dali { using namespace Toolkit; -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -525,5 +527,6 @@ Property::Value ReadPropertyValue(const Toolkit::TreeNode& tn) return propValue; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/internal/json-util.h b/dali-scene3d/internal/loader/json-util.h similarity index 90% rename from dali-scene-loader/internal/json-util.h rename to dali-scene3d/internal/loader/json-util.h index 9121bcd..1d2b983 100644 --- a/dali-scene-loader/internal/json-util.h +++ b/dali-scene3d/internal/loader/json-util.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_JSON_UTIL_H_ -#define DALI_SCENE_LOADER_JSON_UTIL_H_ +#ifndef DALI_SCENE3D_LOADER_JSON_UTIL_H_ +#define DALI_SCENE3D_LOADER_JSON_UTIL_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/index.h" +#include "dali-scene3d/public-api/loader/index.h" // EXTERNAL INCLUDES #include "dali-toolkit/devel-api/builder/tree-node.h" @@ -29,7 +29,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { bool ReadBool(const Toolkit::TreeNode* node, bool& num); @@ -88,7 +90,8 @@ Property::Value ReadPropertyValue(const Property::Type& propType, const Toolkit: */ Property::Value ReadPropertyValue(const Toolkit::TreeNode& tn); -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_JSON_UTIL_H_ +#endif //DALI_SCENE3D_LOADER_JSON_UTIL_H_ diff --git a/dali-scene-loader/public-api/api.h b/dali-scene3d/public-api/api.h similarity index 61% rename from dali-scene-loader/public-api/api.h rename to dali-scene3d/public-api/api.h index 45f4a1c..47ee583 100644 --- a/dali-scene-loader/public-api/api.h +++ b/dali-scene3d/public-api/api.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_API_H -#define DALI_SCENE_LOADER_API_H +#ifndef DALI_SCENE3D_API_H +#define DALI_SCENE3D_API_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,15 +18,15 @@ */ #if __GNUC__ >= 4 -#define DALI_SCENE_LOADER_API __attribute__((visibility("default"))) +#define DALI_SCENE3D_API __attribute__((visibility("default"))) #elif defined(WIN32) -#ifdef BUILDING_DALI_SCENE_LOADER -#define DALI_SCENE_LOADER_API __declspec(dllexport) +#ifdef BUILDING_DALI_SCENE3D +#define DALI_SCENE3D_API __declspec(dllexport) #else -#define DALI_SCENE_LOADER_API __declspec(dllimport) -#endif // BUILDING_DALI_SCENE_LOADER +#define DALI_SCENE3D_API __declspec(dllimport) +#endif // BUILDING_DALI_SCENE3D #endif -#endif //DALI_SCENE_LOADER_API_H +#endif //DALI_SCENE3D_API_H diff --git a/dali-scene-loader/public-api/controls/model-view/model-view.cpp b/dali-scene3d/public-api/controls/model-view/model-view.cpp similarity index 93% rename from dali-scene-loader/public-api/controls/model-view/model-view.cpp rename to dali-scene3d/public-api/controls/model-view/model-view.cpp index dc0f2aa..b21726e 100644 --- a/dali-scene-loader/public-api/controls/model-view/model-view.cpp +++ b/dali-scene3d/public-api/controls/model-view/model-view.cpp @@ -16,10 +16,10 @@ */ // CLASS HEADER -#include +#include // INTERNAL INCLUDES -#include +#include namespace Dali { diff --git a/dali-scene-loader/public-api/controls/model-view/model-view.h b/dali-scene3d/public-api/controls/model-view/model-view.h similarity index 96% rename from dali-scene-loader/public-api/controls/model-view/model-view.h rename to dali-scene3d/public-api/controls/model-view/model-view.h index 5a53c40..4c27f1a 100644 --- a/dali-scene-loader/public-api/controls/model-view/model-view.h +++ b/dali-scene3d/public-api/controls/model-view/model-view.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_MODEL_VIEW_H -#define DALI_SCENE_LOADER_MODEL_VIEW_H +#ifndef DALI_SCENE3D_MODEL_VIEW_H +#define DALI_SCENE3D_MODEL_VIEW_H /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include // EXTERNAL INCLUDES #include @@ -66,7 +66,7 @@ class ModelView; * * @endcode */ -class DALI_SCENE_LOADER_API ModelView : public Dali::Toolkit::Control +class DALI_SCENE3D_API ModelView : public Dali::Toolkit::Control { public: /** @@ -211,4 +211,4 @@ public: // Not intended for application developers } // namespace Dali -#endif // DALI_SCENE_LOADER_MODEL_VIEW_H +#endif // DALI_SCENE3D_MODEL_VIEW_H diff --git a/dali-scene3d/public-api/file.list b/dali-scene3d/public-api/file.list new file mode 100644 index 0000000..59ce588 --- /dev/null +++ b/dali-scene3d/public-api/file.list @@ -0,0 +1,33 @@ +set(scene3d_public_api_dir "${scene3d_dir}/public-api") + +set(scene3d_src_files ${scene3d_src_files} + ${scene3d_public_api_dir}/controls/model-view/model-view.cpp + ${scene3d_public_api_dir}/loader/alpha-function-helper.cpp + ${scene3d_public_api_dir}/loader/animated-property.cpp + ${scene3d_public_api_dir}/loader/animation-definition.cpp + ${scene3d_public_api_dir}/loader/blend-shape-details.cpp + ${scene3d_public_api_dir}/loader/camera-parameters.cpp + ${scene3d_public_api_dir}/loader/cube-data.cpp + ${scene3d_public_api_dir}/loader/cube-loader.cpp + ${scene3d_public_api_dir}/loader/cube-map-loader.cpp + ${scene3d_public_api_dir}/loader/customization.cpp + ${scene3d_public_api_dir}/loader/dli-loader.cpp + ${scene3d_public_api_dir}/loader/environment-definition.cpp + ${scene3d_public_api_dir}/loader/facial-animation-loader.cpp + ${scene3d_public_api_dir}/loader/gltf2-loader.cpp + ${scene3d_public_api_dir}/loader/ktx-loader.cpp + ${scene3d_public_api_dir}/loader/material-definition.cpp + ${scene3d_public_api_dir}/loader/matrix-stack.cpp + ${scene3d_public_api_dir}/loader/mesh-definition.cpp + ${scene3d_public_api_dir}/loader/node-definition.cpp + ${scene3d_public_api_dir}/loader/parse-renderer-state.cpp + ${scene3d_public_api_dir}/loader/renderer-state.cpp + ${scene3d_public_api_dir}/loader/resource-bundle.cpp + ${scene3d_public_api_dir}/loader/scene-definition.cpp + ${scene3d_public_api_dir}/loader/shader-definition.cpp + ${scene3d_public_api_dir}/loader/shader-definition-factory.cpp + ${scene3d_public_api_dir}/loader/skinning-details.cpp + ${scene3d_public_api_dir}/loader/string-callback.cpp + ${scene3d_public_api_dir}/loader/utils.cpp + ${scene3d_public_api_dir}/loader/view-projection.cpp +) \ No newline at end of file diff --git a/dali-scene-loader/public-api/alpha-function-helper.cpp b/dali-scene3d/public-api/loader/alpha-function-helper.cpp similarity index 90% rename from dali-scene-loader/public-api/alpha-function-helper.cpp rename to dali-scene3d/public-api/loader/alpha-function-helper.cpp index b5168e0..1ac61ee 100644 --- a/dali-scene-loader/public-api/alpha-function-helper.cpp +++ b/dali-scene3d/public-api/loader/alpha-function-helper.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,14 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/alpha-function-helper.h" +#include "dali-scene3d/public-api/loader/alpha-function-helper.h" #include namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -65,5 +67,6 @@ void RegisterAlphaFunction(const std::string& name, AlphaFunction alphaFn) "Function with given key already exists."); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/alpha-function-helper.h b/dali-scene3d/public-api/loader/alpha-function-helper.h similarity index 63% rename from dali-scene-loader/public-api/alpha-function-helper.h rename to dali-scene3d/public-api/loader/alpha-function-helper.h index a524b81..d421a3e 100644 --- a/dali-scene-loader/public-api/alpha-function-helper.h +++ b/dali-scene3d/public-api/loader/alpha-function-helper.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_ALPHA_FUNCTION_HELPER_H_ -#define DALI_SCENE_LOADER_ALPHA_FUNCTION_HELPER_H_ +#ifndef DALI_SCENE3D_LOADER_ALPHA_FUNCTION_HELPER_H_ +#define DALI_SCENE3D_LOADER_ALPHA_FUNCTION_HELPER_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,28 +17,31 @@ * */ -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" #include #include "dali/public-api/animation/alpha-function.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @return Given a name, provide a AlphaFunction; if the name was not * recognised, get the default one. */ -AlphaFunction DALI_SCENE_LOADER_API GetAlphaFunction(const std::string& name, bool* found = nullptr); +AlphaFunction DALI_SCENE3D_API GetAlphaFunction(const std::string& name, bool* found = nullptr); /** * @brief Registers an alpha function only if one with the same @a name has * not yet been registered. Throws Exception the name isn't unique. */ -void DALI_SCENE_LOADER_API RegisterAlphaFunction(const std::string& name, AlphaFunction alphaFn) noexcept(false); +void DALI_SCENE3D_API RegisterAlphaFunction(const std::string& name, AlphaFunction alphaFn) noexcept(false); -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_ALPHA_FUNCTION_HELPER_H_ +#endif //DALI_SCENE3D_LOADER_ALPHA_FUNCTION_HELPER_H_ diff --git a/dali-scene-loader/public-api/animated-property.cpp b/dali-scene3d/public-api/loader/animated-property.cpp similarity index 85% rename from dali-scene-loader/public-api/animated-property.cpp rename to dali-scene3d/public-api/loader/animated-property.cpp index 3d1542d..5f15815 100644 --- a/dali-scene-loader/public-api/animated-property.cpp +++ b/dali-scene3d/public-api/loader/animated-property.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/animated-property.h" +#include "dali-scene3d/public-api/loader/animated-property.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { void AnimatedProperty::Animate(Animation& anim, GetActor getActor) { @@ -43,5 +45,6 @@ void AnimatedProperty::Animate(Animation& anim, GetActor getActor) } } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/animated-property.h b/dali-scene3d/public-api/loader/animated-property.h similarity index 87% rename from dali-scene-loader/public-api/animated-property.h rename to dali-scene3d/public-api/loader/animated-property.h index 085b977..6433d5c 100644 --- a/dali-scene-loader/public-api/animated-property.h +++ b/dali-scene3d/public-api/loader/animated-property.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_ANIMATED_PROPERTY_H -#define DALI_SCENE_LOADER_ANIMATED_PROPERTY_H +#ifndef DALI_SCENE3D_LOADER_ANIMATED_PROPERTY_H +#define DALI_SCENE3D_LOADER_ANIMATED_PROPERTY_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include @@ -29,7 +29,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief Intermediate representation for a property that's given to @@ -38,7 +40,7 @@ namespace SceneLoader * changing properties (e.g. from the SDK) requires the whole Animation * object to be recreated with all of its properties (incl. modifications). */ -struct DALI_SCENE_LOADER_API AnimatedProperty +struct DALI_SCENE3D_API AnimatedProperty { public: // METHODS /** @@ -90,7 +92,8 @@ public: // DATA TimePeriod mTimePeriod = TimePeriod(0.f); }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_ANIMATED_PROPERTY_H +#endif //DALI_SCENE3D_LOADER_ANIMATED_PROPERTY_H diff --git a/dali-scene-loader/public-api/animation-definition.cpp b/dali-scene3d/public-api/loader/animation-definition.cpp similarity index 92% rename from dali-scene-loader/public-api/animation-definition.cpp rename to dali-scene3d/public-api/loader/animation-definition.cpp index 850dd00..6f24d9e 100644 --- a/dali-scene-loader/public-api/animation-definition.cpp +++ b/dali-scene3d/public-api/loader/animation-definition.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/animation-definition.h" +#include "dali-scene3d/public-api/loader/animation-definition.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { const float AnimationDefinition::DEFAULT_DURATION_SECONDS = 1.f; const float AnimationDefinition::MIN_DURATION_SECONDS = 1e-2f; @@ -83,5 +85,6 @@ AnimationDefinition& AnimationDefinition::operator=(AnimationDefinition&& other) return *this; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/animation-definition.h b/dali-scene3d/public-api/loader/animation-definition.h similarity index 84% rename from dali-scene-loader/public-api/animation-definition.h rename to dali-scene3d/public-api/loader/animation-definition.h index ea0dcb9..cb8e5db 100644 --- a/dali-scene-loader/public-api/animation-definition.h +++ b/dali-scene3d/public-api/loader/animation-definition.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_ANIMATION_DEFINITION_H -#define DALI_SCENE_LOADER_ANIMATION_DEFINITION_H +#ifndef DALI_SCENE3D_LOADER_ANIMATION_DEFINITION_H +#define DALI_SCENE3D_LOADER_ANIMATION_DEFINITION_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,20 @@ * */ -#include "dali-scene-loader/public-api/animated-property.h" -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" +#include "dali-scene3d/public-api/loader/animated-property.h" #include "dali/public-api/common/vector-wrapper.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief Animation handle + name + definition of properties. */ -class DALI_SCENE_LOADER_API AnimationDefinition +class DALI_SCENE3D_API AnimationDefinition { public: // STATIC // For Animations created in the SDK. @@ -81,7 +83,8 @@ struct AnimationGroupDefinition std::vector mAnimations; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_ANIMATION_DEFINITION_H +#endif //DALI_SCENE3D_LOADER_ANIMATION_DEFINITION_H diff --git a/dali-scene-loader/public-api/blend-shape-details.cpp b/dali-scene3d/public-api/loader/blend-shape-details.cpp similarity index 93% rename from dali-scene-loader/public-api/blend-shape-details.cpp rename to dali-scene3d/public-api/loader/blend-shape-details.cpp index 110f28c..01601f9 100644 --- a/dali-scene-loader/public-api/blend-shape-details.cpp +++ b/dali-scene3d/public-api/loader/blend-shape-details.cpp @@ -17,18 +17,20 @@ */ // FILE HEADER -#include +#include // EXTERNAL INCLUDES #include #include // INTERNAL INCLUDES -#include +#include namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { const std::string BlendShapes::NUMBER_OF_BLEND_SHAPES("uNumberOfBlendShapes"); const std::string BlendShapes::UNNORMALIZE_FACTOR("uBlendShapeUnnormalizeFactor"); @@ -83,5 +85,6 @@ void BlendShapes::ConfigureProperties(const std::pair @@ -27,12 +27,14 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { struct MeshDefinition; struct MeshGeometry; -struct DALI_SCENE_LOADER_API BlendShapes +struct DALI_SCENE3D_API BlendShapes { enum class Version { @@ -71,7 +73,8 @@ struct DALI_SCENE_LOADER_API BlendShapes BlendShapes() = delete; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_BLEND_SHAPE_DETAILS_H +#endif // DALI_SCENE3D_LOADER_BLEND_SHAPE_DETAILS_H diff --git a/dali-scene-loader/public-api/camera-parameters.cpp b/dali-scene3d/public-api/loader/camera-parameters.cpp similarity index 96% rename from dali-scene-loader/public-api/camera-parameters.cpp rename to dali-scene3d/public-api/loader/camera-parameters.cpp index d895255..5207a27 100644 --- a/dali-scene-loader/public-api/camera-parameters.cpp +++ b/dali-scene3d/public-api/loader/camera-parameters.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,15 +14,17 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/camera-parameters.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/camera-parameters.h" +#include "dali-scene3d/public-api/loader/utils.h" #include "dali/integration-api/debug.h" #include "dali/public-api/actors/camera-actor.h" #include "dali/public-api/math/quaternion.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -222,5 +224,6 @@ void CameraParameters::ConfigureCamera(CameraActor& camera) const camera.SetProperty(Actor::Property::SCALE, camScale); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/camera-parameters.h b/dali-scene3d/public-api/loader/camera-parameters.h similarity index 76% rename from dali-scene-loader/public-api/camera-parameters.h rename to dali-scene3d/public-api/loader/camera-parameters.h index 06370fc..74d6eec 100644 --- a/dali-scene-loader/public-api/camera-parameters.h +++ b/dali-scene3d/public-api/loader/camera-parameters.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_CAMERA_PARAMETERS_H -#define DALI_SCENE_LOADER_CAMERA_PARAMETERS_H +#ifndef DALI_SCENE3D_LOADER_CAMERA_PARAMETERS_H +#define DALI_SCENE3D_LOADER_CAMERA_PARAMETERS_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" -#include "dali-scene-loader/public-api/view-projection.h" +#include "dali-scene3d/public-api/api.h" +#include "dali-scene3d/public-api/loader/view-projection.h" // EXTERNAL INCLUDES #include "dali/public-api/math/matrix.h" @@ -29,9 +29,11 @@ namespace Dali { class CameraActor; -namespace SceneLoader +namespace Scene3D { -struct DALI_SCENE_LOADER_API CameraParameters +namespace Loader +{ +struct DALI_SCENE3D_API CameraParameters { Matrix matrix = Matrix::IDENTITY; Vector4 orthographicSize = Vector4{-1.f, 1.f, 1.f, -1.f}; @@ -53,13 +55,14 @@ struct DALI_SCENE_LOADER_API CameraParameters /** * @brief Configures the camera in the way that it is supposed to be used with - * scene-loader scenes. This means inverted Y and a rotation of 180 degrees + * scene3d scenes. This means inverted Y and a rotation of 180 degrees * along the Y axis, plus whatever the parameters define. */ void ConfigureCamera(CameraActor& camera) const; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_CAMERA_PARAMETERS_H +#endif // DALI_SCENE3D_LOADER_CAMERA_PARAMETERS_H diff --git a/dali-scene-loader/public-api/cube-data.cpp b/dali-scene3d/public-api/loader/cube-data.cpp similarity index 91% rename from dali-scene-loader/public-api/cube-data.cpp rename to dali-scene3d/public-api/loader/cube-data.cpp index b87507e..2714cc8 100644 --- a/dali-scene-loader/public-api/cube-data.cpp +++ b/dali-scene3d/public-api/loader/cube-data.cpp @@ -16,16 +16,17 @@ */ // FILE HEADER -#include "dali-scene-loader/public-api/cube-data.h" +#include "dali-scene3d/public-api/loader/cube-data.h" // EXTERNAL INCLUDES #include "dali/public-api/rendering/texture.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { - Texture CubeData::CreateTexture() const { Texture texture = Texture::New(TextureType::TEXTURE_CUBE, data[0][0].GetPixelFormat(), data[0][0].GetWidth(), data[0][0].GetHeight()); @@ -48,5 +49,6 @@ Texture CubeData::CreateTexture() const return texture; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/cube-data.h b/dali-scene3d/public-api/loader/cube-data.h similarity index 80% rename from dali-scene-loader/public-api/cube-data.h rename to dali-scene3d/public-api/loader/cube-data.h index 94c34de..961e0b2 100644 --- a/dali-scene-loader/public-api/cube-data.h +++ b/dali-scene3d/public-api/loader/cube-data.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_CUBE_DATA_H -#define DALI_SCENE_LOADER_CUBE_DATA_H +#ifndef DALI_SCENE3D_LOADER_CUBE_DATA_H +#define DALI_SCENE3D_LOADER_CUBE_DATA_H /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. * @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include "dali/public-api/common/vector-wrapper.h" @@ -27,12 +27,14 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief Stores the pixel data objects for each face of the cube texture and their mipmaps. */ -class DALI_SCENE_LOADER_API CubeData +class DALI_SCENE3D_API CubeData { public: /** @@ -45,7 +47,8 @@ public: std::vector > data; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_CUBE_DATA_H +#endif // DALI_SCENE3D_LOADER_CUBE_DATA_H diff --git a/dali-scene-loader/public-api/cube-loader.cpp b/dali-scene3d/public-api/loader/cube-loader.cpp similarity index 97% rename from dali-scene-loader/public-api/cube-loader.cpp rename to dali-scene3d/public-api/loader/cube-loader.cpp index 4fbdbc9..7573421 100644 --- a/dali-scene-loader/public-api/cube-loader.cpp +++ b/dali-scene3d/public-api/loader/cube-loader.cpp @@ -16,7 +16,7 @@ */ // FILE HEADER -#include +#include // EXTERNAL INCLUDES #include @@ -87,7 +87,9 @@ PixelData GetCubeFace(Devel::PixelBuffer pixelBuffer, uint32_t faceIndex, CubeTy } } // namespace -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { bool LoadCubeData(const std::string& path, CubeData& cubedata) { @@ -147,5 +149,6 @@ bool LoadCubeData(const std::string& path, CubeData& cubedata) return false; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/cube-loader.h b/dali-scene3d/public-api/loader/cube-loader.h similarity index 76% rename from dali-scene-loader/public-api/cube-loader.h rename to dali-scene3d/public-api/loader/cube-loader.h index 535d228..37b30b2 100644 --- a/dali-scene-loader/public-api/cube-loader.h +++ b/dali-scene3d/public-api/loader/cube-loader.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_CUBE_LOADER_H -#define DALI_SCENE_LOADER_CUBE_LOADER_H +#ifndef DALI_SCENE3D_LOADER_CUBE_LOADER_H +#define DALI_SCENE3D_LOADER_CUBE_LOADER_H /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. * @@ -18,14 +18,15 @@ */ // INTERNAL INCLUDES -#include -#include +#include +#include namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { - /** * @brief Loads cube map data texture from a cube style image file. * @@ -35,7 +36,8 @@ namespace SceneLoader */ bool LoadCubeData(const std::string& path, CubeData& cubedata); -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_CUBE_LOADER_H +#endif // DALI_SCENE3D_LOADER_CUBE_LOADER_H diff --git a/dali-scene-loader/public-api/cube-map-loader.cpp b/dali-scene3d/public-api/loader/cube-map-loader.cpp similarity index 72% rename from dali-scene-loader/public-api/cube-map-loader.cpp rename to dali-scene3d/public-api/loader/cube-map-loader.cpp index b11d297..c4aae09 100644 --- a/dali-scene-loader/public-api/cube-map-loader.cpp +++ b/dali-scene3d/public-api/loader/cube-map-loader.cpp @@ -16,11 +16,11 @@ */ // FILE HEADER -#include +#include // INTERNAL INCLUDES -#include -#include +#include +#include // EXTERNAL INCLUDES #include @@ -29,22 +29,22 @@ namespace Dali { namespace { - const std::string_view KTX_EXTENSION = ".ktx"; - } -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { - bool LoadCubeMapData(const std::string& path, CubeData& cubedata) { std::filesystem::path modelPath(path); std::string extension = modelPath.extension(); std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower); - return (extension == KTX_EXTENSION) ? SceneLoader::LoadKtxData(path, cubedata) : SceneLoader::LoadCubeData(path, cubedata); + return (extension == KTX_EXTENSION) ? Dali::Scene3D::Loader::LoadKtxData(path, cubedata) : Dali::Scene3D::Loader::LoadCubeData(path, cubedata); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/cube-map-loader.h b/dali-scene3d/public-api/loader/cube-map-loader.h similarity index 75% rename from dali-scene-loader/public-api/cube-map-loader.h rename to dali-scene3d/public-api/loader/cube-map-loader.h index 7b85a98..ec7fd24 100644 --- a/dali-scene-loader/public-api/cube-map-loader.h +++ b/dali-scene3d/public-api/loader/cube-map-loader.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_CUBE_MAP_LOADER_H -#define DALI_SCENE_LOADER_CUBE_MAP_LOADER_H +#ifndef DALI_SCENE3D_LOADER_CUBE_MAP_LOADER_H +#define DALI_SCENE3D_LOADER_CUBE_MAP_LOADER_H /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. * @@ -18,14 +18,15 @@ */ // INTERNAL INCLUDES -#include -#include +#include +#include namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { - /** * @brief Loads cube map data texture from a cube map file. * @@ -35,7 +36,8 @@ namespace SceneLoader */ bool LoadCubeMapData(const std::string& path, CubeData& cubedata); -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_CUBE_MAP_LOADER_H +#endif // DALI_SCENE3D_LOADER_CUBE_MAP_LOADER_H diff --git a/dali-scene-loader/public-api/customization.cpp b/dali-scene3d/public-api/loader/customization.cpp similarity index 92% rename from dali-scene-loader/public-api/customization.cpp rename to dali-scene3d/public-api/loader/customization.cpp index ebf59c0..f48c191 100644 --- a/dali-scene-loader/public-api/customization.cpp +++ b/dali-scene3d/public-api/loader/customization.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,14 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/customization.h" +#include "dali-scene3d/public-api/loader/customization.h" #include "dali/devel-api/common/map-wrapper.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { struct Customization::Map::Impl { @@ -109,5 +111,6 @@ void Customization::Choices::Clear() mImpl->mOptions.clear(); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/customization.h b/dali-scene3d/public-api/loader/customization.h similarity index 86% rename from dali-scene-loader/public-api/customization.h rename to dali-scene3d/public-api/loader/customization.h index cdac2fc..667cada 100644 --- a/dali-scene-loader/public-api/customization.h +++ b/dali-scene3d/public-api/loader/customization.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_CUSTOMIZATION_STATE_H_ -#define DALI_SCENE_LOADER_CUSTOMIZATION_STATE_H_ +#ifndef DALI_SCENE3D_LOADER_CUSTOMIZATION_STATE_H_ +#define DALI_SCENE3D_LOADER_CUSTOMIZATION_STATE_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include @@ -27,14 +27,16 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief Offers a description of an aspect of the scene that can be customized: * the number of options, and the name of the nodes that are registered * for the tag, whose children will be shown / hidden based on selection. */ -struct DALI_SCENE_LOADER_API Customization +struct DALI_SCENE3D_API Customization { using Tag = std::string; using OptionType = uint32_t; @@ -42,7 +44,7 @@ struct DALI_SCENE_LOADER_API Customization /** * @brief A mapping of customizations to tags. */ - struct DALI_SCENE_LOADER_API Map + struct DALI_SCENE3D_API Map { Map(); ~Map(); @@ -81,7 +83,7 @@ struct DALI_SCENE_LOADER_API Customization /** * @brief A mapping of choices - indices of children of customization nodes to use - to tags. */ - struct DALI_SCENE_LOADER_API Choices + struct DALI_SCENE3D_API Choices { Choices(); ~Choices(); @@ -117,7 +119,8 @@ struct DALI_SCENE_LOADER_API Customization std::vector nodes; // to apply option to. }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_CUSTOMIZATION_STATE_H_ +#endif //DALI_SCENE3D_LOADER_CUSTOMIZATION_STATE_H_ diff --git a/dali-scene-loader/public-api/dli-loader.cpp b/dali-scene3d/public-api/loader/dli-loader.cpp similarity index 98% rename from dali-scene-loader/public-api/dli-loader.cpp rename to dali-scene3d/public-api/loader/dli-loader.cpp index 2c8bd97..ca28c83 100644 --- a/dali-scene-loader/public-api/dli-loader.cpp +++ b/dali-scene3d/public-api/loader/dli-loader.cpp @@ -16,7 +16,7 @@ */ // CLASS HEADER -#include "dali-scene-loader/public-api/dli-loader.h" +#include "dali-scene3d/public-api/loader/dli-loader.h" // EXTERNAL INCLUDES #include @@ -30,18 +30,18 @@ #include "dali/public-api/object/property-array.h" // INTERNAL INCLUDES -#include "dali-scene-loader/internal/json-util.h" -#include "dali-scene-loader/public-api/alpha-function-helper.h" -#include "dali-scene-loader/public-api/animation-definition.h" -#include "dali-scene-loader/public-api/blend-shape-details.h" -#include "dali-scene-loader/public-api/camera-parameters.h" -#include "dali-scene-loader/public-api/ktx-loader.h" -#include "dali-scene-loader/public-api/light-parameters.h" -#include "dali-scene-loader/public-api/load-result.h" -#include "dali-scene-loader/public-api/parse-renderer-state.h" -#include "dali-scene-loader/public-api/scene-definition.h" -#include "dali-scene-loader/public-api/skinning-details.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/internal/loader/json-util.h" +#include "dali-scene3d/public-api/loader/alpha-function-helper.h" +#include "dali-scene3d/public-api/loader/animation-definition.h" +#include "dali-scene3d/public-api/loader/blend-shape-details.h" +#include "dali-scene3d/public-api/loader/camera-parameters.h" +#include "dali-scene3d/public-api/loader/ktx-loader.h" +#include "dali-scene3d/public-api/loader/light-parameters.h" +#include "dali-scene3d/public-api/loader/load-result.h" +#include "dali-scene3d/public-api/loader/parse-renderer-state.h" +#include "dali-scene3d/public-api/loader/scene-definition.h" +#include "dali-scene3d/public-api/loader/skinning-details.h" +#include "dali-scene3d/public-api/loader/utils.h" #define DLI_0_1_COMPATIBILITY @@ -49,7 +49,9 @@ namespace Dali { using namespace Toolkit; -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace rs = RendererState; @@ -1806,5 +1808,6 @@ void DliLoader::Impl::GetLightParameters(std::vector& lights) c } } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/dli-loader.h b/dali-scene3d/public-api/loader/dli-loader.h similarity index 88% rename from dali-scene-loader/public-api/dli-loader.h rename to dali-scene3d/public-api/loader/dli-loader.h index b46a7bf..c516f9a 100644 --- a/dali-scene-loader/public-api/dli-loader.h +++ b/dali-scene3d/public-api/loader/dli-loader.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_DLI_LOADER_H -#define DALI_SCENE_LOADER_DLI_LOADER_H +#ifndef DALI_SCENE3D_LOADER_DLI_LOADER_H +#define DALI_SCENE3D_LOADER_DLI_LOADER_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,18 +18,20 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/animation-definition.h" -#include "dali-scene-loader/public-api/api.h" -#include "dali-scene-loader/public-api/customization.h" -#include "dali-scene-loader/public-api/index.h" -#include "dali-scene-loader/public-api/string-callback.h" +#include "dali-scene3d/public-api/api.h" +#include "dali-scene3d/public-api/loader/animation-definition.h" +#include "dali-scene3d/public-api/loader/customization.h" +#include "dali-scene3d/public-api/loader/index.h" +#include "dali-scene3d/public-api/loader/string-callback.h" // EXTERNAL INCLUDES #include "dali/public-api/common/vector-wrapper.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { typedef std::pair Metadata; @@ -43,7 +45,7 @@ class ResourceBundle; struct NodeDefinition; class SceneDefinition; -class DALI_SCENE_LOADER_API DliLoader +class DALI_SCENE3D_API DliLoader { public: using ConvertFontCode = void (*)(const std::string& code, std::string& fontFamily, std::string& slant, std::string& weight, float& size); @@ -135,7 +137,8 @@ private: const std::unique_ptr mImpl; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_DLI_LOADER_H +#endif // DALI_SCENE3D_LOADER_DLI_LOADER_H diff --git a/dali-scene-loader/public-api/environment-definition.cpp b/dali-scene3d/public-api/loader/environment-definition.cpp similarity index 91% rename from dali-scene-loader/public-api/environment-definition.cpp rename to dali-scene3d/public-api/loader/environment-definition.cpp index 9b09b65..173959c 100644 --- a/dali-scene-loader/public-api/environment-definition.cpp +++ b/dali-scene3d/public-api/loader/environment-definition.cpp @@ -20,9 +20,9 @@ #include // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/environment-definition.h" -#include "dali-scene-loader/public-api/utils.h" -#include "dali-scene-loader/public-api/cube-map-loader.h" +#include "dali-scene3d/public-api/loader/cube-map-loader.h" +#include "dali-scene3d/public-api/loader/environment-definition.h" +#include "dali-scene3d/public-api/loader/utils.h" namespace { @@ -35,7 +35,9 @@ std::string GetDaliImagePath() namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -99,5 +101,6 @@ EnvironmentDefinition::Textures EnvironmentDefinition::Load(RawData&& raw) const return textures; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/environment-definition.h b/dali-scene3d/public-api/loader/environment-definition.h similarity index 85% rename from dali-scene-loader/public-api/environment-definition.h rename to dali-scene3d/public-api/loader/environment-definition.h index 35d6ee9..57cef30 100644 --- a/dali-scene-loader/public-api/environment-definition.h +++ b/dali-scene3d/public-api/loader/environment-definition.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_ENVIRONMENT_DEFINITION_H -#define DALI_SCENE_LOADER_ENVIRONMENT_DEFINITION_H +#ifndef DALI_SCENE3D_LOADER_ENVIRONMENT_DEFINITION_H +#define DALI_SCENE3D_LOADER_ENVIRONMENT_DEFINITION_H /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. * @@ -18,8 +18,8 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" -#include "dali-scene-loader/public-api/cube-data.h" +#include "dali-scene3d/public-api/api.h" +#include "dali-scene3d/public-api/loader/cube-data.h" // EXTERNAL INCLUDES #include "dali/public-api/math/quaternion.h" @@ -27,13 +27,15 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief Defines an environment map with either or both of radiance * and irradiance maps. */ -struct DALI_SCENE_LOADER_API EnvironmentDefinition +struct DALI_SCENE3D_API EnvironmentDefinition { struct Textures { @@ -87,7 +89,8 @@ public: // DATA bool mUseBrdfTexture = false; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_ENVIRONMENT_DEFINITION_H +#endif //DALI_SCENE3D_LOADER_ENVIRONMENT_DEFINITION_H diff --git a/dali-scene-loader/public-api/facial-animation-loader.cpp b/dali-scene3d/public-api/loader/facial-animation-loader.cpp similarity index 93% rename from dali-scene-loader/public-api/facial-animation-loader.cpp rename to dali-scene3d/public-api/loader/facial-animation-loader.cpp index 6c92d6a..2414b1b 100644 --- a/dali-scene-loader/public-api/facial-animation-loader.cpp +++ b/dali-scene3d/public-api/loader/facial-animation-loader.cpp @@ -16,15 +16,15 @@ */ // FILE HEADER -#include +#include // EXTERNAL INCLUDES #include // INTERNAL INCLUDES -#include -#include -#include +#include +#include +#include namespace js = json; @@ -89,7 +89,9 @@ const auto FACIAL_ANIMATION_READER = std::move(js::Reader() } // unnamed namespace -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { AnimationDefinition LoadFacialAnimation(const std::string& url) { @@ -175,5 +177,6 @@ AnimationDefinition LoadFacialAnimation(const std::string& url) return animationDefinition; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/facial-animation-loader.h b/dali-scene3d/public-api/loader/facial-animation-loader.h similarity index 67% rename from dali-scene-loader/public-api/facial-animation-loader.h rename to dali-scene3d/public-api/loader/facial-animation-loader.h index 4095b7c..b61d0a0 100644 --- a/dali-scene-loader/public-api/facial-animation-loader.h +++ b/dali-scene3d/public-api/loader/facial-animation-loader.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_FACIAL_ANIMATION_LOADER_H -#define DALI_SCENE_LOADER_FACIAL_ANIMATION_LOADER_H +#ifndef DALI_SCENE3D_LOADER_FACIAL_ANIMATION_LOADER_H +#define DALI_SCENE3D_LOADER_FACIAL_ANIMATION_LOADER_H /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. @@ -19,9 +19,9 @@ */ // INTERNAL INCLUDES -#include +#include -namespace Dali::SceneLoader +namespace Dali::Scene3D::Loader { /** * @brief Loads a facial animation encoded in a json file in the given @p url. @@ -32,7 +32,7 @@ namespace Dali::SceneLoader * * @return An animation definition. */ -DALI_SCENE_LOADER_API AnimationDefinition LoadFacialAnimation(const std::string& url); -} // namespace Dali::SceneLoader +DALI_SCENE3D_API AnimationDefinition LoadFacialAnimation(const std::string& url); +} // namespace Dali::Scene3D::Loader -#endif // DALI_SCENE_LOADER_FACIAL_ANIMATION_LOADER_H +#endif // DALI_SCENE3D_LOADER_FACIAL_ANIMATION_LOADER_H diff --git a/dali-scene-loader/public-api/gltf2-loader.cpp b/dali-scene3d/public-api/loader/gltf2-loader.cpp similarity index 98% rename from dali-scene-loader/public-api/gltf2-loader.cpp rename to dali-scene3d/public-api/loader/gltf2-loader.cpp index 8af87a1..918bb35 100644 --- a/dali-scene-loader/public-api/gltf2-loader.cpp +++ b/dali-scene3d/public-api/loader/gltf2-loader.cpp @@ -14,14 +14,14 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/gltf2-loader.h" +#include "dali-scene3d/public-api/loader/gltf2-loader.h" #include -#include "dali-scene-loader/internal/gltf2-asset.h" -#include "dali-scene-loader/public-api/load-result.h" -#include "dali-scene-loader/public-api/resource-bundle.h" -#include "dali-scene-loader/public-api/scene-definition.h" -#include "dali-scene-loader/public-api/shader-definition-factory.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/internal/loader/gltf2-asset.h" +#include "dali-scene3d/public-api/loader/load-result.h" +#include "dali-scene3d/public-api/loader/resource-bundle.h" +#include "dali-scene3d/public-api/loader/scene-definition.h" +#include "dali-scene3d/public-api/loader/shader-definition-factory.h" +#include "dali-scene3d/public-api/loader/utils.h" #include "dali/public-api/math/quaternion.h" #define ENUM_STRING_MAPPING(t, x) \ @@ -34,7 +34,9 @@ namespace js = json; namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -911,7 +913,7 @@ float LoadKeyFrames(const std::string& path, const gt::Animation::Channel& chann return duration; } -float LoadBlendShapeKeyFrames(const std::string& path, const gt::Animation::Channel& channel, const std::string& nodeName, uint32_t& propertyIndex, std::vector& properties) +float LoadBlendShapeKeyFrames(const std::string& path, const gt::Animation::Channel& channel, const std::string& nodeName, uint32_t& propertyIndex, std::vector& properties) { const gltf2::Accessor& input = *channel.mSampler->mInput; const gltf2::Accessor& output = *channel.mSampler->mOutput; @@ -1169,7 +1171,7 @@ void SetDefaultEnvironmentMap(const gt::Document& doc, ConversionContext& cctx) { EnvironmentDefinition envDef; envDef.mUseBrdfTexture = true; - envDef.mIblIntensity = DEFAULT_INTENSITY; + envDef.mIblIntensity = DEFAULT_INTENSITY; cctx.mOutput.mResources.mEnvironmentMaps.push_back({std::move(envDef), EnvironmentDefinition::Textures()}); } @@ -1217,7 +1219,6 @@ void LoadGltfScene(const std::string& url, ShaderDefinitionFactory& shaderFactor isMRendererModel = (doc.mAsset.mGenerator.find(MRENDERER_MODEL_IDENTIFICATION) != std::string_view::npos); } - gt::SetRefReaderObject(doc); DOCUMENT_READER.Read(rootObj, doc); @@ -1236,5 +1237,6 @@ void LoadGltfScene(const std::string& url, ShaderDefinitionFactory& shaderFactor SetDefaultEnvironmentMap(doc, cctx); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/gltf2-loader.h b/dali-scene3d/public-api/loader/gltf2-loader.h similarity index 69% rename from dali-scene-loader/public-api/gltf2-loader.h rename to dali-scene3d/public-api/loader/gltf2-loader.h index 9871ec0..765cd40 100644 --- a/dali-scene-loader/public-api/gltf2-loader.h +++ b/dali-scene3d/public-api/loader/gltf2-loader.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_GLTF2_LOADER_H -#define DALI_SCENE_LOADER_GLTF2_LOADER_H +#ifndef DALI_SCENE3D_LOADER_GLTF2_LOADER_H +#define DALI_SCENE3D_LOADER_GLTF2_LOADER_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +18,16 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { struct CameraParameters; struct LoadResult; @@ -36,9 +38,10 @@ class ShaderDefinitionFactory; * @note Will throw std::runtime_error for JSON entities with types mismatching expectations, carrying * invalid values, or I/O errors. */ -DALI_SCENE_LOADER_API void LoadGltfScene(const std::string& url, ShaderDefinitionFactory& shaderFactory, LoadResult& params); +DALI_SCENE3D_API void LoadGltfScene(const std::string& url, ShaderDefinitionFactory& shaderFactory, LoadResult& params); -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_GLTF2_LOADER_H +#endif //DALI_SCENE3D_LOADER_GLTF2_LOADER_H diff --git a/dali-scene-loader/public-api/index.h b/dali-scene3d/public-api/loader/index.h similarity index 72% rename from dali-scene-loader/public-api/index.h rename to dali-scene3d/public-api/loader/index.h index 9ad5fc2..3048def 100644 --- a/dali-scene-loader/public-api/index.h +++ b/dali-scene3d/public-api/loader/index.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_INDEX_H_ -#define DALI_SCENE_LOADER_INDEX_H_ +#ifndef DALI_SCENE3D_LOADER_INDEX_H_ +#define DALI_SCENE3D_LOADER_INDEX_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,20 +18,23 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { using Index = uint32_t; constexpr Index INVALID_INDEX = static_cast(-1); -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_INDEX_H_ +#endif //DALI_SCENE3D_LOADER_INDEX_H_ diff --git a/dali-scene-loader/public-api/ktx-loader.cpp b/dali-scene3d/public-api/loader/ktx-loader.cpp similarity index 98% rename from dali-scene-loader/public-api/ktx-loader.cpp rename to dali-scene3d/public-api/loader/ktx-loader.cpp index a74c50c..c2e7159 100644 --- a/dali-scene-loader/public-api/ktx-loader.cpp +++ b/dali-scene3d/public-api/loader/ktx-loader.cpp @@ -16,12 +16,12 @@ */ // FILE HEADER -#include +#include // EXTERNAL INCLUDES +#include #include #include -#include namespace Dali { @@ -44,7 +44,9 @@ void FreeBuffer(uint8_t* buffer) } } // namespace -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { struct KtxFileHeader { @@ -256,5 +258,6 @@ bool LoadKtxData(const std::string& path, CubeData& cubedata) return true; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/ktx-loader.h b/dali-scene3d/public-api/loader/ktx-loader.h similarity index 76% rename from dali-scene-loader/public-api/ktx-loader.h rename to dali-scene3d/public-api/loader/ktx-loader.h index 3a8b0e1..63d27a6 100644 --- a/dali-scene-loader/public-api/ktx-loader.h +++ b/dali-scene3d/public-api/loader/ktx-loader.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_KTX_LOADER_H -#define DALI_SCENE_LOADER_KTX_LOADER_H +#ifndef DALI_SCENE3D_LOADER_KTX_LOADER_H +#define DALI_SCENE3D_LOADER_KTX_LOADER_H /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. * @@ -18,14 +18,15 @@ */ // INTERNAL INCLUDES -#include -#include +#include +#include namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { - /** * @brief Loads cube map data texture from a ktx file. * @@ -35,7 +36,8 @@ namespace SceneLoader */ bool LoadKtxData(const std::string& path, CubeData& cubedata); -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_KTX_LOADER_H +#endif // DALI_SCENE3D_LOADER_KTX_LOADER_H diff --git a/dali-scene-loader/public-api/light-parameters.h b/dali-scene3d/public-api/loader/light-parameters.h similarity index 71% rename from dali-scene-loader/public-api/light-parameters.h rename to dali-scene3d/public-api/loader/light-parameters.h index 11b014b..2fde52e 100644 --- a/dali-scene-loader/public-api/light-parameters.h +++ b/dali-scene3d/public-api/loader/light-parameters.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_LIGHT_PARAMETERS_H -#define DALI_SCENE_LOADER_LIGHT_PARAMETERS_H +#ifndef DALI_SCENE3D_LOADER_LIGHT_PARAMETERS_H +#define DALI_SCENE3D_LOADER_LIGHT_PARAMETERS_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include @@ -27,9 +27,11 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D { -struct DALI_SCENE_LOADER_API LightParameters +namespace Loader +{ +struct DALI_SCENE3D_API LightParameters { Matrix transform; @@ -40,7 +42,8 @@ struct DALI_SCENE_LOADER_API LightParameters float orthographicSize; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_LIGHT_PARAMETERS_H +#endif // DALI_SCENE3D_LOADER_LIGHT_PARAMETERS_H diff --git a/dali-scene-loader/public-api/load-result.h b/dali-scene3d/public-api/loader/load-result.h similarity index 74% rename from dali-scene-loader/public-api/load-result.h rename to dali-scene3d/public-api/loader/load-result.h index 4ed3ff5..a9428eb 100644 --- a/dali-scene-loader/public-api/load-result.h +++ b/dali-scene3d/public-api/loader/load-result.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_OUTPUT_H -#define DALI_SCENE_LOADER_OUTPUT_H +#ifndef DALI_SCENE3D_LOADER_OUTPUT_H +#define DALI_SCENE3D_LOADER_OUTPUT_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +18,16 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/animation-definition.h" -#include "dali-scene-loader/public-api/api.h" -#include "dali-scene-loader/public-api/camera-parameters.h" -#include "dali-scene-loader/public-api/light-parameters.h" +#include "dali-scene3d/public-api/api.h" +#include "dali-scene3d/public-api/loader/animation-definition.h" +#include "dali-scene3d/public-api/loader/camera-parameters.h" +#include "dali-scene3d/public-api/loader/light-parameters.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { class ResourceBundle; class SceneDefinition; @@ -33,7 +35,7 @@ class SceneDefinition; /** * @brief The outputs from loading and processing a scene. */ -struct DALI_SCENE_LOADER_API LoadResult +struct DALI_SCENE3D_API LoadResult { /** * @brief The bundle to store resources in. @@ -66,7 +68,8 @@ struct DALI_SCENE_LOADER_API LoadResult std::vector& mLightParameters; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_OUTPUT_H +#endif //DALI_SCENE3D_LOADER_OUTPUT_H diff --git a/dali-scene-loader/public-api/material-definition.cpp b/dali-scene3d/public-api/loader/material-definition.cpp similarity index 98% rename from dali-scene-loader/public-api/material-definition.cpp rename to dali-scene3d/public-api/loader/material-definition.cpp index 5838da1..9becc3a 100644 --- a/dali-scene-loader/public-api/material-definition.cpp +++ b/dali-scene3d/public-api/loader/material-definition.cpp @@ -16,7 +16,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/material-definition.h" +#include "dali-scene3d/public-api/loader/material-definition.h" // EXTERNAL INCLUDES #include "dali-toolkit/public-api/image-loader/sync-image-loader.h" @@ -25,7 +25,9 @@ namespace Dali { using namespace Toolkit; -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -301,5 +303,6 @@ bool MaterialDefinition::CheckTextures(uint32_t flags) const }) != mTextureStages.end(); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/material-definition.h b/dali-scene3d/public-api/loader/material-definition.h similarity index 91% rename from dali-scene-loader/public-api/material-definition.h rename to dali-scene3d/public-api/loader/material-definition.h index 2c9ed6c..d96d888 100644 --- a/dali-scene-loader/public-api/material-definition.h +++ b/dali-scene3d/public-api/loader/material-definition.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_MATERIAL_DEFINITION_H -#define DALI_SCENE_LOADER_MATERIAL_DEFINITION_H +#ifndef DALI_SCENE3D_LOADER_MATERIAL_DEFINITION_H +#define DALI_SCENE3D_LOADER_MATERIAL_DEFINITION_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,10 +18,10 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" -#include "dali-scene-loader/public-api/environment-definition.h" -#include "dali-scene-loader/public-api/index.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/api.h" +#include "dali-scene3d/public-api/loader/environment-definition.h" +#include "dali-scene3d/public-api/loader/index.h" +#include "dali-scene3d/public-api/loader/utils.h" // EXTERNAL INCLUDES #include @@ -30,12 +30,14 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief Helper enum for encoding and decoding sampler states. */ -struct DALI_SCENE_LOADER_API SamplerFlags +struct DALI_SCENE3D_API SamplerFlags { using Type = uint8_t; @@ -109,7 +111,7 @@ struct DALI_SCENE_LOADER_API SamplerFlags /** * @brief Defines a texture from a combination of an image URI and its sampler definition. */ -struct DALI_SCENE_LOADER_API TextureDefinition +struct DALI_SCENE3D_API TextureDefinition { std::string mImageUri; SamplerFlags::Type mSamplerFlags; @@ -123,7 +125,7 @@ struct DALI_SCENE_LOADER_API TextureDefinition * scene). Textures from the environment are added last when the DALi TextureSet * is being created. */ -struct DALI_SCENE_LOADER_API MaterialDefinition +struct DALI_SCENE3D_API MaterialDefinition { enum Flags : uint32_t { @@ -236,7 +238,8 @@ public: // DATA std::vector mTextureStages; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_MATERIAL_DEFINITION_H +#endif //DALI_SCENE3D_LOADER_MATERIAL_DEFINITION_H diff --git a/dali-scene-loader/public-api/matrix-stack.cpp b/dali-scene3d/public-api/loader/matrix-stack.cpp similarity index 82% rename from dali-scene-loader/public-api/matrix-stack.cpp rename to dali-scene3d/public-api/loader/matrix-stack.cpp index eb2316e..a7b8870 100644 --- a/dali-scene-loader/public-api/matrix-stack.cpp +++ b/dali-scene3d/public-api/loader/matrix-stack.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2021 Samsung Electronics Co., Ltd. +* Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,14 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/matrix-stack.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/matrix-stack.h" +#include "dali-scene3d/public-api/loader/utils.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { MatrixStack::MatrixStack() { @@ -61,5 +63,6 @@ void MatrixStack::PopAll() mStack.clear(); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/matrix-stack.h b/dali-scene3d/public-api/loader/matrix-stack.h similarity index 77% rename from dali-scene-loader/public-api/matrix-stack.h rename to dali-scene3d/public-api/loader/matrix-stack.h index 5c5c923..63bbc90 100644 --- a/dali-scene-loader/public-api/matrix-stack.h +++ b/dali-scene3d/public-api/loader/matrix-stack.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_MATRIX_STACK_H_ -#define DALI_SCENE_LOADER_MATRIX_STACK_H_ +#ifndef DALI_SCENE3D_LOADERER_MATRIX_STACK_H_ +#define DALI_SCENE3D_LOADERER_MATRIX_STACK_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include "dali/public-api/common/vector-wrapper.h" @@ -26,14 +26,16 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief A stack of matrices whereby each newly pushed matrix is stored * after being multiplied by the previous one (if any). * @note Current implementation reserves space for 16 matrices. */ -class DALI_SCENE_LOADER_API MatrixStack +class DALI_SCENE3D_API MatrixStack { public: MatrixStack(); @@ -48,7 +50,8 @@ private: std::vector mStack; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_MATRIX_STACK_H_ +#endif //DALI_SCENE3D_LOADERER_MATRIX_STACK_H_ diff --git a/dali-scene-loader/public-api/mesh-definition.cpp b/dali-scene3d/public-api/loader/mesh-definition.cpp similarity index 99% rename from dali-scene-loader/public-api/mesh-definition.cpp rename to dali-scene3d/public-api/loader/mesh-definition.cpp index 75b19a7..b07d0e2 100644 --- a/dali-scene-loader/public-api/mesh-definition.cpp +++ b/dali-scene3d/public-api/loader/mesh-definition.cpp @@ -16,7 +16,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/mesh-definition.h" +#include "dali-scene3d/public-api/loader/mesh-definition.h" // EXTERNAL INCLUDES #include @@ -25,7 +25,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -730,7 +732,7 @@ MeshDefinition::LoadRaw(const std::string& modelsPath) if(mColors.IsDefined()) { - uint32_t propertySize = mColors.mBlob.mElementSizeHint; + uint32_t propertySize = mColors.mBlob.mElementSizeHint; Property::Type propertyType = (propertySize == sizeof(Vector4)) ? Property::VECTOR4 : ((propertySize == sizeof(Vector3)) ? Property::VECTOR3 : Property::NONE); if(propertyType != Property::NONE) { @@ -919,5 +921,6 @@ MeshGeometry MeshDefinition::Load(RawData&& raw) const return meshGeometry; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/mesh-definition.h b/dali-scene3d/public-api/loader/mesh-definition.h similarity index 93% rename from dali-scene-loader/public-api/mesh-definition.h rename to dali-scene3d/public-api/loader/mesh-definition.h index b4b2c7d..445fbe7 100644 --- a/dali-scene-loader/public-api/mesh-definition.h +++ b/dali-scene3d/public-api/loader/mesh-definition.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_MESH_DEFINITION_H -#define DALI_SCENE_LOADER_MESH_DEFINITION_H +#ifndef DALI_SCENE3D_LOADER_MESH_DEFINITION_H +#define DALI_SCENE3D_LOADER_MESH_DEFINITION_H /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. * @@ -18,11 +18,11 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" -#include "dali-scene-loader/public-api/blend-shape-details.h" -#include "dali-scene-loader/public-api/index.h" -#include "dali-scene-loader/public-api/mesh-geometry.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/api.h" +#include "dali-scene3d/public-api/loader/blend-shape-details.h" +#include "dali-scene3d/public-api/loader/index.h" +#include "dali-scene3d/public-api/loader/mesh-geometry.h" +#include "dali-scene3d/public-api/loader/utils.h" // EXTERNAL INCLUDES #include @@ -30,14 +30,16 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief Defines a mesh with its attributes, the primitive type to render it as, * and the file to load it from with the offset and length information for the * individual attribute buffers. */ -struct DALI_SCENE_LOADER_API MeshDefinition +struct DALI_SCENE3D_API MeshDefinition { using Vector = std::vector>; @@ -271,7 +273,8 @@ public: // DATA Index mSkeletonIdx = INVALID_INDEX; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_MESH_DEFINITION_H +#endif //DALI_SCENE3D_LOADER_MESH_DEFINITION_H diff --git a/dali-scene-loader/public-api/mesh-geometry.h b/dali-scene3d/public-api/loader/mesh-geometry.h similarity index 77% rename from dali-scene-loader/public-api/mesh-geometry.h rename to dali-scene3d/public-api/loader/mesh-geometry.h index 5b46e0f..331acf7 100644 --- a/dali-scene-loader/public-api/mesh-geometry.h +++ b/dali-scene3d/public-api/loader/mesh-geometry.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_MESH_GEOMETRY_H -#define DALI_SCENE_LOADER_MESH_GEOMETRY_H +#ifndef DALI_SCENE3D_LOADERER_MESH_GEOMETRY_H +#define DALI_SCENE3D_LOADERER_MESH_GEOMETRY_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include "dali/public-api/rendering/geometry.h" @@ -26,9 +26,11 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D { -struct DALI_SCENE_LOADER_API MeshGeometry +namespace Loader +{ +struct DALI_SCENE3D_API MeshGeometry { Geometry geometry; ///< The array of vertices. Texture blendShapeGeometry; ///< The array of vertices of the different blend shapes encoded inside a texture with power of two dimensions. @@ -36,7 +38,8 @@ struct DALI_SCENE_LOADER_API MeshGeometry unsigned int blendShapeBufferOffset{0}; ///< Offset used to calculate the start of each blend shape. }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_MESH_GEOMETRY_H +#endif // DALI_SCENE3D_LOADERER_MESH_GEOMETRY_H diff --git a/dali-scene-loader/public-api/node-definition.cpp b/dali-scene3d/public-api/loader/node-definition.cpp similarity index 96% rename from dali-scene-loader/public-api/node-definition.cpp rename to dali-scene3d/public-api/loader/node-definition.cpp index e8dafa8..c83fc44 100644 --- a/dali-scene-loader/public-api/node-definition.cpp +++ b/dali-scene3d/public-api/loader/node-definition.cpp @@ -16,9 +16,9 @@ */ // INTERNAL -#include "dali-scene-loader/public-api/node-definition.h" -#include "dali-scene-loader/public-api/renderer-state.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/node-definition.h" +#include "dali-scene3d/public-api/loader/renderer-state.h" +#include "dali-scene3d/public-api/loader/utils.h" namespace Dali { @@ -26,9 +26,11 @@ namespace { constexpr std::string_view IBL_INTENSITY_STRING("uIblIntensity"); constexpr std::string_view IBL_Y_DIRECTION("uYDirection"); -} +} // namespace -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { bool NodeDefinition::Renderable::GetExtents(const ResourceBundle& resources, Vector3& min, Vector3& max) const { @@ -127,7 +129,7 @@ bool NodeDefinition::GetExtents(const ResourceBundle& resources, Vector3& min, V bool ModelNode::GetExtents(const ResourceBundle& resources, Vector3& min, Vector3& max) const { - auto& mesh = resources.mMeshes[mMeshIdx]; + auto& mesh = resources.mMeshes[mMeshIdx]; uint32_t minSize = mesh.first.mPositions.mBlob.mMin.size(); uint32_t maxSize = mesh.first.mPositions.mBlob.mMax.size(); if(minSize == maxSize && minSize >= 2u && maxSize >= 2u) @@ -282,5 +284,6 @@ void ArcNode::GetEndVectorWithDiffAngle(float startAngle, float diffAngle, Vecto endVector.y = sinf(endAngle * Math::PI_OVER_180); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/node-definition.h b/dali-scene3d/public-api/loader/node-definition.h similarity index 89% rename from dali-scene-loader/public-api/node-definition.h rename to dali-scene3d/public-api/loader/node-definition.h index 7b70931..a86d7e9 100644 --- a/dali-scene-loader/public-api/node-definition.h +++ b/dali-scene3d/public-api/loader/node-definition.h @@ -1,5 +1,5 @@ -#ifndef DALI_SCENE_LOADER_NODE_DEFINITION_H_ -#define DALI_SCENE_LOADER_NODE_DEFINITION_H_ +#ifndef DALI_SCENE3D_LOADER_NODE_DEFINITION_H_ +#define DALI_SCENE3D_LOADER_NODE_DEFINITION_H_ /* * Copyright (c) 2022 Samsung Electronics Co., Ltd. * @@ -18,9 +18,9 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/customization.h" -#include "dali-scene-loader/public-api/matrix-stack.h" -#include "dali-scene-loader/public-api/resource-bundle.h" +#include "dali-scene3d/public-api/loader/customization.h" +#include "dali-scene3d/public-api/loader/matrix-stack.h" +#include "dali-scene3d/public-api/loader/resource-bundle.h" // EXTERNAL INCLUDES #include @@ -33,14 +33,16 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { class ViewProjection; /** * @brief Interface to report (const) resource ids to. */ -class DALI_SCENE_LOADER_API IResourceReceiver +class DALI_SCENE3D_API IResourceReceiver { public: virtual ~IResourceReceiver() = default; @@ -53,7 +55,7 @@ public: * @note These are supposed to be transient. Obviously, the references collected * this way must not outlive the objects that they came from. */ -class DALI_SCENE_LOADER_API IResourceReflector +class DALI_SCENE3D_API IResourceReflector { public: virtual ~IResourceReflector() = default; @@ -66,7 +68,7 @@ public: * set up after the Actors were created. The target of the constraint * is the node definition that carries it. */ -struct DALI_SCENE_LOADER_API ConstraintDefinition +struct DALI_SCENE3D_API ConstraintDefinition { std::string mProperty; ///< name of the property to constrain. Index mSourceIdx; ///< index of the node to serve as the source of the constraint. @@ -87,7 +89,7 @@ struct DALI_SCENE_LOADER_API ConstraintDefinition } }; -struct DALI_SCENE_LOADER_API Transforms +struct DALI_SCENE3D_API Transforms { MatrixStack modelStack; const ViewProjection& viewProjection; @@ -97,7 +99,7 @@ struct DALI_SCENE_LOADER_API Transforms * @brief Information about a skeleton and the shader that needs to be configured with it. * @note Multiple skeletons shalt not share the same shader. */ -struct DALI_SCENE_LOADER_API SkinningShaderConfigurationRequest +struct DALI_SCENE3D_API SkinningShaderConfigurationRequest { Index mSkeletonIdx; Shader mShader; @@ -111,7 +113,7 @@ struct DALI_SCENE_LOADER_API SkinningShaderConfigurationRequest /** * @brief Needed to configure blend shape properties. */ -struct DALI_SCENE_LOADER_API BlendshapeShaderConfigurationRequest +struct DALI_SCENE3D_API BlendshapeShaderConfigurationRequest { std::string mNodeName; Index mMeshIdx; @@ -126,7 +128,7 @@ struct DALI_SCENE_LOADER_API BlendshapeShaderConfigurationRequest /** * @brief Request for creating a constraint, output from NodeDefinition::OnCreate. */ -struct DALI_SCENE_LOADER_API ConstraintRequest +struct DALI_SCENE3D_API ConstraintRequest { const ConstraintDefinition* const mConstraint; ///< Definition of the constraint to create. Actor mTarget; ///< Target of the constraint. @@ -137,7 +139,7 @@ struct DALI_SCENE_LOADER_API ConstraintRequest * and slots for customization and rendering logic, which are mutually exclusive in the * current implementation. */ -struct DALI_SCENE_LOADER_API NodeDefinition +struct DALI_SCENE3D_API NodeDefinition { public: // TYPES using Vector = std::vector; @@ -154,7 +156,7 @@ public: // TYPES std::vector mBlendshapeRequests; }; - class DALI_SCENE_LOADER_API Renderable + class DALI_SCENE3D_API Renderable { public: // DATA Index mShaderIdx = INVALID_INDEX; @@ -268,7 +270,7 @@ public: // DATA Index mParentIdx = INVALID_INDEX; }; -class DALI_SCENE_LOADER_API ModelNode : public NodeDefinition::Renderable +class DALI_SCENE3D_API ModelNode : public NodeDefinition::Renderable { public: // DATA Vector4 mColor = Color::WHITE; @@ -285,7 +287,7 @@ public: // METHODS /** * @brief Parameters for an Arc node. */ -class DALI_SCENE_LOADER_API ArcNode : public ModelNode +class DALI_SCENE3D_API ArcNode : public ModelNode { public: // DATA bool mAntiAliasing = true; @@ -300,7 +302,8 @@ public: // METHODS void OnCreate(const NodeDefinition& node, NodeDefinition::CreateParams& params, Actor& actor) const override; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_NODE_DEFINITION_H_ +#endif //DALI_SCENE3D_LOADER_NODE_DEFINITION_H_ diff --git a/dali-scene-loader/public-api/parse-renderer-state.cpp b/dali-scene3d/public-api/loader/parse-renderer-state.cpp similarity index 95% rename from dali-scene-loader/public-api/parse-renderer-state.cpp rename to dali-scene3d/public-api/loader/parse-renderer-state.cpp index 815dfaf..3c01701 100644 --- a/dali-scene-loader/public-api/parse-renderer-state.cpp +++ b/dali-scene3d/public-api/loader/parse-renderer-state.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,15 @@ * */ -#include "dali-scene-loader/public-api/parse-renderer-state.h" +#include "dali-scene3d/public-api/loader/parse-renderer-state.h" #include #include "dali/devel-api/common/map-wrapper.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace RendererState { @@ -52,7 +54,7 @@ Type InterpretComparison(const std::string_view& str) } std::map BLEND_FACTORS{ -#define DECL_BLEND_FACTOR(x) {#x, SceneLoader::BlendFactor::x} +#define DECL_BLEND_FACTOR(x) {#x, Dali::Scene3D::Loader::BlendFactor::x} DECL_BLEND_FACTOR(ZERO), DECL_BLEND_FACTOR(ONE), DECL_BLEND_FACTOR(SRC_COLOR), @@ -166,5 +168,6 @@ Type Parse(const char* string, size_t length, StringCallback onError) } } // namespace RendererState -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/parse-renderer-state.h b/dali-scene3d/public-api/loader/parse-renderer-state.h similarity index 72% rename from dali-scene-loader/public-api/parse-renderer-state.h rename to dali-scene3d/public-api/loader/parse-renderer-state.h index 38103d0..43ca5b3 100644 --- a/dali-scene-loader/public-api/parse-renderer-state.h +++ b/dali-scene3d/public-api/loader/parse-renderer-state.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_INTERPRET_RENDERER_STATE_H -#define DALI_SCENE_LOADER_INTERPRET_RENDERER_STATE_H +#ifndef DALI_SCENE3D_LOADERERER_INTERPRET_RENDERER_STATE_H +#define DALI_SCENE3D_LOADERERER_INTERPRET_RENDERER_STATE_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +17,14 @@ * */ -#include "dali-scene-loader/public-api/renderer-state.h" -#include "dali-scene-loader/public-api/string-callback.h" +#include "dali-scene3d/public-api/loader/renderer-state.h" +#include "dali-scene3d/public-api/loader/string-callback.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace RendererState { @@ -39,10 +41,11 @@ namespace RendererState * @param onError The callback to call when an error occurred. * @note No other characters are allowed. */ -DALI_SCENE_LOADER_API Type Parse(const char* string, size_t length = 0, StringCallback onError = DefaultErrorCallback); +DALI_SCENE3D_API Type Parse(const char* string, size_t length = 0, StringCallback onError = DefaultErrorCallback); } // namespace RendererState -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_INTERPRET_RENDERER_STATE_H +#endif //DALI_SCENE3D_LOADERERER_INTERPRET_RENDERER_STATE_H diff --git a/dali-scene-loader/public-api/renderer-state.cpp b/dali-scene3d/public-api/loader/renderer-state.cpp similarity index 93% rename from dali-scene-loader/public-api/renderer-state.cpp rename to dali-scene3d/public-api/loader/renderer-state.cpp index 80178b5..ad8059d 100644 --- a/dali-scene-loader/public-api/renderer-state.cpp +++ b/dali-scene3d/public-api/loader/renderer-state.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,14 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/renderer-state.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/renderer-state.h" +#include "dali-scene3d/public-api/loader/utils.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -96,5 +98,6 @@ void Apply(Type rendererState, Renderer& renderer) } // namespace RendererState -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/renderer-state.h b/dali-scene3d/public-api/loader/renderer-state.h similarity index 86% rename from dali-scene-loader/public-api/renderer-state.h rename to dali-scene3d/public-api/loader/renderer-state.h index f70100a..0dc3c52 100644 --- a/dali-scene-loader/public-api/renderer-state.h +++ b/dali-scene3d/public-api/loader/renderer-state.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_RENDERER_STATE_H -#define DALI_SCENE_LOADER_RENDERER_STATE_H +#ifndef DALI_SCENE3D_LOADER_RENDERER_STATE_H +#define DALI_SCENE3D_LOADER_RENDERER_STATE_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,20 +18,22 @@ */ // INTERAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include "dali/public-api/rendering/renderer.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /* * @brief Contains values for comparison functions used in depth and stencil testing. * @note Relative order of members must match DepthFunction::Type and StencilFunction::Type. */ -struct DALI_SCENE_LOADER_API Comparison +struct DALI_SCENE3D_API Comparison { enum Type { @@ -53,7 +55,7 @@ struct DALI_SCENE_LOADER_API Comparison * @brief Determines the blend factor used. * @note Relative order of members must match BlendFactor::Type. */ -struct DALI_SCENE_LOADER_API BlendFactor +struct DALI_SCENE3D_API BlendFactor { enum Type { @@ -82,7 +84,7 @@ struct DALI_SCENE_LOADER_API BlendFactor * @brief Determines which buffers shall the Renderer write into. * @note Relative order of members must match RenderMode::Type. */ -struct DALI_SCENE_LOADER_API BufferMode +struct DALI_SCENE3D_API BufferMode { enum Type { @@ -104,7 +106,7 @@ namespace RendererState { using Type = uint32_t; // 8 bits reserved for flags, 4 * 4 bit for blend factors, 4 bits for depth function -enum DALI_SCENE_LOADER_API Value : Type +enum DALI_SCENE3D_API Value : Type { NONE = 0x0, @@ -139,7 +141,7 @@ enum DALI_SCENE_LOADER_API Value : Type * @brief Encodes the given blend factors into a RenderMode value, maskable into other options, * passable into ApplyRenderMode(). */ -inline DALI_SCENE_LOADER_API constexpr uint32_t FromBlendFactors(BlendFactor::Type srcRgb, BlendFactor::Type destRgb, BlendFactor::Type srcAlpha, BlendFactor::Type destAlpha) +inline DALI_SCENE3D_API constexpr uint32_t FromBlendFactors(BlendFactor::Type srcRgb, BlendFactor::Type destRgb, BlendFactor::Type srcAlpha, BlendFactor::Type destAlpha) { return (srcRgb | (destRgb << BLEND_FACTOR_ITEM_BITS) | (srcAlpha << (BLEND_FACTOR_ITEM_BITS * 2)) | (destAlpha << (BLEND_FACTOR_ITEM_BITS * 3))) @@ -152,11 +154,12 @@ inline DALI_SCENE_LOADER_API constexpr uint32_t FromBlendFactors(BlendFactor::Ty * @note Blend factors are only set if not BlendFactor::OMIT. * @note Buffer mode is only set is not BufferMode::OMIT. */ -DALI_SCENE_LOADER_API void Apply(Type rendererState, Renderer& renderer); +DALI_SCENE3D_API void Apply(Type rendererState, Renderer& renderer); } // namespace RendererState -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_RENDERER_STATE_H +#endif //DALI_SCENE3D_LOADER_RENDERER_STATE_H diff --git a/dali-scene-loader/public-api/resource-bundle.cpp b/dali-scene3d/public-api/loader/resource-bundle.cpp similarity index 95% rename from dali-scene-loader/public-api/resource-bundle.cpp rename to dali-scene3d/public-api/loader/resource-bundle.cpp index 98b08bb..5df41e2 100644 --- a/dali-scene-loader/public-api/resource-bundle.cpp +++ b/dali-scene3d/public-api/loader/resource-bundle.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ */ // FILE HEADER -#include "dali-scene-loader/public-api/resource-bundle.h" +#include "dali-scene3d/public-api/loader/resource-bundle.h" // EXTERNAL #include @@ -29,7 +29,9 @@ namespace Dali { using namespace Toolkit; -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -146,5 +148,6 @@ void ResourceBundle::LoadResources(const ResourceRefCounts& refCounts, PathProvi } } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/resource-bundle.h b/dali-scene3d/public-api/loader/resource-bundle.h similarity index 81% rename from dali-scene-loader/public-api/resource-bundle.h rename to dali-scene3d/public-api/loader/resource-bundle.h index b1e0936..1537f72 100644 --- a/dali-scene-loader/public-api/resource-bundle.h +++ b/dali-scene3d/public-api/loader/resource-bundle.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_RESOURCE_BUNDLE_H_ -#define DALI_SCENE_LOADER_RESOURCE_BUNDLE_H_ +#ifndef DALI_SCENE3D_LOADERERERERER_RESOURCE_BUNDLE_H_ +#define DALI_SCENE3D_LOADERERERERER_RESOURCE_BUNDLE_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,11 +18,11 @@ */ // INTERNAL -#include "dali-scene-loader/public-api/environment-definition.h" -#include "dali-scene-loader/public-api/material-definition.h" -#include "dali-scene-loader/public-api/mesh-definition.h" -#include "dali-scene-loader/public-api/shader-definition.h" -#include "dali-scene-loader/public-api/skeleton-definition.h" +#include "dali-scene3d/public-api/loader/environment-definition.h" +#include "dali-scene3d/public-api/loader/material-definition.h" +#include "dali-scene3d/public-api/loader/mesh-definition.h" +#include "dali-scene3d/public-api/loader/shader-definition.h" +#include "dali-scene3d/public-api/loader/skeleton-definition.h" // EXTERNAL #include @@ -33,12 +33,14 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /* * @brief The types of resources that .dli may define. */ -struct DALI_SCENE_LOADER_API ResourceType +struct DALI_SCENE3D_API ResourceType { enum Value { @@ -54,7 +56,7 @@ struct DALI_SCENE_LOADER_API ResourceType /* * @return The string value corresponding to the given resource @a type. */ -DALI_SCENE_LOADER_API const char* GetResourceTypeName(ResourceType::Value type); +DALI_SCENE3D_API const char* GetResourceTypeName(ResourceType::Value type); using ResourceRefCounts = std::vector>; @@ -63,7 +65,7 @@ using ResourceRefCounts = std::vector>; * could be created from them, directly indexible into with values from a dli * document. */ -class DALI_SCENE_LOADER_API ResourceBundle +class DALI_SCENE3D_API ResourceBundle { public: struct Options @@ -122,7 +124,8 @@ public: // DATA SkeletonDefinition::Vector mSkeletons; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_RESOURCE_BUNDLE_H_ +#endif //DALI_SCENE3D_LOADERERERERER_RESOURCE_BUNDLE_H_ diff --git a/dali-scene-loader/public-api/scene-definition.cpp b/dali-scene3d/public-api/loader/scene-definition.cpp similarity index 98% rename from dali-scene-loader/public-api/scene-definition.cpp rename to dali-scene3d/public-api/loader/scene-definition.cpp index ff8bdfa..6e26c0f 100644 --- a/dali-scene-loader/public-api/scene-definition.cpp +++ b/dali-scene3d/public-api/loader/scene-definition.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,11 +20,11 @@ #include "dali/public-api/animation/constraints.h" // INTERNAL -#include "dali-scene-loader/internal/graphics/builtin-shader-extern-gen.h" -#include "dali-scene-loader/public-api/blend-shape-details.h" -#include "dali-scene-loader/public-api/scene-definition.h" -#include "dali-scene-loader/public-api/skinning-details.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/internal/graphics/builtin-shader-extern-gen.h" +#include "dali-scene3d/public-api/loader/blend-shape-details.h" +#include "dali-scene3d/public-api/loader/scene-definition.h" +#include "dali-scene3d/public-api/loader/skinning-details.h" +#include "dali-scene3d/public-api/loader/utils.h" //#define DEBUG_SCENE_DEFINITION //#define DEBUG_JOINTS @@ -39,7 +39,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -122,7 +124,7 @@ void EnsureJointDebugShaderCreated() { if(0 == sNumScenes) { - sJointDebugShader = Shader::New(SHADER_SCENE_LOADER_JOINT_DEBUG_VERT, SHADER_SCENE_LOADER_JOINT_DEBUG_FRAG); + sJointDebugShader = Shader::New(SHADER_SCENE3D_JOINT_DEBUG_VERT, SHADER_SCENE3D_JOINT_DEBUG_FRAG); } ++sNumScenes; } @@ -376,7 +378,7 @@ SceneDefinition::~SceneDefinition() #endif } -uint32_t SceneLoader::SceneDefinition::AddRootNode(Index iNode) +uint32_t Dali::Scene3D::Loader::SceneDefinition::AddRootNode(Index iNode) { if(iNode < mNodes.size()) { @@ -1194,5 +1196,6 @@ bool SceneDefinition::FindNode(const std::string& name, std::unique_ptr @@ -33,7 +33,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { class MatrixStack; @@ -41,7 +43,7 @@ class MatrixStack; * @brief Intermediate representation of a scene with functionality required to * create DALi objects (Actors, Renderers) from it. */ -class DALI_SCENE_LOADER_API SceneDefinition +class DALI_SCENE3D_API SceneDefinition { public: // TYPES using NodePredicate = std::function; @@ -272,7 +274,8 @@ private: // DATA std::vector mRootNodeIds; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_SCENE_DEFINITION_H_ +#endif //DALI_SCENE3D_LOADERER_SCENE_DEFINITION_H_ diff --git a/dali-scene-loader/public-api/shader-definition-factory.cpp b/dali-scene3d/public-api/loader/shader-definition-factory.cpp similarity index 94% rename from dali-scene-loader/public-api/shader-definition-factory.cpp rename to dali-scene3d/public-api/loader/shader-definition-factory.cpp index e025ebe..59dd3b4 100644 --- a/dali-scene-loader/public-api/shader-definition-factory.cpp +++ b/dali-scene3d/public-api/loader/shader-definition-factory.cpp @@ -14,16 +14,18 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/shader-definition-factory.h" +#include "dali-scene3d/public-api/loader/shader-definition-factory.h" #include -#include "dali-scene-loader/internal/hash.h" -#include "dali-scene-loader/public-api/blend-shape-details.h" -#include "dali-scene-loader/public-api/node-definition.h" +#include "dali-scene3d/internal/loader/hash.h" +#include "dali-scene3d/public-api/loader/blend-shape-details.h" +#include "dali-scene3d/public-api/loader/node-definition.h" #include "dali/devel-api/common/map-wrapper.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -193,7 +195,7 @@ Index ShaderDefinitionFactory::ProduceShader(const NodeDefinition& nodeDef) ShaderDefinition shaderDef; shaderDef.mUseBuiltInShader = true; - shaderDef.mRendererState = RendererState::DEPTH_TEST | RendererState::DEPTH_WRITE | RendererState::CULL_BACK; + shaderDef.mRendererState = RendererState::DEPTH_TEST | RendererState::DEPTH_WRITE | RendererState::CULL_BACK; auto& materialDef = *receiver.mMaterialDef; const bool hasTransparency = MaskMatch(materialDef.mFlags, MaterialDefinition::TRANSPARENCY); @@ -312,5 +314,6 @@ Index ShaderDefinitionFactory::ProduceShader(const NodeDefinition& nodeDef) return result; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/shader-definition-factory.h b/dali-scene3d/public-api/loader/shader-definition-factory.h similarity index 76% rename from dali-scene-loader/public-api/shader-definition-factory.h rename to dali-scene3d/public-api/loader/shader-definition-factory.h index 387984d..8c4434a 100644 --- a/dali-scene-loader/public-api/shader-definition-factory.h +++ b/dali-scene3d/public-api/loader/shader-definition-factory.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_SHADER_DEFINITION_FACTORY_H_ -#define DALI_SCENE_LOADER_SHADER_DEFINITION_FACTORY_H_ +#ifndef DALI_SCENE3D_LOADER_SHADER_DEFINITION_FACTORY_H_ +#define DALI_SCENE3D_LOADER_SHADER_DEFINITION_FACTORY_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,20 +18,22 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" -#include "dali-scene-loader/public-api/index.h" +#include "dali-scene3d/public-api/api.h" +#include "dali-scene3d/public-api/loader/index.h" // EXTERNAL INCLUDER #include namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { struct NodeDefinition; class ResourceBundle; -class DALI_SCENE_LOADER_API ShaderDefinitionFactory +class DALI_SCENE3D_API ShaderDefinitionFactory { public: ShaderDefinitionFactory(); @@ -56,7 +58,8 @@ private: const std::unique_ptr mImpl; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_SHADER_DEFINITION_FACTORY_H_ +#endif //DALI_SCENE3D_LOADER_SHADER_DEFINITION_FACTORY_H_ diff --git a/dali-scene-loader/public-api/shader-definition.cpp b/dali-scene3d/public-api/loader/shader-definition.cpp similarity index 93% rename from dali-scene-loader/public-api/shader-definition.cpp rename to dali-scene3d/public-api/loader/shader-definition.cpp index 1927351..ad263e4 100644 --- a/dali-scene-loader/public-api/shader-definition.cpp +++ b/dali-scene3d/public-api/loader/shader-definition.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,13 +16,15 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/shader-definition.h" -#include "dali-scene-loader/public-api/utils.h" -#include +#include "dali-scene3d/public-api/loader/shader-definition.h" +#include +#include "dali-scene3d/public-api/loader/utils.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -143,5 +145,6 @@ Shader ShaderDefinition::Load(RawData&& raw) const return shader; } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/shader-definition.h b/dali-scene3d/public-api/loader/shader-definition.h similarity index 86% rename from dali-scene-loader/public-api/shader-definition.h rename to dali-scene3d/public-api/loader/shader-definition.h index 386a0c9..d381c57 100644 --- a/dali-scene-loader/public-api/shader-definition.h +++ b/dali-scene3d/public-api/loader/shader-definition.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_SHADER_DEFINITION_H -#define DALI_SCENE_LOADER_SHADER_DEFINITION_H +#ifndef DALI_SCENE3D_LOADER_SHADER_DEFINITION_H +#define DALI_SCENE3D_LOADER_SHADER_DEFINITION_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/renderer-state.h" +#include "dali-scene3d/public-api/loader/renderer-state.h" // EXTERNAL INCLUDES #include @@ -27,14 +27,16 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /* * @brief Defines a shader with paths to the files which define its * vertex and fragment components, and a mapping of uniform names (which are * used to refer to them in GLSL) to data. */ -struct DALI_SCENE_LOADER_API ShaderDefinition +struct DALI_SCENE3D_API ShaderDefinition { using Vector = std::vector>; @@ -83,7 +85,8 @@ public: // DATA bool mUseBuiltInShader{false}; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_SHADER_DEFINITION_H +#endif //DALI_SCENE3D_LOADER_SHADER_DEFINITION_H diff --git a/dali-scene-loader/public-api/skeleton-definition.h b/dali-scene3d/public-api/loader/skeleton-definition.h similarity index 78% rename from dali-scene-loader/public-api/skeleton-definition.h rename to dali-scene3d/public-api/loader/skeleton-definition.h index 9bd7133..b2d61a8 100644 --- a/dali-scene-loader/public-api/skeleton-definition.h +++ b/dali-scene3d/public-api/loader/skeleton-definition.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_SKELETON_H -#define DALI_SCENE_LOADER_SKELETON_H +#ifndef DALI_SCENE3D_LOADERER_SKELETON_H +#define DALI_SCENE3D_LOADERER_SKELETON_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/index.h" +#include "dali-scene3d/public-api/loader/index.h" // EXTERNAL INCLUDES #include "dali/public-api/common/vector-wrapper.h" @@ -26,7 +26,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /* * @brief A set of joints (stored as node indices), and an optional root node index. @@ -34,7 +36,7 @@ namespace SceneLoader * @note Client code should not change the order of joints, as they are indexed by mesh vertex data. * @note Client code should make no assumption about the relation of the joint IDs. */ -struct DALI_SCENE_LOADER_API SkeletonDefinition +struct DALI_SCENE3D_API SkeletonDefinition { struct Joint { @@ -48,7 +50,8 @@ struct DALI_SCENE_LOADER_API SkeletonDefinition std::vector mJoints; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_SKELETON_H +#endif //DALI_SCENE3D_LOADERER_SKELETON_H diff --git a/dali-scene-loader/public-api/skinning-details.cpp b/dali-scene3d/public-api/loader/skinning-details.cpp similarity index 81% rename from dali-scene-loader/public-api/skinning-details.cpp rename to dali-scene3d/public-api/loader/skinning-details.cpp index 0edb58b..128a19b 100644 --- a/dali-scene-loader/public-api/skinning-details.cpp +++ b/dali-scene3d/public-api/loader/skinning-details.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,18 +14,21 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/skinning-details.h" +#include "dali-scene3d/public-api/loader/skinning-details.h" #include "dali/public-api/animation/constraints.h" #include "dali/public-api/object/property.h" #include "dali/public-api/rendering/shader.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { const unsigned int Skinning::MAX_JOINTS = 64; const std::string Skinning::BONE_UNIFORM_NAME = "uBone"; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/skinning-details.h b/dali-scene3d/public-api/loader/skinning-details.h similarity index 72% rename from dali-scene-loader/public-api/skinning-details.h rename to dali-scene3d/public-api/loader/skinning-details.h index 4ad1676..78ba38c 100644 --- a/dali-scene-loader/public-api/skinning-details.h +++ b/dali-scene3d/public-api/loader/skinning-details.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_SKINNING_DETAILS_H_ -#define DALI_SCENE_LOADER_SKINNING_DETAILS_H_ +#ifndef DALI_SCENE3D_LOADER_SKINNING_DETAILS_H_ +#define DALI_SCENE3D_LOADER_SKINNING_DETAILS_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include @@ -26,9 +26,11 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D { -struct DALI_SCENE_LOADER_API Skinning +namespace Loader +{ +struct DALI_SCENE3D_API Skinning { /* * @brief Upper limit on the number of joints supported. @@ -43,7 +45,8 @@ struct DALI_SCENE_LOADER_API Skinning Skinning() = delete; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif // DALI_SCENE_LOADER_SKINNING_DETAILS_H_ +#endif // DALI_SCENE3D_LOADER_SKINNING_DETAILS_H_ diff --git a/dali-scene-loader/public-api/string-callback.cpp b/dali-scene3d/public-api/loader/string-callback.cpp similarity index 79% rename from dali-scene-loader/public-api/string-callback.cpp rename to dali-scene3d/public-api/loader/string-callback.cpp index 8bf02e6..5d46cb7 100644 --- a/dali-scene-loader/public-api/string-callback.cpp +++ b/dali-scene3d/public-api/loader/string-callback.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,17 +14,20 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/string-callback.h" +#include "dali-scene3d/public-api/loader/string-callback.h" #include "dali/integration-api/debug.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { void DefaultErrorCallback(const std::string& message) { DALI_LOG_ERROR("%s", message.c_str()); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/string-callback.h b/dali-scene3d/public-api/loader/string-callback.h similarity index 69% rename from dali-scene-loader/public-api/string-callback.h rename to dali-scene3d/public-api/loader/string-callback.h index 5a1d289..4f00a10 100644 --- a/dali-scene-loader/public-api/string-callback.h +++ b/dali-scene3d/public-api/loader/string-callback.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_STRING_CALLBACK_H -#define DALI_SCENE_LOADER_STRING_CALLBACK_H +#ifndef DALI_SCENE3D_LOADER_STRING_CALLBACK_H +#define DALI_SCENE3D_LOADER_STRING_CALLBACK_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include @@ -26,7 +26,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /* * @brief A callback to post strings to. @@ -36,9 +38,10 @@ using StringCallback = std::function; /* * @brief Simply passes the formatted message to LOGE(). */ -DALI_SCENE_LOADER_API void DefaultErrorCallback(const std::string& message); +DALI_SCENE3D_API void DefaultErrorCallback(const std::string& message); -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_STRING_CALLBACK_H +#endif //DALI_SCENE3D_LOADER_STRING_CALLBACK_H diff --git a/dali-scene-loader/public-api/utils.cpp b/dali-scene3d/public-api/loader/utils.cpp similarity index 95% rename from dali-scene-loader/public-api/utils.cpp rename to dali-scene3d/public-api/loader/utils.cpp index 4d4396d..e4f3596 100644 --- a/dali-scene-loader/public-api/utils.cpp +++ b/dali-scene3d/public-api/loader/utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ */ // INTERNAL -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/utils.h" // EXTERNAL #include @@ -28,7 +28,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { namespace { @@ -145,5 +147,6 @@ void ToUnixFileSeparators(std::string& path) std::replace(path.begin(), path.end(), '\\', '/'); } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/utils.h b/dali-scene3d/public-api/loader/utils.h similarity index 76% rename from dali-scene-loader/public-api/utils.h rename to dali-scene3d/public-api/loader/utils.h index f9213e1..05a2063 100644 --- a/dali-scene-loader/public-api/utils.h +++ b/dali-scene3d/public-api/loader/utils.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_UTILS_H_ -#define DALI_SCENE_LOADER_UTILS_H_ +#ifndef DALI_SCENE3D_LOADER_UTILS_H_ +#define DALI_SCENE3D_LOADER_UTILS_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include @@ -29,7 +29,9 @@ namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /* * @brief Fixed size backing buffer to use with std::ostreams where control over @@ -37,7 +39,7 @@ namespace SceneLoader * @note All stream insertions that would overflow the buffer that StreamBuffer * was created with, will fail. */ -class DALI_SCENE_LOADER_API StreamBuffer : public std::basic_streambuf +class DALI_SCENE3D_API StreamBuffer : public std::basic_streambuf { public: StreamBuffer(char* buffer, size_t size) noexcept(true); @@ -48,7 +50,7 @@ public: * which a message can be formatted into. Upon destruction, it throws a * DaliException with the message. */ -class DALI_SCENE_LOADER_API ExceptionFlinger +class DALI_SCENE3D_API ExceptionFlinger { public: enum @@ -85,12 +87,12 @@ private: /* * @brief Formats the given printf-style varargs into a std::string. */ -DALI_SCENE_LOADER_API std::string FormatString(const char* format, ...); +DALI_SCENE3D_API std::string FormatString(const char* format, ...); /* * @return The @n th bit in a bitmask. */ -DALI_SCENE_LOADER_API constexpr size_t NthBit(size_t n) +DALI_SCENE3D_API constexpr size_t NthBit(size_t n) { return 1 << n; } @@ -98,7 +100,7 @@ DALI_SCENE_LOADER_API constexpr size_t NthBit(size_t n) /* * @return Whether all of @a mask 's bits are set on @a value. */ -inline DALI_SCENE_LOADER_API bool MaskMatch(uint32_t value, uint32_t mask) +inline DALI_SCENE3D_API bool MaskMatch(uint32_t value, uint32_t mask) { return (value & mask) == mask; } @@ -106,7 +108,7 @@ inline DALI_SCENE_LOADER_API bool MaskMatch(uint32_t value, uint32_t mask) /* * @brief Convert a four-letter(, null-terminated) string literal into a uint32_t. */ -inline DALI_SCENE_LOADER_API constexpr uint32_t FourCC(const char (&fourCC)[5]) +inline DALI_SCENE3D_API constexpr uint32_t FourCC(const char (&fourCC)[5]) { return (fourCC[3] << 24) | (fourCC[2] << 16) | (fourCC[1] << 8) | fourCC[0]; } @@ -117,7 +119,7 @@ inline DALI_SCENE_LOADER_API constexpr uint32_t FourCC(const char (&fourCC)[5]) * @param[in] b, compare string * @return true if strings are equal */ -inline DALI_SCENE_LOADER_API bool CaseInsensitiveCharacterCompare(unsigned char a, unsigned char b) +inline DALI_SCENE3D_API bool CaseInsensitiveCharacterCompare(unsigned char a, unsigned char b) { // Converts to lower case in the current locale. return std::tolower(a) == std::tolower(b); @@ -128,7 +130,7 @@ inline DALI_SCENE_LOADER_API bool CaseInsensitiveCharacterCompare(unsigned char * @param[in] a, compare string * @param[in] b, compare string */ -inline DALI_SCENE_LOADER_API bool CaseInsensitiveStringCompare(const std::string& a, const std::string& b) +inline DALI_SCENE3D_API bool CaseInsensitiveStringCompare(const std::string& a, const std::string& b) { bool result = false; if(a.length() == b.length()) @@ -144,7 +146,7 @@ inline DALI_SCENE_LOADER_API bool CaseInsensitiveStringCompare(const std::string * to true in case of failure (should only be checked if the returned string * was empty()). */ -DALI_SCENE_LOADER_API std::string LoadTextFile(const char* path, bool* fail = nullptr); +DALI_SCENE3D_API std::string LoadTextFile(const char* path, bool* fail = nullptr); /* * @brief Makes a number of calls to @a fn, passing to each one the given @@ -154,7 +156,7 @@ DALI_SCENE_LOADER_API std::string LoadTextFile(const char* path, bool* fail = nu * for performance and stability reasons. */ template -inline DALI_SCENE_LOADER_API void VisitActor(Actor a, Func fn) +inline DALI_SCENE3D_API void VisitActor(Actor a, Func fn) { fn(a); @@ -169,7 +171,7 @@ inline DALI_SCENE_LOADER_API void VisitActor(Actor a, Func fn) * @brief Convenience function to set the given actor @a 's anchor point * and parent origin to center. */ -inline DALI_SCENE_LOADER_API void SetActorCentered(Actor a) +inline DALI_SCENE3D_API void SetActorCentered(Actor a) { a.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER); a.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER); @@ -179,7 +181,7 @@ namespace TexturedQuadOptions { using Type = uint32_t; -enum DALI_SCENE_LOADER_API Values : Type +enum DALI_SCENE3D_API Values : Type { NONE = 0x00, FLIP_VERTICAL = 0x01, @@ -189,15 +191,16 @@ enum DALI_SCENE_LOADER_API Values : Type /* * @brief Makes... geometry for a textured quad. */ -DALI_SCENE_LOADER_API Geometry MakeTexturedQuadGeometry(TexturedQuadOptions::Type options = TexturedQuadOptions::NONE); +DALI_SCENE3D_API Geometry MakeTexturedQuadGeometry(TexturedQuadOptions::Type options = TexturedQuadOptions::NONE); /* * @brief Fixes the path of a file. Replaces the '\\' separator by the '/' one. * @param[in,out] path The path to be fixed. */ -DALI_SCENE_LOADER_API void ToUnixFileSeparators(std::string& path); +DALI_SCENE3D_API void ToUnixFileSeparators(std::string& path); -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif /* DALI_SCENE_LOADER_UTILS_H_ */ +#endif /* DALI_SCENE3D_LOADER_UTILS_H_ */ diff --git a/dali-scene-loader/public-api/view-projection.cpp b/dali-scene3d/public-api/loader/view-projection.cpp similarity index 78% rename from dali-scene-loader/public-api/view-projection.cpp rename to dali-scene3d/public-api/loader/view-projection.cpp index ce2e6b0..ac970ca 100644 --- a/dali-scene-loader/public-api/view-projection.cpp +++ b/dali-scene3d/public-api/loader/view-projection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,14 @@ * limitations under the License. * */ -#include "dali-scene-loader/public-api/view-projection.h" -#include "dali-scene-loader/public-api/utils.h" +#include "dali-scene3d/public-api/loader/view-projection.h" +#include "dali-scene3d/public-api/loader/utils.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { void ViewProjection::Update() { @@ -32,5 +34,6 @@ void ViewProjection::Update() } } -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali diff --git a/dali-scene-loader/public-api/view-projection.h b/dali-scene3d/public-api/loader/view-projection.h similarity index 82% rename from dali-scene-loader/public-api/view-projection.h rename to dali-scene3d/public-api/loader/view-projection.h index 26ce908..db7be74 100644 --- a/dali-scene-loader/public-api/view-projection.h +++ b/dali-scene3d/public-api/loader/view-projection.h @@ -1,7 +1,7 @@ -#ifndef DALI_SCENE_LOADER_VIEW_PROJECTION_H_ -#define DALI_SCENE_LOADER_VIEW_PROJECTION_H_ +#ifndef DALI_SCENE3D_LOADER_VIEW_PROJECTION_H_ +#define DALI_SCENE3D_LOADER_VIEW_PROJECTION_H_ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +18,16 @@ */ // INTERNAL INCLUDES -#include "dali-scene-loader/public-api/api.h" +#include "dali-scene3d/public-api/api.h" // EXTERNAL INCLUDES #include "dali/public-api/math/matrix.h" namespace Dali { -namespace SceneLoader +namespace Scene3D +{ +namespace Loader { /** * @brief Contains view and projection matrices, also caching the view-projection @@ -72,7 +74,8 @@ private: Matrix mViewProjection; }; -} // namespace SceneLoader +} // namespace Loader +} // namespace Scene3D } // namespace Dali -#endif //DALI_SCENE_LOADER_VIEW_PROJECTION_H_ +#endif //DALI_SCENE3D_LOADER_VIEW_PROJECTION_H_ diff --git a/dali-scene-loader/third-party/.clang-format b/dali-scene3d/third-party/.clang-format similarity index 100% rename from dali-scene-loader/third-party/.clang-format rename to dali-scene3d/third-party/.clang-format diff --git a/dali-scene-loader/third-party/json.h b/dali-scene3d/third-party/json.h similarity index 100% rename from dali-scene-loader/third-party/json.h rename to dali-scene3d/third-party/json.h diff --git a/packaging/dali-toolkit.spec b/packaging/dali-toolkit.spec index 8619802..ba38d68b 100644 --- a/packaging/dali-toolkit.spec +++ b/packaging/dali-toolkit.spec @@ -100,25 +100,25 @@ Requires: %{name} = %{version}-%{release} Application development package for Dali 3D engine toolkit - headers and package config ############################## -# dali-scene-loader +# dali-scene3d ############################## -%define dali2_scene_loader dali2-scene-loader -%package -n %{dali2_scene_loader} +%define dali2_scene3d dali2-scene3d +%package -n %{dali2_scene3d} Summary: DLI scene loading library Group: System/Libraries License: Apache-2.0 Requires: dali2-toolkit -%description -n %{dali2_scene_loader} +%description -n %{dali2_scene3d} Provides functionality for loading and displaying DLI format scenes. See README.md for more details. -%package -n %{dali2_scene_loader}-devel -Summary: Development components for dali-scene-loader +%package -n %{dali2_scene3d}-devel +Summary: Development components for dali-scene3d Group: Development/Building -Requires: %{dali2_scene_loader} = %{version}-%{release} +Requires: %{dali2_scene3d} = %{version}-%{release} -%description -n %{dali2_scene_loader}-devel -Development components for dali-scene-loader. +%description -n %{dali2_scene3d}-devel +Development components for dali-scene3d. %define dali_data_rw_dir %TZ_SYS_SHARE/dali/ %define dali_data_ro_dir %TZ_SYS_RO_SHARE/dali/ @@ -480,17 +480,17 @@ esac %{dali_toolkit_style_files}/default-feedback-theme.json %{_datadir}/locale/*/LC_MESSAGES/* -%files -n %{dali2_scene_loader} +%files -n %{dali2_scene3d} %if 0%{?enable_dali_smack_rules} -%manifest dali-scene-loader.manifest-smack +%manifest dali-scene3d.manifest-smack %else -%manifest dali-scene-loader.manifest +%manifest dali-scene3d.manifest %endif %defattr(-,root,root,-) -%{_libdir}/lib%{dali2_scene_loader}.so +%{_libdir}/lib%{dali2_scene3d}.so %license LICENSE -%files -n %{dali2_scene_loader}-devel +%files -n %{dali2_scene3d}-devel %defattr(-,root,root,-) -%{_includedir}/dali-scene-loader/public-api/* -%{_libdir}/pkgconfig/dali2-scene-loader.pc +%{_includedir}/dali-scene3d/public-api/* +%{_libdir}/pkgconfig/dali2-scene3d.pc -- 2.7.4