Merge branch 'devel/master' into tizen
authorEverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Wed, 22 Nov 2023 06:28:00 +0000 (15:28 +0900)
committerEverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Wed, 22 Nov 2023 06:28:00 +0000 (15:28 +0900)
73 files changed:
automated-tests/src/dali-scene3d/collider-mesh-data.h [new file with mode: 0644]
automated-tests/src/dali-scene3d/utc-Dali-NavigationMesh.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-reflection.cpp
build/tizen/docs/dali.doxy.in
dali-scene3d/internal/algorithm/navigation-mesh-impl.cpp
dali-scene3d/internal/algorithm/navigation-mesh-impl.h
dali-scene3d/internal/controls/model/model-impl.cpp
dali-scene3d/internal/controls/model/model-impl.h
dali-scene3d/internal/event/collider-mesh-processor-impl.cpp [new file with mode: 0644]
dali-scene3d/internal/event/collider-mesh-processor-impl.h [new file with mode: 0644]
dali-scene3d/internal/event/collider-mesh-processor.cpp [new file with mode: 0644]
dali-scene3d/internal/event/collider-mesh-processor.h [new file with mode: 0644]
dali-scene3d/internal/file.list
dali-scene3d/internal/model-components/model-node-impl.cpp
dali-scene3d/internal/model-components/model-node-impl.h
dali-scene3d/public-api/algorithm/navigation-mesh.cpp
dali-scene3d/public-api/algorithm/navigation-mesh.h
dali-scene3d/public-api/algorithm/path-finder-waypoint.h
dali-scene3d/public-api/algorithm/path-finder.h
dali-scene3d/public-api/controls/model/model.cpp
dali-scene3d/public-api/controls/model/model.h
dali-scene3d/public-api/loader/alpha-function-helper.h
dali-scene3d/public-api/loader/animated-property.h
dali-scene3d/public-api/loader/animation-definition.h
dali-scene3d/public-api/loader/blend-shape-details.h
dali-scene3d/public-api/loader/buffer-definition.h
dali-scene3d/public-api/loader/bvh-loader.h
dali-scene3d/public-api/loader/camera-parameters.h
dali-scene3d/public-api/loader/customization.h
dali-scene3d/public-api/loader/dli-input-parameter.h
dali-scene3d/public-api/loader/environment-definition.h
dali-scene3d/public-api/loader/environment-map-data.h
dali-scene3d/public-api/loader/environment-map-loader.h
dali-scene3d/public-api/loader/facial-animation-loader.h
dali-scene3d/public-api/loader/ktx-loader.h
dali-scene3d/public-api/loader/load-result.h
dali-scene3d/public-api/loader/load-scene-metadata.h
dali-scene3d/public-api/loader/material-definition.h
dali-scene3d/public-api/loader/matrix-stack.h
dali-scene3d/public-api/loader/mesh-definition.h
dali-scene3d/public-api/loader/mesh-geometry.h
dali-scene3d/public-api/loader/model-loader.h
dali-scene3d/public-api/loader/navigation-mesh-factory.cpp
dali-scene3d/public-api/loader/navigation-mesh-factory.h
dali-scene3d/public-api/loader/node-definition.h
dali-scene3d/public-api/loader/parse-renderer-state.h
dali-scene3d/public-api/loader/renderer-state.h
dali-scene3d/public-api/loader/resource-bundle.h
dali-scene3d/public-api/loader/scene-definition.h
dali-scene3d/public-api/loader/shader-definition.h
dali-scene3d/public-api/loader/shader-manager.h
dali-scene3d/public-api/loader/shader-option.h
dali-scene3d/public-api/loader/skeleton-definition.h
dali-scene3d/public-api/loader/skinning-details.h
dali-scene3d/public-api/loader/string-callback.h
dali-scene3d/public-api/loader/utils.h
dali-scene3d/public-api/loader/view-projection.h
dali-scene3d/public-api/model-components/material.h
dali-scene3d/public-api/model-components/model-node.cpp
dali-scene3d/public-api/model-components/model-node.h
dali-scene3d/public-api/model-components/model-primitive.h
dali-toolkit/devel-api/text/bitmap-font.cpp
dali-toolkit/devel-api/text/bitmap-font.h
dali-toolkit/internal/graphics/shaders/color-visual-shader.frag
dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag
dali-toolkit/internal/graphics/shaders/image-visual-shader.frag
dali-toolkit/internal/texture-manager/texture-cache-manager.h
dali-toolkit/internal/texture-manager/texture-manager-type.h
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

diff --git a/automated-tests/src/dali-scene3d/collider-mesh-data.h b/automated-tests/src/dali-scene3d/collider-mesh-data.h
new file mode 100644 (file)
index 0000000..5e97c51
--- /dev/null
@@ -0,0 +1,75 @@
+#include <algorithm>
+#include <vector>
+
+unsigned char col_test_0[] = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x42, 0x00, 0x00, 0x35, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x42, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_0_len = 216;
+unsigned char col_test_1[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x41, 0x00, 0x00, 0x09, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x42, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x42, 0x00, 0x00, 0x09, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x41, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_1_len = 216;
+unsigned char col_test_10[]  = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x13, 0x44, 0x00, 0x80, 0x93, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1b, 0x44, 0x00, 0x80, 0xa6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1b, 0x44, 0x00, 0x00, 0xa0, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x13, 0x44, 0x00, 0x00, 0xa0, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x44, 0x00, 0x80, 0x93, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x44, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0xff, 0xff, 0x01, 0x00, 0x03, 0x00, 0x02, 0x00, 0xff, 0xff, 0x03, 0x00, 0x04, 0x00, 0x02, 0x00, 0xff, 0xff, 0x01, 0x00, 0x04, 0x00, 0x03, 0x00, 0xff, 0xff, 0x04, 0x00, 0x05, 0x00, 0x03, 0x00, 0xff, 0xff, 0x05, 0x00, 0x01, 0x00, 0x03, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_10_len = 360;
+unsigned char col_test_11[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x16, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x44, 0x00, 0x80, 0x0f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1e, 0x44, 0x00, 0xc0, 0x16, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1e, 0x44, 0x00, 0x80, 0x0f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x44, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_11_len = 216;
+unsigned char col_test_12[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x28, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x43, 0x00, 0x80, 0x0f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x80, 0x0f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x44, 0x00, 0x00, 0xd6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x44, 0x00, 0x00, 0xd6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x44, 0x00, 0x00, 0xd6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc6, 0x43, 0x00, 0x00, 0xc0, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x44, 0x00, 0x00, 0x8c, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc6, 0x43, 0x00, 0x00, 0xc0, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc6, 0x43, 0x00, 0x00, 0x28, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc6, 0x43, 0x00, 0x00, 0x09, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x43, 0x00, 0x80, 0xa6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x43, 0x00, 0x00, 0x28, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x43, 0x00, 0x00, 0x09, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x42, 0x00, 0x80, 0xa6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x42, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x04, 0x00, 0x01, 0x00, 0xff, 0xff, 0x04, 0x00, 0x05, 0x00, 0x01, 0x00, 0xff, 0xff, 0x05, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x04, 0x00, 0x06, 0x00, 0x02, 0x00, 0xff, 0xff, 0x06, 0x00, 0x07, 0x00, 0x02, 0x00, 0xff, 0xff, 0x07, 0x00, 0x04, 0x00, 0x02, 0x00, 0xff, 0xff, 0x03, 0x00, 0x06, 0x00, 0x03, 0x00, 0xff, 0xff, 0x06, 0x00, 0x04, 0x00, 0x03, 0x00, 0xff, 0xff, 0x04, 0x00, 0x03, 0x00, 0x03, 0x00, 0xff, 0xff, 0x06, 0x00, 0x08, 0x00, 0x04, 0x00, 0xff, 0xff, 0x08, 0x00, 0x09, 0x00, 0x04, 0x00, 0xff, 0xff, 0x09, 0x00, 0x06, 0x00, 0x04, 0x00, 0xff, 0xff, 0x06, 0x00, 0x0a, 0x00, 0x05, 0x00, 0xff, 0xff, 0x0a, 0x00, 0x08, 0x00, 0x05, 0x00, 0xff, 0xff, 0x08, 0x00, 0x06, 0x00, 0x05, 0x00, 0xff, 0xff, 0x02, 0x00, 0x06, 0x00, 0x06, 0x00, 0xff, 0xff, 0x06, 0x00, 0x03, 0x00, 0x06, 0x00, 0xff, 0xff, 0x03, 0x00, 0x02, 0x00, 0x06, 0x00, 0xff, 0xff, 0x02, 0x00, 0x0a, 0x00, 0x07, 0x00, 0xff, 0xff, 0x0a, 0x00, 0x06, 0x00, 0x07, 0x00, 0xff, 0xff, 0x06, 0x00, 0x02, 0x00, 0x07, 0x00, 0xff, 0xff, 0x01, 0x00, 0x0a, 0x00, 0x08, 0x00, 0xff, 0xff, 0x0a, 0x00, 0x02, 0x00, 0x08, 0x00, 0xff, 0xff, 0x02, 0x00, 0x01, 0x00, 0x08, 0x00, 0xff, 0xff, 0x0b, 0x00, 0x0a, 0x00, 0x09, 0x00, 0xff, 0xff, 0x0a, 0x00, 0x01, 0x00, 0x09, 0x00, 0xff, 0xff, 0x01, 0x00, 0x0b, 0x00, 0x09, 0x00, 0xff, 0xff, 0x0c, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0xff, 0xff, 0x0a, 0x00, 0x0b, 0x00, 0x0a, 0x00, 0xff, 0xff, 0x0b, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0xff, 0xff, 0x0a, 0x00, 0x0c, 0x00, 0x0b, 0x00, 0xff, 0xff, 0x0c, 0x00, 0x0d, 0x00, 0x0b, 0x00, 0xff, 0xff, 0x0d, 0x00, 0x0a, 0x00, 0x0b, 0x00, 0xff, 0xff, 0x07, 0x00, 0x06, 0x00, 0x0c, 0x00, 0xff, 0xff, 0x06, 0x00, 0x09, 0x00, 0x0c, 0x00, 0xff, 0xff, 0x09, 0x00, 0x07, 0x00, 0x0c, 0x00, 0xff, 0xff, 0x0e, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0xff, 0xff, 0x0c, 0x00, 0x0b, 0x00, 0x0d, 0x00, 0xff, 0xff, 0x0b, 0x00, 0x0e, 0x00, 0x0d, 0x00, 0xff, 0xff, 0x0c, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0xff, 0xff, 0x0e, 0x00, 0x0f, 0x00, 0x0e, 0x00, 0xff, 0xff, 0x0f, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x06, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x06, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0c, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_12_len = 1140;
+unsigned char col_test_13[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc6, 0x43, 0x00, 0x00, 0x28, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd4, 0x43, 0x00, 0x00, 0x8c, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd4, 0x43, 0x00, 0x00, 0x28, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc6, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_13_len = 216;
+unsigned char col_test_14[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x44, 0x00, 0x00, 0xd6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1e, 0x44, 0x00, 0x80, 0x0f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1e, 0x44, 0x00, 0x00, 0xd6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x44, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_14_len = 216;
+unsigned char col_test_2[]    = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x36, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x43, 0x00, 0x80, 0x36, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x42, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x43, 0x00, 0x00, 0x09, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x43, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x43, 0x00, 0x00, 0x09, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x42, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x04, 0x00, 0x01, 0x00, 0xff, 0xff, 0x04, 0x00, 0x02, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0x03, 0x00, 0x02, 0x00, 0xff, 0xff, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0xff, 0xff, 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00, 0xff, 0xff, 0x01, 0x00, 0x05, 0x00, 0x03, 0x00, 0xff, 0xff, 0x05, 0x00, 0x03, 0x00, 0x03, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_2_len = 360;
+unsigned char col_test_3[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x43, 0x00, 0x00, 0x28, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x43, 0x00, 0x80, 0xa6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x43, 0x00, 0x00, 0x28, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_3_len = 216;
+unsigned char col_test_4[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x36, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x43, 0x00, 0x40, 0x2f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x80, 0x36, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x40, 0x2f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_4_len = 216;
+unsigned char col_test_5[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x36, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x43, 0x00, 0x80, 0x36, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x43, 0x00, 0x40, 0x2f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x43, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x40, 0x2f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x40, 0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x04, 0x00, 0x01, 0x00, 0xff, 0xff, 0x04, 0x00, 0x02, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0x03, 0x00, 0x02, 0x00, 0xff, 0xff, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0xff, 0xff, 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00, 0xff, 0xff, 0x01, 0x00, 0x05, 0x00, 0x03, 0x00, 0xff, 0xff, 0x05, 0x00, 0x03, 0x00, 0x03, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_5_len = 360;
+unsigned char col_test_6[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x93, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x00, 0x8c, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd3, 0x43, 0x00, 0x80, 0x93, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd3, 0x43, 0x00, 0x00, 0x8c, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_6_len = 216;
+unsigned char col_test_7[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc6, 0x43, 0x00, 0x80, 0x93, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x44, 0x00, 0x00, 0xc0, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x44, 0x00, 0x80, 0x93, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc6, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_7_len = 216;
+unsigned char col_test_8[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x36, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x80, 0x0f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x44, 0x00, 0x80, 0x36, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x44, 0x00, 0x80, 0x0f, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc4, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int  col_test_8_len = 216;
+unsigned char col_test_9[]   = {
+  0x4e, 0x41, 0x56, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1b, 0x44, 0x00, 0x80, 0xa6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x13, 0x44, 0x00, 0x80, 0xa6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1b, 0x44, 0x00, 0x00, 0xd6, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x44, 0x00, 0x00, 0xa0, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x13, 0x44, 0x00, 0x00, 0xa0, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x44, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xff, 0xff, 0x03, 0x00, 0x04, 0x00, 0x02, 0x00, 0xff, 0xff, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0xff, 0xff, 0x01, 0x00, 0x03, 0x00, 0x02, 0x00, 0xff, 0xff, 0x04, 0x00, 0x03, 0x00, 0x03, 0x00, 0xff, 0xff, 0x03, 0x00, 0x05, 0x00, 0x03, 0x00, 0xff, 0xff, 0x05, 0x00, 0x04, 0x00, 0x03, 0x00, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+unsigned int col_test_9_len = 360;
+
+static const std::vector<std::pair<uint8_t*, uint32_t>> TEST_COLLIDER_MESH = {
+  {col_test_0, col_test_0_len},
+  {col_test_1, col_test_1_len},
+  {col_test_2, col_test_2_len},
+  {col_test_3, col_test_3_len},
+  {col_test_4, col_test_4_len},
+  {col_test_5, col_test_5_len},
+  {col_test_6, col_test_6_len},
+  {col_test_7, col_test_7_len},
+  {col_test_8, col_test_8_len},
+  {col_test_9, col_test_9_len},
+};
+
+#define COLLIDER_BUFFER(N)                                              \
+  std::invoke([]() {                                                    \
+    auto v = std::vector<uint8_t>();                                    \
+    v.insert(v.end(), col_test_##N, col_test_##N + col_test_##N##_len); \
+    return v;                                                           \
+  })
+
+static std::vector<uint8_t> GetTestColliderMesh(int n)
+{
+  auto v = std::vector<uint8_t>();
+  v.insert(v.end(), TEST_COLLIDER_MESH[n].first, TEST_COLLIDER_MESH[n].first + TEST_COLLIDER_MESH[n].second);
+  return v;
+}
index 957332d..5df30be 100644 (file)
  *
  */
 
-#include <dali-test-suite-utils.h>
+#include <dali-scene3d/public-api/controls/model/model.h>
+#include <dali-scene3d/public-api/controls/scene-view/scene-view.h>
+#include <dali-toolkit-test-suite-utils.h>
+#include <dali/devel-api/actors/camera-actor-devel.h>
+#include <dali/integration-api/events/touch-event-integ.h>
 #include <dlfcn.h>
 #include "dali-scene3d/public-api/algorithm/navigation-mesh.h"
 #include "dali-scene3d/public-api/loader/navigation-mesh-factory.h"
+
+// include collider mesh data
+#include "collider-mesh-data.h"
+
 using namespace Dali;
 using namespace Dali::Scene3D::Algorithm;
 using namespace Dali::Scene3D::Loader;
@@ -97,6 +105,86 @@ extern "C" size_t                                     fread(void* __restrict p,
   return call_fread.Invoke(p, s, n, st);
 }
 
+// Data to test factory
+static std::vector<Dali::Vector3> COLLIDER_0_VERTS = {
+  Dali::Vector3(-1.000000, -1.556106, 0.000000),
+  Dali::Vector3(1.000000, -1.556106, 0.000000),
+  Dali::Vector3(-1.000000, 1.000000, 0.000000),
+  Dali::Vector3(1.000000, 1.000000, 0.000000),
+  Dali::Vector3(3.026269, -1.556106, 0.000000),
+  Dali::Vector3(3.026269, 1.000000, 0.000000),
+  Dali::Vector3(-1.000000, 2.491248, 0.000000),
+  Dali::Vector3(1.000000, 2.491248, 0.000000),
+};
+static std::vector<uint32_t> COLLIDER_0_IDX = {
+  1,
+  2,
+  0,
+  1,
+  5,
+  3,
+  3,
+  6,
+  2,
+  1,
+  3,
+  2,
+  1,
+  4,
+  5,
+  3,
+  7,
+  6,
+};
+static std::vector<Dali::Vector3> COLLIDER_1_VERTS = {
+  Dali::Vector3(-1.000000, -3.386207, 0.000000),
+  Dali::Vector3(1.000000, -3.386207, 0.000000),
+  Dali::Vector3(-1.000000, 1.000000, 0.000000),
+  Dali::Vector3(1.000000, 1.000000, 0.000000),
+  Dali::Vector3(-3.393266, -3.386207, 0.000000),
+  Dali::Vector3(-3.393266, 1.000000, 0.000000),
+};
+static std::vector<uint32_t> COLLIDER_1_IDX = {
+  1,
+  2,
+  0,
+  2,
+  4,
+  0,
+  1,
+  3,
+  2,
+  2,
+  5,
+  4,
+};
+static std::vector<Dali::Vector3> COLLIDER_2_VERTS = {
+  Dali::Vector3(-3.393266, -1.000000, 0.000000),
+  Dali::Vector3(1.000000, -1.000000, 0.000000),
+  Dali::Vector3(-3.393266, 0.491248, 0.000000),
+  Dali::Vector3(1.000000, 0.491248, 0.000000),
+};
+static std::vector<uint32_t> COLLIDER_2_IDX = {
+  1,
+  2,
+  0,
+  1,
+  3,
+  2,
+};
+
+Integration::TouchEvent GenerateSingleTouch(PointState::Type state, const Vector2& screenPosition)
+{
+  Integration::TouchEvent touchEvent;
+  Integration::Point      point;
+  point.SetState(state);
+  point.SetScreenPosition(screenPosition);
+  point.SetDeviceClass(Device::Class::TOUCH);
+  point.SetDeviceSubclass(Device::Subclass::NONE);
+  touchEvent.points.push_back(point);
+  return touchEvent;
+}
+
 int UtcDaliNavigationMeshCreateFromFileFail1(void)
 {
   tet_infoline("UtcDaliNavigationMeshCreateFromFileFail1: Fails to create navigation mesh from file");
@@ -373,7 +461,7 @@ int UtcDaliNavigationSetTransformP(void)
 
   navmesh->SetSceneTransform(newMatrix);
 
-  auto point = Vector3(0, 1, 0);
+  auto point = Vector3(0, -1, 0);
 
   [[maybe_unused]] Vector3 navMeshLocalSpace;
   [[maybe_unused]] Vector3 navMeshParentSpace;
@@ -383,12 +471,12 @@ int UtcDaliNavigationSetTransformP(void)
   auto gravityVector = navmesh->GetGravityVector();
 
   // 'point' should be turned into the gravity vector after transforming into the local space
-  DALI_TEST_EQUALS(navMeshLocalSpace, gravityVector, TEST_LOCATION);
+  DALI_TEST_EQUALS(navMeshLocalSpace, gravityVector, std::numeric_limits<float>::epsilon(), TEST_LOCATION);
 
   navMeshParentSpace = navmesh->PointLocalToScene(gravityVector);
 
   // The gravity should be transformed back into point
-  DALI_TEST_EQUALS(navMeshParentSpace, point, TEST_LOCATION);
+  DALI_TEST_EQUALS(navMeshParentSpace, point, std::numeric_limits<float>::epsilon(), TEST_LOCATION);
 
   END_TEST;
 }
@@ -546,4 +634,182 @@ int UtcDaliNavigationFindFloorForFace2P(void)
   }
 
   END_TEST;
-}
\ No newline at end of file
+}
+
+int UtcDaliNavigationMeshCreateFromVerticesAndFaces(void)
+{
+  tet_infoline("UtcDaliNavigationMeshCreateFromVerticesAndFaces: Creates NavigationMesh using vertices and faces");
+
+  auto buffer0 = COLLIDER_BUFFER(0);
+
+  // All calculations in the navmesh local space
+  auto fn = [&](const auto& vertices, const auto& normals, const auto& indices) {
+    auto navmesh = NavigationMeshFactory::CreateFromVertexFaceList(vertices, normals, indices);
+    navmesh->SetSceneTransform(Matrix(Matrix::IDENTITY));
+    DALI_TEST_EQUALS(navmesh->GetVertexCount(), vertices.size(), TEST_LOCATION);
+    DALI_TEST_EQUALS(navmesh->GetFaceCount(), indices.size() / 3, TEST_LOCATION);
+    DALI_TEST_EQUALS(navmesh->GetEdgeCount(), indices.size(), TEST_LOCATION);
+
+    // compare data
+    for(auto i = 0u; i < navmesh->GetVertexCount(); ++i)
+    {
+      Dali::Vector3 v(navmesh->GetVertex(i)->coordinates);
+      DALI_TEST_EQUALS(vertices[i], v, TEST_LOCATION);
+    }
+
+    for(auto i = 0u; i < navmesh->GetFaceCount() * 3; i += 3)
+    {
+      const auto& v = navmesh->GetFace(i / 3)->vertex;
+      DALI_TEST_EQUALS(indices[i], v[0], TEST_LOCATION);
+      DALI_TEST_EQUALS(indices[i + 1], v[1], TEST_LOCATION);
+      DALI_TEST_EQUALS(indices[i + 2], v[2], TEST_LOCATION);
+    }
+  };
+
+  std::vector<Vector3> normals;
+  normals.resize(COLLIDER_0_VERTS.size());
+  std::fill(normals.begin(), normals.end(), Vector3(0.0, 1.0, 0.0));
+  fn(COLLIDER_0_VERTS, normals, COLLIDER_0_IDX);
+
+  normals.resize(COLLIDER_1_VERTS.size());
+  std::fill(normals.begin(), normals.end(), Vector3(0.0, 1.0, 0.0));
+  fn(COLLIDER_1_VERTS, normals, COLLIDER_1_IDX);
+
+  normals.resize(COLLIDER_2_VERTS.size());
+  std::fill(normals.begin(), normals.end(), Vector3(0.0, 1.0, 0.0));
+  fn(COLLIDER_2_VERTS, normals, COLLIDER_2_IDX);
+  END_TEST;
+}
+
+int UtcDaliNavigationMeshCreateFromVerticesAndFacesNoNormals(void)
+{
+  tet_infoline("UtcDaliNavigationMeshCreateFromVerticesAndFacesNoNormals: Creates NavigationMesh using vertices and faces but recalculates normals");
+
+  auto buffer0 = COLLIDER_BUFFER(0);
+
+  // All calculations in the navmesh local space
+  auto fn = [&](const auto& vertices, const auto& indices) {
+    auto navmesh = NavigationMeshFactory::CreateFromVertexFaceList(vertices.data(), nullptr, vertices.size(), indices.data(), indices.size());
+    navmesh->SetSceneTransform(Matrix(Matrix::IDENTITY));
+    DALI_TEST_EQUALS(navmesh->GetVertexCount(), vertices.size(), TEST_LOCATION);
+    DALI_TEST_EQUALS(navmesh->GetFaceCount(), indices.size() / 3, TEST_LOCATION);
+    DALI_TEST_EQUALS(navmesh->GetEdgeCount(), indices.size(), TEST_LOCATION);
+
+    // compare data
+    for(auto i = 0u; i < navmesh->GetVertexCount(); ++i)
+    {
+      Dali::Vector3 v(navmesh->GetVertex(i)->coordinates);
+      DALI_TEST_EQUALS(vertices[i], v, TEST_LOCATION);
+    }
+
+    for(auto i = 0u; i < navmesh->GetFaceCount() * 3; i += 3)
+    {
+      const auto& v = navmesh->GetFace(i / 3)->vertex;
+      DALI_TEST_EQUALS(indices[i], v[0], TEST_LOCATION);
+      DALI_TEST_EQUALS(indices[i + 1], v[1], TEST_LOCATION);
+      DALI_TEST_EQUALS(indices[i + 2], v[2], TEST_LOCATION);
+    }
+  };
+
+  std::vector<Vector3> normals;
+  normals.resize(COLLIDER_0_VERTS.size());
+  std::fill(normals.begin(), normals.end(), Vector3(0.0, 1.0, 0.0));
+  fn(COLLIDER_0_VERTS, COLLIDER_0_IDX);
+
+  normals.resize(COLLIDER_1_VERTS.size());
+  std::fill(normals.begin(), normals.end(), Vector3(0.0, 1.0, 0.0));
+  fn(COLLIDER_1_VERTS, COLLIDER_1_IDX);
+
+  normals.resize(COLLIDER_2_VERTS.size());
+  std::fill(normals.begin(), normals.end(), Vector3(0.0, 1.0, 0.0));
+  fn(COLLIDER_2_VERTS, COLLIDER_2_IDX);
+  END_TEST;
+}
+
+int UtcDaliNavigationMeshGetBinaryTest(void)
+{
+  tet_infoline("UtcDaliNavigationMeshGetBinaryTest: Creates meshes dynamically, reloads binaries and compares");
+
+  // Test 10 collider meshes
+  for(auto i = 0u; i < 10; ++i)
+  {
+    auto colliderMesh = NavigationMeshFactory::CreateFromBuffer(GetTestColliderMesh(i));
+    auto binary       = NavigationMeshFactory::GetMeshBinary(*colliderMesh);
+    DALI_TEST_EQUALS(binary.size() > 0, true, TEST_LOCATION);
+
+    auto colliderMesh2 = NavigationMeshFactory::CreateFromBuffer(binary);
+
+    DALI_TEST_EQUALS(colliderMesh->GetFaceCount(), colliderMesh2->GetFaceCount(), TEST_LOCATION);
+    DALI_TEST_EQUALS(colliderMesh->GetVertexCount(), colliderMesh2->GetVertexCount(), TEST_LOCATION);
+    DALI_TEST_EQUALS(colliderMesh->GetEdgeCount(), colliderMesh2->GetEdgeCount(), TEST_LOCATION);
+
+    // test vertices
+    for(auto idx = 0u; idx < colliderMesh->GetFaceCount(); ++idx)
+    {
+      auto v0  = colliderMesh->GetVertex(idx);
+      auto v1  = colliderMesh2->GetVertex(idx);
+      auto co0 = Vector3(v0->coordinates);
+      auto co1 = Vector3(v1->coordinates);
+      DALI_TEST_EQUALS(co0, co1, std::numeric_limits<float>::epsilon(), TEST_LOCATION);
+    }
+
+    // test face
+    for(auto idx = 0u; idx < colliderMesh->GetFaceCount(); ++idx)
+    {
+      auto  f0  = colliderMesh->GetFace(idx);
+      auto  f1  = colliderMesh2->GetFace(idx);
+      auto& vi0 = f0->vertex;
+      auto& vi1 = f1->vertex;
+      DALI_TEST_EQUALS(vi0[0], vi1[0], TEST_LOCATION);
+      DALI_TEST_EQUALS(vi0[1], vi1[1], TEST_LOCATION);
+      DALI_TEST_EQUALS(vi0[2], vi1[2], TEST_LOCATION);
+    }
+  }
+
+  END_TEST;
+}
+
+int UtcDaliColliderMeshModelNodeSetup(void)
+{
+  tet_infoline("UtcDaliColliderMeshModelNodeSetup: Test different variants of setting up a collider mesh to the node");
+
+  ToolkitTestApplication   application;
+  Dali::Scene3D::ModelNode node  = Dali::Scene3D::ModelNode::New();
+  Dali::Scene3D::Model     model = Dali::Scene3D::Model::New();
+  model.AddModelNode(node);
+
+  application.GetWindow().Add(model);
+  application.SendNotification();
+  application.Render();
+
+  auto colliderMesh = NavigationMeshFactory::CreateFromBuffer(GetTestColliderMesh(0));
+
+  // Redundant setup test
+  DALI_TEST_EQUALS(node.HasColliderMesh(), false, TEST_LOCATION);
+  node.SetColliderMesh(nullptr);
+  DALI_TEST_EQUALS(node.HasColliderMesh(), false, TEST_LOCATION);
+  node.SetColliderMesh(std::move(colliderMesh));
+  DALI_TEST_EQUALS(node.HasColliderMesh(), true, TEST_LOCATION);
+
+  // Reset collider mesh
+  node.SetColliderMesh(nullptr);
+  DALI_TEST_EQUALS(node.HasColliderMesh(), false, TEST_LOCATION);
+
+  auto colliderMesh2 = NavigationMeshFactory::CreateFromBuffer(GetTestColliderMesh(1));
+  auto colliderMesh3 = NavigationMeshFactory::CreateFromBuffer(GetTestColliderMesh(2));
+
+  const auto& cm2 = *colliderMesh2;
+  const auto& cm3 = *colliderMesh3;
+
+  node.SetColliderMesh(std::move(colliderMesh2));
+  DALI_TEST_EQUALS(node.HasColliderMesh(), true, TEST_LOCATION);
+  DALI_TEST_EQUALS(&node.GetColliderMesh(), &cm2, TEST_LOCATION);
+  node.SetColliderMesh(std::move(colliderMesh3));
+  DALI_TEST_EQUALS(node.HasColliderMesh(), true, TEST_LOCATION);
+  DALI_TEST_EQUALS(&node.GetColliderMesh(), &cm3, TEST_LOCATION);
+
+  node.SetColliderMesh(nullptr);
+  DALI_TEST_EQUALS(node.HasColliderMesh(), false, TEST_LOCATION);
+
+  END_TEST;
+}
index 38169a2..b861c66 100644 (file)
@@ -166,6 +166,7 @@ void TestGlAbstraction::Initialize()
     {"uMvpMatrix", GL_FLOAT_MAT4, 1},
     {"uNormalMatrix", GL_FLOAT_MAT4, 1},
     {"uProjection", GL_FLOAT_MAT4, 1},
+    {"uScale", GL_FLOAT_VEC3, 1},
     {"uSize", GL_FLOAT_VEC3, 1},
     {"uViewMatrix", GL_FLOAT_MAT4, 1},
     {"uLightCameraProjectionMatrix", GL_FLOAT_MAT4, 1},
index 2ca98dc..3f04a6b 100644 (file)
@@ -1041,7 +1041,32 @@ public:
 
     for(const auto& uniform : mActiveUniforms)
     {
-      GetUniformLocation(program, uniform.name.c_str());
+      std::string name = uniform.name;
+      if(uniform.size <= 1)
+      {
+        GetUniformLocation(program, name.c_str());
+      }
+      else
+      {
+        // Convert single active uniform from "uBlah[0]" or "uStruct[0].element" to N versions of the same
+        std::string suffix;
+        auto        iter = name.find("["); // Search for index operator
+        if(iter != std::string::npos)
+        {
+          name = uniform.name.substr(0, iter); // Strip off index operator
+          iter = uniform.name.find("]");
+          if(iter != std::string::npos && iter + 1 != uniform.name.length())
+          {
+            suffix = uniform.name.substr(iter + 1);
+          }
+        }
+        for(int i = 0; i < uniform.size; ++i)
+        {
+          std::stringstream nss;
+          nss << name << "[" << i << "]" << suffix;
+          GetUniformLocation(program, nss.str().c_str()); // Generate N uniforms in the uniform map
+        }
+      }
     }
 
     for(const auto& uniform : mCustomUniformData)
index 7b3e6c8..3998fde 100644 (file)
@@ -54,6 +54,7 @@ static const std::vector<UniformData> UNIFORMS =
     UniformData("uMvpMatrix", Property::Type::MATRIX),
     UniformData("uNormalMatrix", Property::Type::MATRIX3),
     UniformData("uProjection", Property::Type::MATRIX),
+    UniformData("uScale", Property::Type::VECTOR3),
     UniformData("uSize", Property::Type::VECTOR3),
     UniformData("uViewMatrix", Property::Type::MATRIX),
     UniformData("uLightCameraProjectionMatrix", Property::Type::MATRIX),
index 99eb3e4..4d281e5 100644 (file)
@@ -392,6 +392,7 @@ ALIASES += SINCE_1_9="@since 1.9"
 ALIASES += SINCE_2_0="@since 2.0"
 ALIASES += SINCE_2_1="@since 2.1"
 ALIASES += SINCE_2_2="@since 2.2"
+ALIASES += SINCE_2_3="@since 2.3"
 
 # Extra tags for Tizen 3.0
 ALIASES += SINCE_1_2_2="@since 1.2.2"
@@ -422,6 +423,7 @@ ALIASES += DEPRECATED_1_4="@deprecated Deprecated since 1.4"
 ALIASES += DEPRECATED_2_0="@deprecated Deprecated since 2.0"
 ALIASES += DEPRECATED_2_1="@deprecated Deprecated since 2.1"
 ALIASES += DEPRECATED_2_2="@deprecated Deprecated since 2.2"
+ALIASES += DEPRECATED_2_3="@deprecated Deprecated since 2.3"
 
 ALIASES += PLATFORM=""
 ALIASES += PRIVLEVEL_PLATFORM=""
@@ -443,7 +445,8 @@ ALIASES += REMARK_RAWVIDEO=""
 #ALIASES += SINCE_1_9="\par Since:\n 6.0, DALi version 1.9"
 #ALIASES += SINCE_2_0="\par Since:\n 6.5, DALi version 2.0"
 #ALIASES += SINCE_2_1="\par Since:\n 7.0, DALi version 2.1"
-#ALIASES += SINCE_2_2="\par Since:\n 7.5, DALi version 2.2"
+#ALIASES += SINCE_2_2="\par Since:\n 8.0, DALi version 2.2"
+#ALIASES += SINCE_2_3="\par Since:\n 9.0, DALi version 2.3"
 
 ## Extra tags for Tizen 3.0
 #ALIASES += SINCE_1_2_2="\par Since:\n 3.0, DALi version 1.2.2"
@@ -475,7 +478,8 @@ ALIASES += REMARK_RAWVIDEO=""
 #ALIASES += DEPRECATED_1_4="@deprecated Deprecated since 5.5, DALi version 1.4"
 #ALIASES += DEPRECATED_2_0="@deprecated Deprecated since 6.5, DALi version 2.0"
 #ALIASES += DEPRECATED_2_1="@deprecated Deprecated since 7.0, DALi version 2.1"
-#ALIASES += DEPRECATED_2_2="@deprecated Deprecated since 7.5, DALi version 2.2"
+#ALIASES += DEPRECATED_2_2="@deprecated Deprecated since 8.0, DALi version 2.2"
+#ALIASES += DEPRECATED_2_3="@deprecated Deprecated since 9.0, DALi version 2.3"
 
 #ALIASES += PLATFORM="@platform"
 #ALIASES += PRIVLEVEL_PLATFORM="\par Privilege Level:\n platform"
index 61485fb..81b999d 100644 (file)
@@ -31,13 +31,6 @@ using Poly   = Dali::Scene3D::Algorithm::NavigationMesh::Face;
 using Edge   = Dali::Scene3D::Algorithm::NavigationMesh::Edge;
 using Vertex = Dali::Scene3D::Algorithm::NavigationMesh::Vertex;
 
-// Internal Navigation ray structure
-struct NavigationRay
-{
-  Dali::Vector3 origin;    // Origin of ray
-  Dali::Vector3 direction; // Direction of ray
-};
-
 /**
  * Helper function calculating intersection point between triangle and ray
  */
@@ -260,17 +253,61 @@ NavigationMesh::IntersectResult NavigationMesh::NavigationRayFaceIntersection(Na
   return result;
 }
 
+NavigationMesh::IntersectResult NavigationMesh::RayCastIntersect(NavigationRay& rayOrig) const
+{
+  auto                       faceCount = GetFaceCount();
+  std::list<IntersectResult> results;
+
+  NavigationRay ray;
+
+  ray.origin = PointSceneToLocal(rayOrig.origin); // origin is equal position
+
+  // Ray direction matches gravity direction
+  ray.direction = PointSceneToLocal(rayOrig.origin + rayOrig.direction) - ray.origin;
+  ray.direction.Normalize();
+  for(auto i = 0u; i < faceCount; ++i)
+  {
+    auto result = NavigationRayFaceIntersection(ray, *GetFace(i));
+    if(result.result)
+    {
+      result.faceIndex = i;
+      if(results.empty())
+      {
+        results.push_back(result);
+      }
+      else
+      {
+        for(auto it = results.begin(); it != results.end(); ++it)
+        {
+          if((*it).distance > result.distance)
+          {
+            results.insert(it, result);
+            break;
+          }
+        }
+      }
+    }
+  }
+  if(!results.empty())
+  {
+    return results.front();
+  }
+  else
+  {
+    return IntersectResult{Vector3::ZERO, 0.0f, 0u, false};
+  }
+}
+
 void NavigationMesh::SetTransform(const Dali::Matrix& transform)
 {
-  mTransform = transform;
-  transform.InvertTransform(mTransformInverse);
+  mTransform        = transform;
+  mTransformInverse = mTransform;
+  mTransformInverse.Invert();
 }
 
 Dali::Vector3 NavigationMesh::PointSceneToLocal(const Dali::Vector3& point) const
 {
-  // Transform point into navmesh space
-  Dali::Vector4 invNewPos = mTransformInverse * Dali::Vector4(point.x, -point.y, point.z, 1.0f);
-  invNewPos.y *= -1.0f;
+  Dali::Vector4 invNewPos = mTransformInverse * Dali::Vector4(point.x, point.y, point.z, 1.0f);
 
   return Dali::Vector3(invNewPos.AsFloat());
 }
@@ -278,8 +315,7 @@ Dali::Vector3 NavigationMesh::PointSceneToLocal(const Dali::Vector3& point) cons
 Dali::Vector3 NavigationMesh::PointLocalToScene(const Dali::Vector3& point) const
 {
   // Transform point into scene transform space
-  Dali::Vector4 newPos = mTransform * Dali::Vector4(point.x, -point.y, point.z, 1.0f);
-  newPos.y *= -1.0f;
+  Dali::Vector4 newPos = mTransform * Dali::Vector4(point.x, point.y, point.z, 1.0f);
 
   return Dali::Vector3(newPos.AsFloat());
 }
index f1db5db..6a82787 100644 (file)
@@ -40,7 +40,12 @@ class NavigationMeshFactory;
 
 namespace Dali::Scene3D::Internal::Algorithm
 {
-class NavigationRay;
+// Internal Navigation ray structure
+struct NavigationRay
+{
+  Dali::Vector3 origin;    // Origin of ray
+  Dali::Vector3 direction; // Direction of ray
+};
 
 // Make each to change each index value's type here.
 using VertexIndex = Dali::Scene3D::Algorithm::VertexIndex;
@@ -138,6 +143,14 @@ public:
   IntersectResult NavigationRayFaceIntersection(NavigationRay& ray, const Face& face) const;
 
   /**
+   * @brief Test ray against the mesh and returns intersection result
+   * @param[in] rayOrig Input ray to test collision
+   *
+   * @return Valid IntersectResult structure
+   */
+  IntersectResult RayCastIntersect(NavigationRay& rayOrig) const;
+
+  /**
    * @copydoc Dali::Scene3D::Algorithm::NavigationMesh::PointSceneToLocal()
    */
   Dali::Vector3 PointSceneToLocal(const Dali::Vector3& point) const;
@@ -152,6 +165,15 @@ public:
    */
   [[nodiscard]] Dali::Vector3 GetGravityVector() const;
 
+  /**
+   * @brief Returns binary data of the mesh
+   * @return Reference to the binary buffer
+   */
+  [[nodiscard]] const std::vector<uint8_t>& GetData() const
+  {
+    return mBuffer;
+  }
+
 private:
   std::vector<uint8_t>     mBuffer;           //< Data buffer
   NavigationMeshHeader_V10 mHeader;           //< Navigation mesh header
@@ -165,6 +187,11 @@ inline Internal::Algorithm::NavigationMesh& GetImplementation(Dali::Scene3D::Alg
   return *navigationMesh.mImpl;
 }
 
+inline const Internal::Algorithm::NavigationMesh& GetImplementation(const Dali::Scene3D::Algorithm::NavigationMesh& navigationMesh)
+{
+  return *navigationMesh.mImpl;
+}
+
 } // namespace Dali::Scene3D::Internal::Algorithm
 
 #endif // DALI_SCENE3D_INTERNAL_NAVIGATION_MESH_H
index 315a368..0171b1e 100644 (file)
@@ -34,6 +34,7 @@
 #include <dali-scene3d/internal/common/image-resource-loader.h>
 #include <dali-scene3d/internal/common/model-cache-manager.h>
 #include <dali-scene3d/internal/controls/scene-view/scene-view-impl.h>
+#include <dali-scene3d/internal/event/collider-mesh-processor.h>
 #include <dali-scene3d/internal/light/light-impl.h>
 #include <dali-scene3d/internal/model-components/model-node-impl.h>
 #include <dali-scene3d/public-api/controls/model/model.h>
@@ -45,7 +46,7 @@
 #include <dali-scene3d/public-api/loader/scene-definition.h>
 #include <dali-scene3d/public-api/loader/shader-manager.h>
 #include <dali-scene3d/public-api/model-motion/motion-index/blend-shape-index.h>
-
+#include <dali-toolkit/public-api/controls/control-impl.h>
 using namespace Dali;
 
 namespace Dali
@@ -312,14 +313,48 @@ void Model::AddModelNode(Scene3D::ModelNode modelNode)
     UpdateImageBasedLightScaleFactor();
   }
 
+  GetImplementation(modelNode).SetRootModel(*this);
+
+  // If model has a collider mesh set, add it to the container
+  if(modelNode.HasColliderMesh())
+  {
+    Scene3D::ColliderMeshProcessor::Get().ColliderMeshChanged(Scene3D::Model::DownCast(Self()));
+  }
+
   if(Self().GetProperty<bool>(Dali::Actor::Property::CONNECTED_TO_SCENE))
   {
     NotifyResourceReady();
   }
 }
 
+void Model::RegisterColliderMesh(Scene3D::ModelNode& modelNode, const Dali::Scene3D::Algorithm::ColliderMesh& mesh)
+{
+  mColliderMeshes[modelNode.GetProperty<int>(Actor::Property::ID)] = modelNode;
+
+  // Add processor
+  Scene3D::ColliderMeshProcessor::Get().ColliderMeshChanged(Scene3D::Model::DownCast(Self()));
+}
+
+void Model::RemoveColliderMesh(Scene3D::ModelNode& node)
+{
+  auto id   = node.GetProperty<int>(Actor::Property::ID);
+  auto iter = std::find_if(mColliderMeshes.begin(), mColliderMeshes.end(), [id](auto& item) {
+    return item.first == id;
+  });
+  if(iter != mColliderMeshes.end())
+  {
+    mColliderMeshes.erase(iter);
+  }
+}
+
 void Model::RemoveModelNode(Scene3D::ModelNode modelNode)
 {
+  // remove collider mesh from the list if node is being removed
+  if(modelNode.HasColliderMesh())
+  {
+    RemoveColliderMesh(modelNode);
+  }
+
   if(mModelRoot)
   {
     UpdateShaderRecursively(modelNode, nullptr);
index b740da4..ff9ba0c 100644 (file)
 #include <dali/public-api/object/property-notification.h>
 #include <dali/public-api/object/weak-handle.h>
 #include <dali/public-api/rendering/texture.h>
+#include <unordered_map>
 
 // INTERNAL INCLUDES
 #include <dali-scene3d/internal/common/environment-map-load-task.h>
 #include <dali-scene3d/internal/common/light-observer.h>
 #include <dali-scene3d/internal/common/model-load-task.h>
+#include <dali-scene3d/internal/model-components/model-node-impl.h>
 #include <dali-scene3d/public-api/controls/model/model.h>
 #include <dali-scene3d/public-api/controls/scene-view/scene-view.h>
 #include <dali-scene3d/public-api/light/light.h>
@@ -56,6 +58,11 @@ public:
   using CameraData             = Loader::CameraParameters;
   using BlendShapeModelNodeMap = std::map<std::string, std::vector<Scene3D::ModelNode>>;
 
+  // ColliderMeshContainer doesn't hold actual collider meshes
+  // but pairs unique ModelNode id with ModelNode for lookup purposes.
+  // All model nodes in the container have collider mesh attached.
+  using ColliderMeshContainer = std::unordered_map<int, Scene3D::ModelNode>;
+
   /**
    * @copydoc Model::New()
    */
@@ -166,6 +173,53 @@ public:
    */
   void SetMotionData(Scene3D::MotionData motionData);
 
+  /**
+   * @copydoc Scene3D::Model::MeshHitSignal()
+   */
+  Scene3D::Model::MeshHitSignalType& MeshHitSignal()
+  {
+    return mMeshHitSignal;
+  }
+
+  /**
+   * @brief Emits MeshHitSignal
+   * @param[in] modelNode ModelNode that has been hit
+   * @return Result of hit handling.
+   */
+  bool EmitMeshHitSignal(Scene3D::ModelNode modelNode)
+  {
+    bool retVal = false;
+    if(!mMeshHitSignal.Empty())
+    {
+      Scene3D::Model handle(GetOwner());
+      retVal = mMeshHitSignal.Emit(handle, modelNode);
+    }
+    return retVal;
+  }
+
+  /**
+   * @brief Returns collider mesh container
+   * @return Returns valid container
+   */
+  const ColliderMeshContainer& GetNodeColliderMeshContainer() const
+  {
+    return mColliderMeshes;
+  }
+
+  /**
+   * @brief Registers child node with collidier mesh
+   *
+   * @param[in] node ModelNode to register
+   * @param[in] mesh Collider mesh to associate with model node
+   */
+  void RegisterColliderMesh(Scene3D::ModelNode& node, const Dali::Scene3D::Algorithm::ColliderMesh& mesh);
+
+  /**
+   * @brief Removes node/collider mesh from the register
+   * @param[in] node Child node to remove from the register
+   */
+  void RemoveColliderMesh(Scene3D::ModelNode& node);
+
 protected:
   /**
    * @brief Constructs a new Model.
@@ -356,8 +410,13 @@ private:
   WeakHandle<Scene3D::SceneView> mParentSceneView;
   Dali::PropertyNotification     mSizeNotification;
 
+  // Signals
+  Scene3D::Model::MeshHitSignalType mMeshHitSignal;
+
   Dali::Scene3D::Loader::ShaderManagerPtr mShaderManager;
 
+  ColliderMeshContainer mColliderMeshes;
+
   // List of ModelNode for name of blend shape.
   BlendShapeModelNodeMap mBlendShapeModelNodeMap;
 
diff --git a/dali-scene3d/internal/event/collider-mesh-processor-impl.cpp b/dali-scene3d/internal/event/collider-mesh-processor-impl.cpp
new file mode 100644 (file)
index 0000000..d8ce462
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-scene3d/internal/event/collider-mesh-processor-impl.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/devel-api/events/hit-test-algorithm.h>
+#include <dali/integration-api/adaptor-framework/adaptor.h>
+#include <dali/public-api/events/touch-event.h>
+#include <dali/public-api/render-tasks/render-task-list.h>
+#include <algorithm>
+
+// INTERNAL INCLUDES
+#include <dali-scene3d/internal/controls/model/model-impl.h>
+#include <dali-scene3d/internal/controls/scene-view/scene-view-impl.h>
+#include <dali-scene3d/public-api/controls/scene-view/scene-view.h>
+
+namespace Dali::Scene3D::Internal
+{
+namespace
+{
+struct ColliderMeshData
+{
+  Scene3D::Model                                model;
+  Scene3D::ModelNode                            modelNode;
+  const Dali::Scene3D::Algorithm::ColliderMesh& colliderMesh;
+  Matrix                                        worldMatrix{false};
+};
+using ColliderMeshDataContainer = std::vector<ColliderMeshData>;
+
+void IterateThroughChildren(Actor actor, ColliderMeshDataContainer& meshData)
+{
+  if(actor)
+  {
+    const auto childCount = actor.GetChildCount();
+    for(auto i = 0u; i < childCount; ++i)
+    {
+      Actor          child = actor.GetChildAt(i);
+      Scene3D::Model model = Scene3D::Model::DownCast(child);
+      if(model)
+      {
+        const Model::ColliderMeshContainer& colliderMeshes = GetImpl(model).GetNodeColliderMeshContainer();
+        for(const auto& colliderMeshItem : colliderMeshes)
+        {
+          // If actor name is empty, then assume the mesh if for the model itself
+          [[maybe_unused]] int     actorId   = colliderMeshItem.first;
+          Dali::Scene3D::ModelNode modelNode = colliderMeshItem.second;
+          if(modelNode)
+          {
+            meshData.push_back({model, modelNode, GetImplementation(modelNode).GetColliderMesh(), DevelActor::GetWorldTransform(modelNode)});
+          }
+        }
+      }
+      IterateThroughChildren(child, meshData);
+    }
+  }
+}
+
+class SceneViewTouchHandler
+{
+public:
+  bool operator()(Actor actor, const TouchEvent& touchEvent)
+  {
+    Scene3D::SceneView sceneView = Scene3D::SceneView::DownCast(actor);
+    bool               retVal(false);
+    if(sceneView)
+    {
+      // Get nav-mesh information for the children
+      std::vector<ColliderMeshData> meshData;
+      IterateThroughChildren(sceneView, meshData);
+
+      auto renderTask  = touchEvent.GetRenderTask();
+      auto cameraActor = renderTask.GetCameraActor();
+
+      const auto& result = touchEvent.GetScreenPosition(0);
+      float       x = 0.0f, y = 0.0f;
+      Vector3     origin;
+      Vector3     direction;
+      cameraActor.ScreenToLocal(x, y, result.x, result.y);
+
+      auto                  list      = Stage::GetCurrent().GetRenderTaskList();
+      [[maybe_unused]] auto taskCount = list.GetTaskCount();
+      renderTask                      = list.GetTask(list.GetTaskCount() - 1);
+
+      if(HitTestAlgorithm::BuildPickingRay(renderTask, result, origin, direction))
+      {
+        for(auto& mesh : meshData)
+        {
+          // Set transform for the collider mesh
+          const_cast<Dali::Scene3D::Algorithm::ColliderMesh&>(mesh.colliderMesh).SetSceneTransform(mesh.worldMatrix);
+          auto res = mesh.colliderMesh.RayFaceIntersect(origin, direction);
+          if(res != Dali::Scene3D::Algorithm::NavigationMesh::NULL_FACE)
+          {
+            Scene3D::Model            model     = mesh.model;
+            Scene3D::Internal::Model& modelImpl = GetImpl(model);
+            retVal                              = modelImpl.EmitMeshHitSignal(mesh.modelNode);
+            break;
+          }
+        }
+      }
+    }
+    return retVal;
+  }
+};
+
+} // unnamed namespace
+
+ColliderMeshProcessor::ColliderMeshProcessor()
+{
+  Adaptor::Get().RegisterProcessor(*this, true);
+}
+
+ColliderMeshProcessor::~ColliderMeshProcessor()
+{
+  if(Adaptor::IsAvailable())
+  {
+    Adaptor::Get().UnregisterProcessor(*this, true);
+  }
+}
+
+void ColliderMeshProcessor::ColliderMeshChanged(Scene3D::Model model)
+{
+  if(model.GetProperty<bool>(Actor::Property::CONNECTED_TO_SCENE))
+  {
+    AddSceneViewParentToProcessingQueue(model);
+  }
+  else
+  {
+    // TODO: Check if signal already connected
+    model.OnSceneSignal().Connect(this, &ColliderMeshProcessor::ModelOnScene);
+  }
+}
+
+void ColliderMeshProcessor::ModelOnScene(Actor actor)
+{
+  Scene3D::Model model = Scene3D::Model::DownCast(actor);
+  if(model)
+  {
+    AddSceneViewParentToProcessingQueue(model);
+  }
+  model.OnSceneSignal().Disconnect(this, &ColliderMeshProcessor::ModelOnScene);
+}
+
+void ColliderMeshProcessor::AddSceneViewParentToProcessingQueue(Scene3D::Model model)
+{
+  Actor actor = model;
+  do
+  {
+    actor = actor.GetParent();
+    Scene3D::SceneView sceneView(Scene3D::SceneView::DownCast(actor));
+    if(sceneView)
+    {
+      mSceneViewsToProcess.push_back(sceneView);
+      break;
+    }
+  } while(actor);
+}
+
+void ColliderMeshProcessor::Process(bool /* postProcess */)
+{
+  // Remove any duplicates
+  std::sort(mSceneViewsToProcess.begin(), mSceneViewsToProcess.end());
+  mSceneViewsToProcess.erase(std::unique(mSceneViewsToProcess.begin(), mSceneViewsToProcess.end()), mSceneViewsToProcess.end());
+
+  for(auto sceneView : mSceneViewsToProcess)
+  {
+    std::vector<ColliderMeshData> meshData;
+    IterateThroughChildren(sceneView, meshData);
+
+    if(meshData.size())
+    {
+      // TODO: Get SceneView Camera parameters and calculate bounding box
+      // for now, it's a pass-thru algorthm
+      if(std::find(mConnectedSceneViews.begin(), mConnectedSceneViews.end(), sceneView) == mConnectedSceneViews.end())
+      {
+        mConnectedSceneViews.push_back(sceneView);
+        // TODO: Consider passing in camera parameters and meshData into SceneViewTouchHandler
+        sceneView.TouchedSignal().Connect(this, SceneViewTouchHandler());
+      }
+    }
+  }
+  mSceneViewsToProcess.clear();
+}
+
+} // namespace Dali::Scene3D::Internal
diff --git a/dali-scene3d/internal/event/collider-mesh-processor-impl.h b/dali-scene3d/internal/event/collider-mesh-processor-impl.h
new file mode 100644 (file)
index 0000000..45c7b18
--- /dev/null
@@ -0,0 +1,77 @@
+#pragma once
+
+/*
+ * Copyright (c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/processor-interface.h>
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/object/base-handle.h>
+#include <dali/public-api/object/base-object.h>
+#include <dali/public-api/signals/connection-tracker.h>
+
+// INTERNAL INCLUDES
+#include <dali-scene3d/internal/event/collider-mesh-processor.h>
+#include <dali-scene3d/public-api/controls/model/model.h>
+#include <dali-scene3d/public-api/controls/scene-view/scene-view.h>
+
+namespace Dali::Scene3D
+{
+namespace Internal
+{
+class ColliderMeshProcessor : public BaseObject, public Dali::ConnectionTracker, public Integration::Processor
+{
+public:
+  ColliderMeshProcessor();
+
+  ~ColliderMeshProcessor();
+
+  void ColliderMeshChanged(Scene3D::Model model);
+
+private:
+  void ModelOnScene(Actor actor);
+
+  void Process(bool /*postProcessor*/);
+
+  void AddSceneViewParentToProcessingQueue(Scene3D::Model model);
+
+private:
+  std::vector<Scene3D::SceneView> mSceneViewsToProcess;
+  std::vector<Scene3D::SceneView> mConnectedSceneViews;
+};
+
+} // namespace Internal
+
+inline Internal::ColliderMeshProcessor& GetImpl(ColliderMeshProcessor& obj)
+{
+  DALI_ASSERT_ALWAYS(obj);
+
+  Dali::BaseObject& handle = obj.GetBaseObject();
+
+  return static_cast<Internal::ColliderMeshProcessor&>(handle);
+}
+
+inline const Internal::ColliderMeshProcessor& GetImpl(const ColliderMeshProcessor& obj)
+{
+  DALI_ASSERT_ALWAYS(obj);
+
+  const Dali::BaseObject& handle = obj.GetBaseObject();
+
+  return static_cast<const Internal::ColliderMeshProcessor&>(handle);
+}
+
+} // namespace Dali::Scene3D
diff --git a/dali-scene3d/internal/event/collider-mesh-processor.cpp b/dali-scene3d/internal/event/collider-mesh-processor.cpp
new file mode 100644 (file)
index 0000000..9f0ca0d
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-scene3d/internal/event/collider-mesh-processor.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/common/singleton-service.h>
+
+// INTERNAL INCLUDES
+#include <dali-scene3d/internal/event/collider-mesh-processor-impl.h>
+
+namespace Dali::Scene3D
+{
+ColliderMeshProcessor ColliderMeshProcessor::Get()
+{
+  ColliderMeshProcessor processor;
+
+  // Check whether the processor has already created
+  SingletonService singletonService(SingletonService::Get());
+  if(singletonService)
+  {
+    Dali::BaseHandle handle = singletonService.GetSingleton(typeid(ColliderMeshProcessor));
+    if(handle)
+    {
+      // If so, downcast the handle of singleton to focus manager
+      processor = ColliderMeshProcessor(dynamic_cast<Internal::ColliderMeshProcessor*>(handle.GetObjectPtr()));
+    }
+
+    if(!processor)
+    {
+      // If not, create the focus manager and register it as a singleton
+      processor = ColliderMeshProcessor(new Internal::ColliderMeshProcessor());
+      singletonService.Register(typeid(processor), processor);
+    }
+  }
+
+  return processor;
+}
+
+void ColliderMeshProcessor::ColliderMeshChanged(Scene3D::Model model)
+{
+  GetImpl(*this).ColliderMeshChanged(model);
+}
+
+ColliderMeshProcessor::ColliderMeshProcessor(Internal::ColliderMeshProcessor* impl)
+: BaseHandle(impl)
+{
+}
+
+} // namespace Dali::Scene3D
diff --git a/dali-scene3d/internal/event/collider-mesh-processor.h b/dali-scene3d/internal/event/collider-mesh-processor.h
new file mode 100644 (file)
index 0000000..0d874ee
--- /dev/null
@@ -0,0 +1,47 @@
+#pragma once
+
+/*
+ * Copyright (c) 2023 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/base-handle.h>
+
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/controls/model/model.h>
+
+namespace Dali::Scene3D
+{
+namespace Internal
+{
+class ColliderMeshProcessor;
+}
+
+class ColliderMeshProcessor : public BaseHandle
+{
+public:
+  ColliderMeshProcessor()  = default;
+  ~ColliderMeshProcessor() = default;
+
+  static ColliderMeshProcessor Get();
+
+  void ColliderMeshChanged(Scene3D::Model model);
+
+private:
+  explicit ColliderMeshProcessor(Internal::ColliderMeshProcessor* impl);
+};
+
+} // namespace Dali::Scene3D
index 48025c6..1ca545c 100644 (file)
@@ -11,6 +11,8 @@ set(scene3d_src_files ${scene3d_src_files}
        ${scene3d_internal_dir}/common/model-load-task.cpp
        ${scene3d_internal_dir}/controls/model/model-impl.cpp
        ${scene3d_internal_dir}/controls/scene-view/scene-view-impl.cpp
+       ${scene3d_internal_dir}/event/collider-mesh-processor.cpp
+       ${scene3d_internal_dir}/event/collider-mesh-processor-impl.cpp
        ${scene3d_internal_dir}/light/light-impl.cpp
        ${scene3d_internal_dir}/loader/dli-loader-impl.cpp
        ${scene3d_internal_dir}/loader/gltf2-asset.cpp
index 6cbc92b..d566163 100644 (file)
@@ -24,6 +24,7 @@
 #include <dali/public-api/object/type-registry.h>
 
 // INTERNAL INCLUDES
+#include <dali-scene3d/internal/controls/model/model-impl.h>
 #include <dali-scene3d/internal/light/light-impl.h>
 #include <dali-scene3d/internal/model-components/model-primitive-impl.h>
 
@@ -405,6 +406,52 @@ void ModelNode::UpdateBoneMatrix(Scene3D::ModelPrimitive primitive)
   }
 }
 
+void ModelNode::SetColliderMesh(ColliderMeshUniquePtr&& colliderMesh)
+{
+  if(!colliderMesh && !mColliderMesh)
+  {
+    return;
+  }
+
+  if(!mParentModel) // find parent model if not set
+  {
+    auto parent = Self().GetParent();
+    while(parent)
+    {
+      auto modelHandle = Scene3D::Model::DownCast(parent);
+      if(modelHandle)
+      {
+        mParentModel = &GetImpl(modelHandle);
+        break;
+      }
+      parent = parent.GetParent();
+    }
+  }
+
+  // Resetting collider mesh if argument is nullptr
+  auto handle = Scene3D::ModelNode::DownCast(Self());
+  if(mParentModel)
+  {
+    if(mColliderMesh || colliderMesh == nullptr)
+    {
+      mParentModel->RemoveColliderMesh(handle);
+    }
+    mParentModel->RegisterColliderMesh(handle, *colliderMesh);
+  }
+
+  mColliderMesh = std::move(colliderMesh);
+}
+
+bool ModelNode::HasColliderMesh() const
+{
+  return mColliderMesh != nullptr;
+}
+
+const Scene3D::Algorithm::ColliderMesh& ModelNode::GetColliderMesh() const
+{
+  return *mColliderMesh;
+}
+
 } // namespace Internal
 
 } // namespace Scene3D
index 7399406..35f1c12 100644 (file)
@@ -27,6 +27,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-scene3d/internal/model-components/model-primitive-modify-observer.h>
+#include <dali-scene3d/public-api/algorithm/navigation-mesh.h>
 #include <dali-scene3d/public-api/light/light.h>
 #include <dali-scene3d/public-api/loader/mesh-definition.h>
 #include <dali-scene3d/public-api/loader/shader-manager.h>
@@ -34,6 +35,7 @@
 #include <dali-scene3d/public-api/loader/skinning-details.h>
 #include <dali-scene3d/public-api/model-components/model-node.h>
 #include <dali-scene3d/public-api/model-components/model-primitive.h>
+#include "dali-scene3d/public-api/controls/model/model.h"
 
 namespace Dali
 {
@@ -46,6 +48,7 @@ namespace Scene3D
 
 namespace Internal
 {
+using ColliderMeshUniquePtr = std::unique_ptr<Dali::Scene3D::Algorithm::ColliderMesh>;
 /**
  * @brief This is the internal base class for custom node of model.
  *
@@ -286,6 +289,30 @@ public: // Public Method
    */
   void OnRendererCreated(Renderer renderer) override;
 
+  /**
+   * @copydoc Dali::Scene3D::ModelNode::SetColliderMesh()
+   */
+  void SetColliderMesh(ColliderMeshUniquePtr&& colliderMesh);
+
+  /**
+   * @copydoc Dali::Scene3D::ModelNode::HasColliderMesh()
+   */
+  [[nodiscard]] bool HasColliderMesh() const;
+
+  /**
+   * @copydoc Dali::Scene3D::ModelNode::GetColliderMesh()
+   */
+  [[nodiscard]] const Scene3D::Algorithm::ColliderMesh& GetColliderMesh() const;
+
+  /**
+  * @brief Sets a root model for the ModelNode
+  * @param[in] model Valid Model to set
+  */
+  void SetRootModel(Dali::Scene3D::Internal::Model& model)
+  {
+    mParentModel = &model;
+  }
+
 private:
   /**
    * @brief Updates the bone matrix for a ModelPrimitive.
@@ -294,7 +321,6 @@ private:
    */
   void UpdateBoneMatrix(Scene3D::ModelPrimitive primitive);
 
-private:
   /// @cond internal
 
   // Not copyable or movable
@@ -311,8 +337,14 @@ private:
   Dali::Texture                     mShadowMapTexture;
   Dali::Texture                     mSpecularTexture;
   Dali::Texture                     mDiffuseTexture;
-  float                             mIblScaleFactor{1.0f};
-  uint32_t                          mSpecularMipmapLevels{1u};
+
+  Internal::Model* mParentModel{nullptr};
+
+  // Collider mesh
+  std::unique_ptr<Dali::Scene3D::Algorithm::ColliderMesh> mColliderMesh;
+
+  float    mIblScaleFactor{1.0f};
+  uint32_t mSpecularMipmapLevels{1u};
   /// @endcond
 };
 
index 9b594d1..4aff076 100644 (file)
@@ -91,4 +91,18 @@ Dali::Vector3 NavigationMesh::GetGravityVector() const
   return mImpl->GetGravityVector();
 }
 
+FaceIndex NavigationMesh::RayFaceIntersect(const Vector3& origin, const Vector3& direction) const
+{
+  Internal::Algorithm::NavigationRay ray;
+  ray.origin    = origin;
+  ray.direction = direction;
+
+  auto result = mImpl->RayCastIntersect(ray);
+  if(result.result)
+  {
+    return result.faceIndex;
+  }
+  return NULL_FACE;
+}
+
 } // namespace Dali::Scene3D::Algorithm
\ No newline at end of file
index 727f9fc..f856155 100644 (file)
@@ -252,6 +252,16 @@ public:
    */
   Dali::Vector3 GetGravityVector() const;
 
+  /**
+   * @brief Performs ray/face intersect test
+   * @param[in] origin Origin of ray
+   * @param[in] direction Direction of ray
+   *
+   * @SINCE_2_2.53
+   * @return Valid FaceIndex on hit or NULL_FACE on miss
+   */
+  [[nodiscard]] FaceIndex RayFaceIntersect(const Vector3& origin, const Vector3& direction) const;
+
   static constexpr FaceIndex NULL_FACE{std::numeric_limits<FaceIndex>::max()}; ///< Represents null face
   static constexpr EdgeIndex NULL_EDGE{std::numeric_limits<EdgeIndex>::max()}; ///< Represents null edge
 
@@ -260,5 +270,13 @@ public:
 
   std::unique_ptr<NavigationMeshImpl> mImpl;
 };
+
+// Alias name for collider mesh
+// TODO: currently ColliderMesh is NavigationMesh however
+//       there should be separation from data and algorithms.
+//       Both, NavigationMesh and ColliderMesh use the same
+//       data structures but differ in the way they use data.
+using ColliderMesh = NavigationMesh;
+
 } // namespace Dali::Scene3D::Algorithm
 #endif // DALI_SCENE3D_NAVIGATION_MESH_H
index 94c2b71..dd14e59 100644 (file)
@@ -38,17 +38,20 @@ namespace Dali::Scene3D::Algorithm
  * @class WayPoint
  *
  * The class represents a public interface to the WayPoint object
+ * @SINCE_2_2.12
  */
 class DALI_SCENE3D_API WayPoint
 {
 public:
   /**
    * @brief Constructor
+   * @SINCE_2_2.12
    */
   WayPoint();
 
   /**
    * @brief Destructor
+   * @SINCE_2_2.12
    */
   ~WayPoint();
 
@@ -58,6 +61,7 @@ public:
    * Function returns index of face withing the NavigationMesh
    * that the waypoint is associated with.
    *
+   * @SINCE_2_2.12
    * @return Valid index of the face
    */
   [[nodiscard]] uint32_t GetNavigationMeshFaceIndex() const;
@@ -68,6 +72,7 @@ public:
    * The face space uses the face barycentre as an origin. The x-axis is
    * aligned with x-axis of the NavigationMesh.
    *
+   * @SINCE_2_2.12
    * @return Valid 2D location vector
    */
   [[nodiscard]] Dali::Vector2 GetFaceLocalSpacePosition() const;
@@ -79,6 +84,7 @@ public:
    * of associated NavigationMesh object (using transformation set with
    * NavigationMesh::SetSceneTransform()).
    *
+   * @SINCE_2_2.12
    * @return Valid 3D location vector
    */
   [[nodiscard]] Dali::Vector3 GetScenePosition() const;
@@ -87,6 +93,7 @@ public:
    * @brief Copy constructor
    *
    * Only copy semantics is allowed on the WayPoint object
+   * @SINCE_2_2.12
    */
   WayPoint(const WayPoint&);
 
@@ -95,6 +102,7 @@ public:
    *
    * Only copy semantics is allowed on the WayPoint object
    *
+   * @SINCE_2_2.12
    * @return Copy of source object
    */
   WayPoint& operator=(const WayPoint&);
index 8b5e15c..5ff9fe4 100644 (file)
@@ -32,9 +32,9 @@ using WayPointList = std::vector<Scene3D::Algorithm::WayPoint>;
  */
 enum class PathFinderAlgorithm
 {
-  DIJKSTRA_SHORTEST_PATH, ///< Using A* variant (Dijkstra) finding a shortest path
-  SPFA,                   ///< Using SPFA-SLF (Shortest Path Fast Algorithm with Short Label First) finding a shortest path.
-  SPFA_DOUBLE_WAY,        ///< Using SPFA-SLF double way. It might not find shortest, but will use less memory.
+  DIJKSTRA_SHORTEST_PATH, ///< Using A* variant (Dijkstra) finding a shortest path. @SINCE_2_2.12
+  SPFA,                   ///< Using SPFA-SLF (Shortest Path Fast Algorithm with Short Label First) finding a shortest path. @SINCE_2_2.12
+  SPFA_DOUBLE_WAY,        ///< Using SPFA-SLF double way. It might not find shortest, but will use less memory. @SINCE_2_2.12
 
   DEFAULT = DIJKSTRA_SHORTEST_PATH, ///< Default algorithm to use
 };
@@ -43,18 +43,21 @@ enum class PathFinderAlgorithm
  * @class PathFinderBase
  *
  * Base class for implementation of pathfinding algorithms.
+ * @SINCE_2_2.12
  */
 class DALI_SCENE3D_API PathFinderBase
 {
 public:
   /**
    * @brief Destructor
+   * @SINCE_2_2.12
    */
   virtual ~PathFinderBase() = default;
 
   /**
    * @brief Looks for a path from point A to point B.
    *
+   * @SINCE_2_2.12
    * @param[in] positionFrom source position in NavigationMesh parent space
    * @param[in] positionTo target position in NavigationMesh parent space
    * @return List of waypoints for path or empty vector if no success
@@ -64,6 +67,7 @@ public:
   /**
    * @brief Finds path between NavigationMesh faces
    *
+   * @SINCE_2_2.12
    * @param[in] polyIndexFrom Index of start polygon
    * @param[in] polyIndexTo Index of end polygon
    * @return List of waypoints for path or empty vector if no success
@@ -76,12 +80,14 @@ public:
  *
  * PathFinder runs path finding algorithm on associated NavigationMesh
  * and returns a list of waypoints.
+ * @SINCE_2_2.12
  */
 class DALI_SCENE3D_API PathFinder
 {
 public:
   /**
    * @brief Creates new instance of path finder
+   * @SINCE_2_2.12
    * @param[in] navigationMesh Navigation mesh to associate with
    * @param[in] algorithm algorithm to use
    * @return Valid pointer to PathFinder object or nullptr
@@ -100,6 +106,7 @@ public:
    *
    * Both points should be defined in the same space as is used by the NavigationMesh.
    *
+   * @SINCE_2_2.12
    * @param[in] positionFrom Source position
    * @param[in] positionTo Target position
    * @return List of waypoints for path or empty list on failure
@@ -115,6 +122,7 @@ public:
    * - index < 0 or index > NavigationMesh::GetFaceCount()
    * - The path doesn't exist
    *
+   * @SINCE_2_2.12
    * @param[in] faceIndexFrom Source face index
    * @param[in] faceIndexTo Target face index
    * @return List of waypoints for path or empty list on failure
index a02e466..c6beb61 100644 (file)
 #include <dali-scene3d/internal/controls/model/model-impl.h>
 #include <dali-scene3d/public-api/model-components/model-node.h>
 
-namespace Dali
+namespace Dali::Scene3D
 {
-namespace Scene3D
-{
-Model::Model()
-{
-}
+Model::Model() = default;
 
 Model::Model(const Model& model) = default;
 
@@ -38,9 +34,7 @@ Model& Model::operator=(const Model& model) = default;
 
 Model& Model::operator=(Model&& rhs) noexcept = default;
 
-Model::~Model()
-{
-}
+Model::~Model() = default;
 
 Model Model::New(const std::string& modelUrl, const std::string& resourceDirectoryUrl)
 {
@@ -168,6 +162,9 @@ void Model::SetMotionData(MotionData motionData)
   GetImpl(*this).SetMotionData(motionData);
 }
 
-} // namespace Scene3D
+Model::MeshHitSignalType& Model::MeshHitSignal()
+{
+  return GetImpl(*this).MeshHitSignal();
+}
 
-} // namespace Dali
+} // namespace Dali::Scene3D
index 599eb91..f218876 100644 (file)
  */
 
 // EXTERNAL INCLUDES
+#include <memory>
+
 #include <dali-toolkit/public-api/controls/control.h>
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/rendering/texture.h>
 
 // INTERNAL INCLUDES
+#include <dali-scene3d/public-api/algorithm/navigation-mesh.h>
 #include <dali-scene3d/public-api/api.h>
 #include <dali-scene3d/public-api/model-components/model-node.h>
 #include <dali-scene3d/public-api/model-motion/motion-data.h>
@@ -71,6 +74,10 @@ class Model;
 class DALI_SCENE3D_API Model : public Dali::Toolkit::Control
 {
 public:
+  // Typedefs
+  using MeshHitSignalType = Signal<bool(Model, Scene3D::ModelNode)>; ///< Mesh hit signal type @SINCE_2_2.53
+  using ColliderMeshPtr   = std::unique_ptr<Algorithm::NavigationMesh>;
+
   /**
    * @brief Create an initialized Model.
    *
@@ -160,7 +167,7 @@ public:
    * @brief Add new ModelNode to this Model.
    * This modelNode will become child of ModelRoot.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] modelNode the root of ModelNode tree to be added.
    */
   void AddModelNode(ModelNode modelNode);
@@ -168,7 +175,7 @@ public:
   /**
    * @brief Remove ModelNode from this Model.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] modelNode the root of ModelNode tree to be removed.
    */
   void RemoveModelNode(ModelNode modelNode);
@@ -366,6 +373,23 @@ public:
    */
   void SetMotionData(Scene3D::MotionData motionData);
 
+  /**
+   * @brief This signal is emitted when the collider mesh is touched/hit.
+   *
+   * A callback of the following type may be connected:
+   * @code
+   *   bool YourCallbackName(Model model, ModelNode modelNode);
+   * @endcode
+   * Here the model is the model that is hit and the ModelNode containing the collider mesh
+   * was applied to.
+   * The return value of True, indicates that the hover event should be consumed.
+   * Otherwise the signal will be emitted on the next sensitive parent of the actor.
+   *
+   * @SINCE_2_2.53
+   * @return The signal to connect to
+   */
+  MeshHitSignalType& MeshHitSignal();
+
 public: // Not intended for application developers
   /// @cond internal
   /**
index 3fdb4ed..a3235f3 100644 (file)
 namespace Dali::Scene3D::Loader
 {
 /**
- * @return Given a name, provide a AlphaFunction; if the name was not
- *  recognised, get the default one.
+ * @brief Given a name, provides an AlphaFunction.
+ * @SINCE_2_0.7
+ * @return The AlphaFunction
+ * @note If the name was not recognised, the default one is returned
  */
 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.
+ * @brief Registers an alpha function only if one with the same @a name has not yet been registered.
+ * @SINCE_2_0.7
+ * @note Throws an exception if the name is not unique
  */
 void DALI_SCENE3D_API RegisterAlphaFunction(const std::string& name, AlphaFunction alphaFn) noexcept(false);
 
index 90b8a02..1ba4ad2 100644 (file)
 namespace Dali::Scene3D::Loader
 {
 /**
- * @brief Intermediate representation for a property that's given to
- *  a Animation to animate. Since there is no getting an
- *  animated property back from the Animation (i.e. past AnimateBetween/By/To()),
- *  changing properties (e.g. from the SDK) requires the whole Animation
- *  object to be recreated with all of its properties (incl. modifications).
+ * @brief Intermediate representation for a property that's given to a Animation to animate.
+ *
+ * Since there is no getting an animated property back from the Animation (i.e. past AnimateBetween/By/To()),
+ * changing properties (e.g. from the SDK) requires the whole Animation object to be recreated with all of
+ * its properties (incl. modifications).
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API AnimatedProperty
 {
 public: // METHODS
   /**
-   * @brief Function to obtain an Actor based on its property. Its processing will
-   *  ignore empty handles returned by it.
+   * @brief Function to obtain an Actor based on its property. Its processing will ignore empty handles returned by it.
+   * @SINCE_2_0.7
    */
   using GetActor = std::function<Actor(const AnimatedProperty&)>;
 
   /**
+   * @brief Get the property object of the given actor.
+   * @SINCE_2_0.7
    * @return The Property object (of the given @a actor) whose value is being animated.
    */
   Property GetProperty(Actor& actor) const
@@ -57,6 +60,7 @@ public: // METHODS
 
   /**
    * @brief The type of the Property (of the given @a actor) that is being animated.
+   * @SINCE_2_0.7
    */
   Property::Type GetPropertyType(Actor& actor) const
   {
@@ -66,9 +70,11 @@ public: // METHODS
 
   /**
    * @brief Registers the animation of this property against the given @a anim.
-   *  @a getActor will be used to obtain the Actor named by this property.
-   *  Failing to find the actor purely means that this property will not be
-   *  animated.
+   *
+   * @a getActor will be used to obtain the Actor named by this property.
+   * Failing to find the actor purely means that this property will not be
+   * animated.
+   * @SINCE_2_0.7
    */
   void Animate(Animation& anim, GetActor getActor) const;
 
index 914dfa7..78e59a1 100644 (file)
@@ -28,6 +28,7 @@ namespace Dali::Scene3D::Loader
 {
 /**
  * @brief Animation handle + name + definition of properties.
+ * @SINCE_2_0.7
  */
 class DALI_SCENE3D_API AnimationDefinition
 {
@@ -39,8 +40,9 @@ public: // STATIC
   static const float MIN_DURATION_SECONDS;
 
   /**
-   * @brief Saves the original end action of @a anim, sets the end action to
-   *  Discard, then stops the animation and returns the end action.
+   * @brief Saves the original end action of @a anim, sets the end action to Discard, then stops
+   * the animation and returns the end action.
+   * @SINCE_2_0.7
    */
   static Animation::EndAction StopForModification(Animation& anim);
 
@@ -52,20 +54,25 @@ public: // METHODS
   AnimationDefinition& operator=(AnimationDefinition&& other);
 
   /**
-   * @brief Registers the properties against the given @a animation. @a getActor
-   *  will be used to obtain the Actors for each AnimatedProperty.
+   * @brief Registers the properties against the given @a animation.
+   *
+   * @a getActor will be used to obtain the Actors for each AnimatedProperty.
+   * @SINCE_2_0.7
    */
   void Animate(Animation& animation, AnimatedProperty::GetActor getActor);
 
   /**
-   * @brief Creates a new Animation and Animates() its properties. @a getActor
-   *  will be used to obtain the Actors for each AnimatedProperty.
+   * @brief Creates a new Animation and Animates() its properties.
+   *
+   * @a getActor will be used to obtain the Actors for each AnimatedProperty.
+   * @SINCE_2_0.7
    */
   Animation ReAnimate(AnimatedProperty::GetActor getActor);
 
   /**
    * @brief Set the name of the animation.
    *
+   * @SINCE_2_2.22
    * @param[in] name The name of the animation.
    */
   void SetName(const std::string& name);
@@ -73,6 +80,7 @@ public: // METHODS
   /**
    * @brief Get the name of the animation.
    *
+   * @SINCE_2_2.22
    * @return The name of the animation.
    */
   const std::string& GetName() const;
@@ -80,6 +88,7 @@ public: // METHODS
   /**
    * @brief Set the duration of the animation in seconds.
    *
+   * @SINCE_2_2.22
    * @param[in] duration The duration of the animation in seconds.
    */
   void SetDuration(float duration);
@@ -87,6 +96,7 @@ public: // METHODS
   /**
    * @brief Get the duration of the animation in seconds.
    *
+   * @SINCE_2_2.22
    * @return The duration of the animation in seconds.
    */
   float GetDuration() const;
@@ -94,6 +104,7 @@ public: // METHODS
   /**
    * @brief Set the number of times to loop the animation.
    *
+   * @SINCE_2_2.22
    * @param[in] loopCount The number of times to loop the animation. Use -1 for infinite looping.
    */
   void SetLoopCount(int32_t loopCount);
@@ -101,6 +112,7 @@ public: // METHODS
   /**
    * @brief Get the number of times to loop the animation.
    *
+   * @SINCE_2_2.22
    * @return The number of times to loop the animation. Use -1 for infinite looping.
    */
   int GetLoopCount() const;
@@ -108,6 +120,7 @@ public: // METHODS
   /**
    * @brief Set what should happen when an animation is disconnected from an object.
    *
+   * @SINCE_2_2.22
    * @param[in] disconnectAction What should happen when an animation is disconnected from an object.
    */
   void SetDisconnectAction(Animation::EndAction disconnectAction);
@@ -115,6 +128,7 @@ public: // METHODS
   /**
    * @brief Get what should happen when an animation is disconnected from an object.
    *
+   * @SINCE_2_2.22
    * @return What should happen when an animation is disconnected from an object.
    */
   Animation::EndAction GetDisconnectAction() const;
@@ -122,6 +136,7 @@ public: // METHODS
   /**
    * @brief Set what should happen when an animation reaches its end.
    *
+   * @SINCE_2_2.22
    * @param[in] endAction What should happen when an animation reaches its end.
    */
   void SetEndAction(Animation::EndAction endAction);
@@ -129,6 +144,7 @@ public: // METHODS
   /**
    * @brief Get what should happen when an animation reaches its end.
    *
+   * @SINCE_2_2.22
    * @return What should happen when an animation reaches its end.
    */
   Animation::EndAction GetEndAction() const;
@@ -136,6 +152,7 @@ public: // METHODS
   /**
    * @brief Set a speed factor for this animation. This can be used to speed up or slow down playback of this animation relative to other animations in a scene.
    *
+   * @SINCE_2_2.22
    * @param[in] speedFactor The speed factor for this animation. 1.0 is normal speed, 2.0 is double speed, 0.5 is half speed, etc.
    */
   void SetSpeedFactor(float speedFactor);
@@ -143,6 +160,7 @@ public: // METHODS
   /**
    * @brief Get a speed factor for this animation. This can be used to speed up or slow down playback of this animation relative to other animations in a scene.
    *
+   * @SINCE_2_2.22
    * @return The speed factor for this animation. 1.0 is normal speed, 2.0 is double speed, 0.5 is half speed, etc.
    */
   float GetSpeedFactor() const;
@@ -150,6 +168,7 @@ public: // METHODS
   /**
    * @brief Set a range within which to play this animation. This can be used to play only part of an animation or to play it backwards by setting playRange.y < playRange.x
    *
+   * @SINCE_2_2.22
    * @param[in] playRange A range within which to play this animation. x = start time in seconds, y = end time in seconds
    */
   void SetPlayRange(const Vector2& playRange);
@@ -157,6 +176,7 @@ public: // METHODS
   /**
    * @brief Get a range within which to play this animation. This can be used to play only part of an animation or to play it backwards by setting playRange.y < playRange.x
    *
+   * @SINCE_2_2.22
    * @return A range within which to play this animation. x = start time in seconds, y = end time in seconds
    */
   Vector2 GetPlayRange() const;
@@ -164,6 +184,7 @@ public: // METHODS
   /**
    * @brief Reserves Animated property vector's size
    *
+   * @SINCE_2_2.22
    * @param[in] size The size to reserve property
    */
   void ReserveSize(uint32_t size);
@@ -171,6 +192,7 @@ public: // METHODS
   /**
    * @brief Retrieves the number of animated properties' count
    *
+   * @SINCE_2_2.22
    * @return The count of animated properties.
    */
   uint32_t GetPropertyCount() const;
@@ -178,6 +200,7 @@ public: // METHODS
   /**
    * @brief Add a property that will be animated by this AnimationDefinition
    *
+   * @SINCE_2_2.22
    * @param[in] index The index the property will be stored.
    * @param[in] property The property that will be animated by this AnimationDefinition
    */
@@ -186,6 +209,7 @@ public: // METHODS
   /**
    * @brief Retrieves animated property at the index
    *
+   * @SINCE_2_2.22
    * @param[in] index The index of property to be retrieved.
    */
   AnimatedProperty& GetPropertyAt(uint32_t index);
@@ -193,6 +217,7 @@ public: // METHODS
   /**
    * @brief Retrieves animated property at the index
    *
+   * @SINCE_2_2.34
    * @param[in] index The index of property to be retrieved.
    */
   const AnimatedProperty& GetPropertyAt(uint32_t index) const;
index d7d6325..7788532 100644 (file)
@@ -80,6 +80,7 @@ struct DALI_SCENE3D_API BlendShapes
   /**
    * @brief Registers properties based on the mesh definition (and geometry) and identified by the above string constants,
    *  on the given @a renderer and @a actor.
+   * @SINCE_2_0.7
    */
   static void ConfigureProperties(const BlendShapeData& data, Renderer renderer);
 
index 533aa04..a59d330 100644 (file)
@@ -30,7 +30,9 @@ namespace Dali::Scene3D::Loader
 {
 /**
  * @brief Defines a buffer that is loaded from input uri.
+ *
  * The buffer can contain 3D resource data such as mesh, animation, and texture.
+ * @SINCE_2_2.12
  */
 struct DALI_SCENE3D_API BufferDefinition
 {
@@ -49,28 +51,34 @@ struct DALI_SCENE3D_API BufferDefinition
 
   /**
    * @brief Retrieves data stream of this buffer.
+   * @SINCE_2_2.12
    * @return iostream of this buffer
    */
   std::iostream& GetBufferStream();
 
   /**
    * @brief Retrieves uri of this buffer
+   * @SINCE_2_2.12
    * @return uri of the buffer
    */
   std::string GetUri();
 
   /**
    * @brief Checks whether the buffer is available or not.
+   *
    * It is available, if the buffer is successfully loaded from file or base64 stream.
+   * @SINCE_2_2.12
    * @return True if it is available.
    */
   bool IsAvailable();
 
 private:
+  /// @cond internal
   /**
    * @brief Loads buffer from file or encoded stream.
    */
   void LoadBuffer();
+  /// @endcond
 
 public: // DATA
   std::string mResourcePath;
index 950b2ea..d0c5955 100644 (file)
@@ -26,6 +26,7 @@ namespace Dali::Scene3D::Loader
 /**
  * @brief Loads motion capture data from bvh file format.
  *
+ * @SINCE_2_1.32
  * @param[in] path The file path.
  * @param[in] animationName Name of the motion capture animation
  * @param[in] scale The scale factor to set on the position property manually.
@@ -36,6 +37,7 @@ DALI_SCENE3D_API AnimationDefinition LoadBvh(const std::string& path, const std:
 /**
  * @brief Loads motion capture data from bvh data stream.
  *
+ * @SINCE_2_2.23
  * @param[in] rawBuffer The bvh buffer.
  * @param[in] rawBufferLength The length of buffer.
  * @param[in] animationName Name of the motion capture animation
index b0b88b3..17b3ea1 100644 (file)
@@ -49,21 +49,24 @@ struct DALI_SCENE3D_API CameraParameters
   bool   isPerspective    = true;
 
   /**
-   * @return The view-projection matrix of the camera.
+   * @brief Retrieves the view-projection of the camera.
+   * @SINCE_2_0.7
+   * @return The view-projection matrix of the camera
    */
   ViewProjection GetViewProjection() const;
 
   /**
-   * @brief Calculates the @a position, @a orientation and @a scale that's defined
-   *        for this camera, and writes it into the respective variable.
+   * @brief Calculates the @a position, @a orientation and @a scale that's defined for this camera,
+   * and writes it into the respective variable.
+   * @SINCE_2_0.7
    */
   void CalculateTransformComponents(Vector3& position, Quaternion& orientation, Vector3& scale) const;
 
   /**
-   * @brief Configures the camera in the way that it is supposed to be used with
-   *        scene3d scenes. This means inverted Y and a rotation of 180 degrees
-   *        along the Y axis, plus whatever the parameters define.
+   * @brief Configures the camera in the way that it is supposed to be used with scene3d scenes.
    *
+   * This means inverted Y and a rotation of 180 degrees along the Y axis, plus whatever the parameters define.
+   * @SINCE_2_0.7
    * @return True if success to generate camera. False otherwise.
    */
   bool ConfigureCamera(CameraActor& camera, bool invertY = true) const;
index 90a42bf..00f3082 100644 (file)
@@ -31,6 +31,7 @@ namespace Dali::Scene3D::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.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API Customization
 {
@@ -39,6 +40,7 @@ struct DALI_SCENE3D_API Customization
 
   /**
    * @brief A mapping of customizations to tags.
+   * @SINCE_2_0.7
    */
   struct DALI_SCENE3D_API Map
   {
@@ -47,27 +49,32 @@ struct DALI_SCENE3D_API Customization
 
     /**
      * @brief Maps the given @a customization to the given @a tag, overwriting any previous mapping to the same tag.
+     * @SINCE_2_0.7
      * @return Pointer to the inserted (or pre-existing) Customization instance.
      */
     Customization* Set(Tag tag, Customization&& customization);
 
     /**
      * @brief Attempts to retrieve a const Customization based on the given @a tag.
+     * @SINCE_2_0.7
      */
     const Customization* Get(Tag tag) const;
 
     /**
      * @brief Attempts to retrieve a Customization based on the given @a tag.
+     * @SINCE_2_0.7
      */
     Customization* Get(Tag tag);
 
     /**
      * @brief Returns the number of elements.
+     * @SINCE_2_0.7
      */
     uint32_t Size() const;
 
-    /*
+    /**
      * @brief Removes every element from the Map.
+     * @SINCE_2_0.7
      */
     void Clear();
 
@@ -78,6 +85,7 @@ struct DALI_SCENE3D_API Customization
 
   /**
    * @brief A mapping of choices - indices of children of customization nodes to use - to tags.
+   * @SINCE_2_0.7
    */
   struct DALI_SCENE3D_API Choices
   {
@@ -86,21 +94,28 @@ struct DALI_SCENE3D_API Customization
 
     /**
      * @brief Maps the given @a option to the given @a tag, overwriting any previous mapping to the same tag.
+     * @SINCE_2_0.7
      */
     void Set(Tag tag, OptionType option);
 
     /**
-     * @brief Attempts to retrieve a Customization based on the given @a tag. Returns NONE if @a tag is not known.
+     * @brief Attempts to retrieve a Customization based on the given @a tag.
+     * @SINCE_2_0.7
+     * @return A Customization based on the given @a tag.
+     * @note Returns NONE if @a tag is not known.
      */
     OptionType Get(Tag tag) const;
 
     /**
      * @brief Returns the number of elements.
+     * @SINCE_2_0.7
+     * @return The number of elements.
      */
     uint32_t Size() const;
 
-    /*
+    /**
      * @brief Removes every element from the underlying map.
+     * @SINCE_2_0.7
      */
     void Clear();
 
index 1db4844..a161b75 100644 (file)
@@ -43,11 +43,13 @@ public:
 public:
   /**
    * @brief The absolute path of animation binaries referenced in the .dli.
+   * @SINCE_2_2.17
    */
   std::string mAnimationsPath;
 
   /**
    * @brief Provides a facility to determine a color from a code instead of RGB(A) values.
+   * @SINCE_2_2.17
    */
   ConvertColorCode mConvertColorCode{nullptr};
 
@@ -56,6 +58,7 @@ public:
    *  root) element, whom they will attempt to process. This will take place before
    *  the parsing of scene Nodes and Animations, but after skeletons, environment, mesh,
    *  shader and material resources.
+   * @SINCE_2_2.17
    */
   CategoryProcessorVector mPreNodeCategoryProcessors;
 
@@ -63,12 +66,14 @@ public:
    * @brief A collection of handlers, mapped to the names of the top level (i.e. below
    *  root) element, whom they will attempt to process. This will take place after
    *  the parsing of the scene Nodes and Animations.
+   * @SINCE_2_2.17
    */
   CategoryProcessorVector mPostNodeCategoryProcessors;
 
   /**
    * @brief Provides an extension point to nodes. If provided, this function will be
    *  called with each JSON element and definition, of a scene node.
+   * @SINCE_2_2.17
    * @note Constraints rely on ID resolution (from .dli to scene definition), which
    *  takes place after the parsing of the nodes; therefore AT THIS POINT the node
    *  IDs seen in constraints will still be the .dli IDs - NOT to be relied on for
@@ -79,6 +84,7 @@ public:
   /**
    * @brief Provides an extension point to animations. If provided, this function will be
    *  called with each JSON element and fully processed definition, of an animation.
+   * @SINCE_2_2.17
    */
   AnimationProcessor mAnimationPropertyProcessor;
 };
index 36d8ae6..39aa53a 100644 (file)
@@ -29,8 +29,8 @@
 namespace Dali::Scene3D::Loader
 {
 /**
- * @brief Defines an environment map with either or both of radiance
- *  and irradiance maps.
+ * @brief Defines an environment map with either or both of radiance and irradiance maps.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API EnvironmentDefinition
 {
@@ -69,25 +69,31 @@ struct DALI_SCENE3D_API EnvironmentDefinition
 
   /**
    * @brief Loads raw pixel data for the given diffuse and specular maps.
+   * @SINCE_2_0.7
+   * @return The raw data for the given diffuse and specular maps
    * @note This can be done on any thread.
    */
   RawData LoadRaw(const std::string& environmentsPath);
 
   /**
-   * @brief Creates DALi cubemap Textures from the pixel data in @a raw, then
-   *  returns them in a Textures object.
+   * @brief Creates DALi cubemap Textures from the pixel data in @a raw, then returns them in a Textures object.
+   * @SINCE_2_0.7
+   * @return DALi cubemap Textures
    * @note This must only be called from the event thread.
    */
   Textures Load(RawData&& raw);
 
   /**
    * @brief Get default intensity value.
+   * @SINCE_2_2.1
    * @return Default intensity. (1.0f)
    */
   static float GetDefaultIntensity();
 
 private:
+  /// @cond internal
   static void LoadBrdfTexture();
+  /// @endcond internal
 
 public: // DATA
   std::string              mDiffuseMapPath;
index 6d53cbc..e09beef 100644 (file)
@@ -31,20 +31,24 @@ namespace Dali::Scene3D::Loader
 {
 /**
  * @brief Stores the pixel data objects for environment map texture.
+ *
  * EnvironmentMapData supports cube map that contains textures for 6 faces, or
  * an equirectangular image.
+ * @SINCE_2_2.11
  */
 class DALI_SCENE3D_API EnvironmentMapData
 {
 public:
   /**
    * @brief Retrieves environment map texture from image file
+   * @SINCE_2_2.11
    * @return texture for loaded environment map.
    */
   Texture GetTexture();
 
   /**
    * @brief Sets environment map type
+   * @SINCE_2_2.11
    * @param[in] environmentMapType environment map type
    */
   void SetEnvironmentMapType(Dali::Scene3D::EnvironmentMapType environmentMapType)
@@ -58,6 +62,7 @@ public:
 
   /**
    * @brief Retrieves environment map type.
+   * @SINCE_2_2.11
    * @return environment map type
    */
   Dali::Scene3D::EnvironmentMapType GetEnvironmentMapType() const
@@ -65,12 +70,22 @@ public:
     return mEnvironmentMapType;
   }
 
+  /**
+   * @brief Sets the mipmap levels
+   * @SINCE_2_2.19
+   * @param[in] mipmapLevels No. of mipmap levels
+   */
   void SetMipmapLevels(uint32_t mipmapLevels)
   {
     mMipmapLevels = mipmapLevels;
   }
 
-  uint32_t GetMipmapLevels()
+  /**
+   * @brief Retrieves the number of mipmap levels
+   * @SINCE_2_2.19
+   * @return No. of mipmap levels
+   */
+  uint32_t GetMipmapLevels() const
   {
     return mMipmapLevels;
   }
index f07f28c..ddbf86c 100644 (file)
@@ -27,6 +27,7 @@ namespace Dali::Scene3D::Loader
 /**
  * @brief Loads environment map data from a environment map file.
  *
+ * @SINCE_2_1.32
  * @param[in] environmentMapUrl The environment map file url.
  * @param[out] environmentMapData The data structure with all pixel data objects.
  * @return bool True if the loading is succeded.
index a1658fc..fb96446 100644 (file)
@@ -28,6 +28,7 @@ namespace Dali::Scene3D::Loader
  *\r
  * Throws a DaliException on error.\r
  *\r
+ * @SINCE_2_1.30\r
  * @param[in] url The url of the file containing the facial animation.\r
  *\r
  * @return An animation definition.\r
@@ -39,6 +40,7 @@ DALI_SCENE3D_API AnimationDefinition LoadFacialAnimation(const std::string& url)
  *\r
  * Throws a DaliException on error.\r
  *\r
+ * @SINCE_2_2.23\r
  * @param[in] rawBuffer The raw buffer containing the facial animation.\r
  * @param[in] rawBufferLength The length of raw buffer.\r
  *\r
index d495ee0..6c6b4de 100644 (file)
@@ -26,6 +26,7 @@ namespace Dali::Scene3D::Loader
 /**
  * @brief Loads cube map data texture from a ktx file.
  *
+ * @SINCE_2_0.7
  * @param[in] path The file path.
  * @param[out] environmentMapData The data structure with all pixel data objects.
  * @return bool True if the loading is succeded.
index da05a36..b849279 100644 (file)
@@ -31,41 +31,49 @@ class SceneDefinition;
 
 /**
  * @brief The outputs from loading and processing a scene.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API LoadResult
 {
   /**
    * @brief The bundle to store resources in.
+   * @SINCE_2_0.7
    */
   ResourceBundle& mResources;
 
   /**
    * @brief The scene definition to populate.
+   * @SINCE_2_0.7
    */
   SceneDefinition& mScene;
 
   /**
    * @brief The metadata of the scene.
+   * @SINCE_2_2.5
    */
   SceneMetadata& mSceneMetadata;
 
   /**
    * @brief The list of animation definitions, in lexicographical order of their names.
+   * @SINCE_2_0.7
    */
   std::vector<AnimationDefinition>& mAnimationDefinitions;
 
   /**
    * @brief The list of animation group definitions, in lexicographical order of their names.
+   * @SINCE_2_0.7
    */
   std::vector<AnimationGroupDefinition>& mAnimationGroupDefinitions;
 
   /**
    * @brief The camera parameters that were loaded from the scene.
+   * @SINCE_2_0.7
    */
   std::vector<CameraParameters>& mCameraParameters;
 
   /**
    * @brief The light parameters that were loaded from the scene.
+   * @SINCE_2_0.7
    */
   std::vector<LightParameters>& mLightParameters;
 };
index ca7e16f..6056b1e 100644 (file)
@@ -29,16 +29,18 @@ namespace Dali::Scene3D::Loader
 {\r
 /**\r
  * @brief Defines the matadata for an image.\r
+ * @SINCE_2_2.5\r
  */\r
 struct ImageMetadata\r
 {\r
-  ImageDimensions    mMinSize{};                                   ///< The minimum required image size for rendering\r
-  SamplingMode::Type mSamplingMode{SamplingMode::BOX_THEN_LINEAR}; ///< The sampling mode used to resize the image\r
+  ImageDimensions    mMinSize{};                                   ///< The minimum required image size for rendering. @SINCE_2_2.5\r
+  SamplingMode::Type mSamplingMode{SamplingMode::BOX_THEN_LINEAR}; ///< The sampling mode used to resize the image. @SINCE_2_2.5\r
 };\r
 \r
 /**\r
  * @brief Stores the metadata for a scene.\r
  *\r
+ * @SINCE_2_2.5\r
  * @note The supported format is the following:\r
  *  {\r
  *    "images": (optional) [ {\r
@@ -55,8 +57,10 @@ struct SceneMetadata
 };\r
 \r
 /**\r
- * @brief Attempts to load and process a json file specifying scene metadata\r
- * for pre-processing the scene resources: e.g. the minimum size required for rendering images, etc.\r
+ * @brief Attempts to load and process a json file specifying scene metadata for pre-processing the scene resources.\r
+ *\r
+ * e.g. the minimum size required for rendering images, etc.\r
+ * @SINCE_2_2.5\r
  * @note Will fail quietly if the file is not present.\r
  */\r
 DALI_SCENE3D_API void LoadSceneMetadata(const std::string& url, SceneMetadata& sceneMetadata);\r
index 43dabc1..39b9153 100644 (file)
@@ -34,6 +34,7 @@ namespace Dali::Scene3D::Loader
 {
 /**
  * @brief Helper enum for encoding and decoding sampler states.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API SamplerFlags
 {
@@ -76,38 +77,46 @@ struct DALI_SCENE3D_API SamplerFlags
   };
 
   /**
-   * @return SamplerFlags bit pattern calculated from the given Dali Sampler settings.
+   * @brief Retrieves the bit pattern calculated from the given Dali Sampler settings.
+   * @SINCE_2_0.7
+   * @return SamplerFlags bit pattern.
    */
   static Type Encode(FilterMode::Type minFilter, FilterMode::Type magFilter, WrapMode::Type wrapS, WrapMode::Type wrapT);
 
   /**
    * @brief Decodes the minification filter patter of @a flags into the corresponding FilterMode.
+   * @SINCE_2_0.7
    */
   static FilterMode::Type GetMinFilter(Type flags);
 
   /**
    * @brief Decodes the magnification filter patter of @a flags into the corresponding FilterMode.
+   * @SINCE_2_0.7
    */
   static FilterMode::Type GetMagFilter(Type flags);
 
   /**
    * @brief Decodes the horizontal wrap pattern of @a flags into the corresponding WrapMode.
+   * @SINCE_2_0.7
    */
   static WrapMode::Type GetWrapS(Type flags);
 
   /**
    * @brief Decodes the vertical wrap pattern of @a flags into the corresponding WrapMode.
+   * @SINCE_2_0.7
    */
   static WrapMode::Type GetWrapT(Type flags);
 
   /**
    * @brief Creates a Sampler with the settings encoded in @a flags.
+   * @SINCE_2_0.7
    */
   static Sampler MakeSampler(Type flags);
 };
 
 /**
  * @brief Defines a texture from a combination of an image URI and its sampler definition.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API TextureDefinition
 {
@@ -128,6 +137,7 @@ struct DALI_SCENE3D_API TextureDefinition
  *  is enabled, and an index of an environment (usually of all environments in a
  *  scene). Textures from the environment are added last when the DALi TextureSet
  *  is being created.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API MaterialDefinition
 {
@@ -156,6 +166,7 @@ struct DALI_SCENE3D_API MaterialDefinition
 
   /**
    * @brief A(n image based) texture that's used in a material.
+   * @SINCE_2_0.7
    */
   struct TextureStage
   {
@@ -187,6 +198,7 @@ struct DALI_SCENE3D_API MaterialDefinition
   /**
    * @brief Loads (or, in the case of solid color materials, creates) raw pixel data,
    *  which is then returned.
+   * @SINCE_2_0.7
    * @note This may be called from any thread.
    */
   RawData LoadRaw(const std::string& imagesPath);
@@ -195,6 +207,7 @@ struct DALI_SCENE3D_API MaterialDefinition
    * @brief Creates Textures from the pixel data in @a raw, gets the
    *  the cube maps from the iEnvironment'th element of @a environments,
    *  then creates a DALi TextureSet and returns it.
+   * @SINCE_2_0.7
    * @note This must be called from the event thread.
    * @note The textures are added in the following order: 2D, cube maps.
    */
@@ -202,11 +215,13 @@ struct DALI_SCENE3D_API MaterialDefinition
 
   /**
    * @brief Checks if the given mask matches any of the textures defined.
+   * @SINCE_2_0.7
    */
   bool CheckTextures(uint32_t flags) const;
 
   /**
    * @return The alpha test reference value.
+   * @SINCE_2_0.7
    * @note A value of 0.f means no alpha testing.
    */
   float GetAlphaCutoff() const
@@ -216,6 +231,7 @@ struct DALI_SCENE3D_API MaterialDefinition
 
   /**
    * @brief Encodes the alpha test reference @a value in flags.
+   * @SINCE_2_0.7
    * @note A value of 0.f means no alpha testing.
    */
   void SetAlphaCutoff(float value)
index 58ae2c0..1889e09 100644 (file)
@@ -29,6 +29,7 @@ namespace Dali::Scene3D::Loader
 /**
  * @brief A stack of matrices whereby each newly pushed matrix is stored
  *  after being multiplied by the previous one (if any).
+ * @SINCE_2_0.7
  * @note Current implementation reserves space for 16 matrices.
  */
 class DALI_SCENE3D_API MatrixStack
index ec3e160..911359c 100644 (file)
@@ -35,6 +35,7 @@ namespace Dali::Scene3D::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.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API MeshDefinition
 {
@@ -95,7 +96,9 @@ struct DALI_SCENE3D_API MeshDefinition
 
   /**
    * @brief Describes raw data in terms of its position and size in a buffer.
-   *  All units in bytes.
+   *
+   * All units in bytes.
+   * @SINCE_2_0.7
    */
   struct Blob
   {
@@ -122,11 +125,13 @@ struct DALI_SCENE3D_API MeshDefinition
 
     /**
      * @brief Calculates the size of a tightly-packed buffer for the elements from the blob.
+     * @SINCE_2_0.7
      */
     uint32_t GetBufferSize() const;
 
     /**
      * @brief Convenience method to tell whether a Blob has meaningful data.
+     * @SINCE_2_0.7
      */
     bool IsDefined() const
     {
@@ -134,8 +139,10 @@ struct DALI_SCENE3D_API MeshDefinition
     }
 
     /**
-     * @brief Convenience method to tell whether the elements stored in the blob follow each
-     *  other tightly. The opposite would be interleaving.
+     * @brief Convenience method to tell whether the elements stored in the blob follow each other tightly.
+     *
+     * The opposite would be interleaving.
+     * @SINCE_2_0.7
      */
     bool IsConsecutive() const
     {
@@ -144,8 +151,9 @@ struct DALI_SCENE3D_API MeshDefinition
 
     /**
      * @brief Computes the min / max of the input value data.
-     * The min and max are stored in mMin and mMax.
      *
+     * The min and max are stored in mMin and mMax.
+     * @SINCE_2_0.7
      * @param[in] numComponents number of components of data type. e.g., 3 for Vector3.
      * @param[in] count The number of data.
      * @param[in] values Data for the mesh.
@@ -155,10 +163,10 @@ struct DALI_SCENE3D_API MeshDefinition
     /**
      * @brief Applies the min / max values, if they're defined in the model
      *
+     * @SINCE_2_0.7
      * @param[in] count The number of data.
      * @param[in] values Data for the mesh that min / max values will be applied.
      * @param[in] sparseIndices Pointer to array of sparse indices (or nullptr if not provided)
-     *
      */
     void ApplyMinMax(uint32_t count, float* values, std::vector<uint32_t>* sparseIndices = nullptr) const;
   };
@@ -167,6 +175,7 @@ struct DALI_SCENE3D_API MeshDefinition
    * @brief A sparse blob describes a change in a reference Blob.
    * @p indices describe what positions of the reference Blob change and
    * @p values describe the new values.
+   * @SINCE_2_0.7
    */
   struct SparseBlob
   {
@@ -219,6 +228,7 @@ struct DALI_SCENE3D_API MeshDefinition
 
   /**
    * @brief Stores a blend shape.
+   * @SINCE_2_0.7
    */
   struct BlendShape
   {
@@ -260,11 +270,13 @@ struct DALI_SCENE3D_API MeshDefinition
 
   /**
    * @brief Determines whether the mesh definition is that of a quad.
+   * @SINCE_2_0.7
    */
   bool IsQuad() const;
 
   /**
    * @brief Determines whether the mesh is used for skeletal animation.
+   * @SINCE_2_0.7
    */
   bool IsSkinned() const;
 
@@ -276,17 +288,20 @@ struct DALI_SCENE3D_API MeshDefinition
   /**
    * @brief Returns the number of joint sets defined by the mesh
    *
+   * @SINCE_2_2.52
    * @note Clamped to 4 to minimise GPU attrs.
    */
   uint32_t GetNumberOfJointSets() const;
 
   /**
    * @brief Whether the mesh has blend shapes.
+   * @SINCE_2_0.7
    */
   bool HasBlendShapes() const;
 
   /**
    * @brief Requests normals to be generated.
+   * @SINCE_2_0.7
    * @note Generation happens in LoadRaw().
    * @note Must have Vector3 positions defined.
    */
@@ -294,14 +309,17 @@ struct DALI_SCENE3D_API MeshDefinition
 
   /**
    * @brief Requests tangents to be generated.
+   * @SINCE_2_0.7
    * @note Generation happens in LoadRaw().
    * @note Must have Vector3 normals defined.
    */
   void RequestTangents();
 
   /**
-   * @brief Loads raw geometry data, which includes index (optional) and
-   *  attribute buffers, as well as blend shape data. This is then returned.
+   * @brief Loads raw geometry data, which includes index (optional) and attribute buffers, as well as blend shape data.
+   *
+   * This is then returned.
+   * @SINCE_2_0.7
    * @note This can be done on any thread.
    */
   RawData LoadRaw(const std::string& modelsPath, BufferDefinition::Vector& buffers);
@@ -312,12 +330,14 @@ struct DALI_SCENE3D_API MeshDefinition
    *  attribute (and index) buffers and blend shape information (if available)
    *  from @a raw.
    *  If mFlipVertical was set, the UVs are flipped in Y, i.e. v = 1.0 - v.
+   * @SINCE_2_0.7
    */
   MeshGeometry Load(RawData&& raw) const;
 
   /**
    * @brief Retrieves what Components information is in this mesh's BlendShape.
    *
+   * @SINCE_2_2.21
    * @param[out] hasPositions True if the BlendShape has position components
    * @param[out] hasNormals True if the BlendShape has normal components
    * @param[out] hasTangents True if the BlendShape has tangent components
index fa2ac1d..2e1b71e 100644 (file)
@@ -29,10 +29,10 @@ namespace Dali::Scene3D::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.
-  Vector<float>  blendShapeUnnormalizeFactor; ///< Factor used to unnormalize the geometry of the blend shape.
-  unsigned int   blendShapeBufferOffset{0};   ///< Offset used to calculate the start of each blend shape.
+  Geometry       geometry;                    ///< The array of vertices. @SINCE_2_0.7
+  Texture        blendShapeGeometry;          ///< The array of vertices of the different blend shapes encoded inside a texture with power of two dimensions. @SINCE_2_0.7
+  Vector<float>  blendShapeUnnormalizeFactor; ///< Factor used to unnormalize the geometry of the blend shape. @SINCE_2_0.7
+  unsigned int   blendShapeBufferOffset{0};   ///< Offset used to calculate the start of each blend shape. @SINCE_2_0.20
 };
 
 } // namespace Dali::Scene3D::Loader
index 702b308..8a660de 100644 (file)
@@ -41,6 +41,7 @@ public:
 
   /**
    * @brief ModelLoader Constructor.
+   * @SINCE_2_2.17
    * @param[in] modelUrl Url of the model file to be loaded
    * @param[in] resourceDirectoryUrl Url of directory that contains resources.
    * @param[out] loadResult Loaded result that includes scene tree and resources.
@@ -49,6 +50,7 @@ public:
 
   /**
    * @brief Request to load model from model url.
+   * @SINCE_2_2.17
    * @param[in] pathProvider Path provider that defines resource paths.
    * @param[in] loadOnlyRawResource If true, load Raw resource only, and do not create Dali::Handle
    * If false, this loader load Raw resource and create Dali::Handle too.
@@ -59,38 +61,45 @@ public:
 
   /**
    * @brief Set InputParameter.
-   * Thie method store only a pointer of InputParameter.
+   *
+   * This method store only a pointer of InputParameter.
    * The object of InputParameter should not be deleted until it is no longer used.
+   * @SINCE_2_2.17
    * @param[in] inputParameter Input parameters that can be used in loading time.
    */
   void SetInputParameter(InputParameter& inputParameter);
 
   /**
-   * @brief Retrieves loaded scene
+   * @brief Retrieves loaded scene.
+   * @SINCE_2_2.17
    * @return SceneDefinition that is loaded from file
    */
   Dali::Scene3D::Loader::SceneDefinition& GetScene();
 
   /**
-   * @brief Retrieves resource bundle that includes resource information
+   * @brief Retrieves resource bundle that includes resource information.
+   * @SINCE_2_2.17
    * @return ResourceBundle for model resources
    */
   Dali::Scene3D::Loader::ResourceBundle& GetResources();
 
   /**
-   * @brief Retrieves loaded AnimationDefinition
+   * @brief Retrieves loaded AnimationDefinition.
+   * @SINCE_2_2.17
    * @return AnimationDefinition that is loaded from file
    */
   std::vector<Dali::Scene3D::Loader::AnimationDefinition>& GetAnimations();
 
   /**
-   * @brief Retrieves loaded CameraParameters
+   * @brief Retrieves loaded CameraParameters.
+   * @SINCE_2_2.17
    * @return CameraParameters list that is loaded from file
    */
   std::vector<Dali::Scene3D::Loader::CameraParameters>& GetCameras();
 
   /**
-   * @brief Retrieves ResourceChoices
+   * @brief Retrieves ResourceChoices.
+   * @SINCE_2_2.17
    * @return Choices for loaded Resources
    */
   Dali::Scene3D::Loader::Customization::Choices& GetResourceChoices();
@@ -98,11 +107,13 @@ public:
 private:
   /**
    * @brief Create model loader for each file format.
+   * @SINCE_2_2.17
    */
   void CreateModelLoader();
 
   /**
    * @brief Load resource of the model.
+   * @SINCE_2_2.17
    */
   void LoadResource(Dali::Scene3D::Loader::ResourceBundle::PathProvider& pathProvider, bool loadOnlyRawResource);
 
index 7e09332..8fafe8a 100644 (file)
@@ -23,6 +23,8 @@
 // INTERNAL INCLUDES
 #include <dali-scene3d/internal/algorithm/navigation-mesh-impl.h>
 #include <dali/devel-api/adaptor-framework/file-stream.h>
+#include <stdlib.h>
+#include <memory>
 
 namespace Dali::Scene3D::Loader
 {
@@ -78,7 +80,132 @@ std::unique_ptr<Algorithm::NavigationMesh> NavigationMeshFactory::CreateFromFile
 std::unique_ptr<Algorithm::NavigationMesh> NavigationMeshFactory::CreateFromBuffer(const std::vector<uint8_t>& buffer)
 {
   auto impl = new Scene3D::Internal::Algorithm::NavigationMesh(buffer);
-  return std::unique_ptr<Algorithm::NavigationMesh>(new Algorithm::NavigationMesh(impl));
+  return std::make_unique<Algorithm::NavigationMesh>(impl);
+}
+
+std::unique_ptr<Algorithm::NavigationMesh> NavigationMeshFactory::CreateFromVertexFaceList(const Vector3* vertices, const Vector3* vertexNormals, uint32_t vertexCount, const uint32_t* faceIndices, uint32_t indexCount)
+{
+  // The function takes the data and creates a binary buffer out of it
+  using namespace Dali::Scene3D::Algorithm;
+  auto header = Internal::Algorithm::NavigationMeshHeader_V10();
+
+  // create header
+  header.checksum = *reinterpret_cast<const uint32_t*>("NAVM");
+  header.version  = 0; // latest version
+
+  // Copy given vertices
+  std::vector<NavigationMesh::Vertex> meshVertices;
+  meshVertices.reserve(vertexCount);
+  for(auto i = 0u; i < vertexCount; ++i)
+  {
+    meshVertices.emplace_back();
+    meshVertices.back().x = vertices[i].x;
+    meshVertices.back().y = vertices[i].y;
+    meshVertices.back().z = vertices[i].z;
+  }
+
+  // copy faces and edges
+  std::vector<NavigationMesh::Face> meshFaces;
+  meshFaces.resize(indexCount / 3);
+  auto i              = 0u;
+  bool computeNormals = (vertexNormals == nullptr);
+  for(auto& f : meshFaces)
+  {
+    f.vertex[0] = faceIndices[i];
+    f.vertex[1] = faceIndices[i + 1];
+    f.vertex[2] = faceIndices[i + 2];
+
+    // compute normals (if not supplied)
+    if(computeNormals)
+    {
+      auto v01 = Vector3(meshVertices[f.vertex[1]].coordinates) - Vector3(meshVertices[f.vertex[0]].coordinates);
+      auto v02 = Vector3(meshVertices[f.vertex[2]].coordinates) - Vector3(meshVertices[f.vertex[0]].coordinates);
+      auto n   = v01.Cross(v02);
+      n.Normalize();
+      f.normal[0] = n.x;
+      f.normal[1] = n.y;
+      f.normal[2] = n.z;
+    }
+    else
+    {
+      auto& n0 = vertexNormals[faceIndices[i]];
+      auto& n1 = vertexNormals[faceIndices[i + 1]];
+      auto& n2 = vertexNormals[faceIndices[i + 2]];
+
+      auto faceNormal = (n0 + n1 + n2) / 3.0f;
+      faceNormal.Normalize();
+      f.normal[0] = faceNormal.x;
+      f.normal[1] = -faceNormal.y;
+      f.normal[2] = faceNormal.z;
+    }
+    i += 3;
+  }
+
+  // Create edges, in this case we don't care about duplicates
+  // This mesh cannot be used for navigation
+  std::vector<NavigationMesh::Edge> meshEdges;
+  meshEdges.reserve(meshFaces.size() * 3);
+  i = 0;
+  for(auto& f : meshFaces)
+  {
+    for(auto k = 0u; k < 3; ++k)
+    {
+      meshEdges.emplace_back();
+      auto& edge     = meshEdges.back();
+      edge.face[0]   = i;
+      edge.face[1]   = NavigationMesh::NULL_FACE;
+      edge.vertex[0] = f.vertex[k];
+      edge.vertex[1] = f.vertex[(k + 1) % 3];
+    }
+    ++i;
+  }
+
+  std::vector<uint8_t> navigationMeshBinary;
+
+  // Build navigationMeshBinary binary
+  navigationMeshBinary.insert(navigationMeshBinary.end(),
+              reinterpret_cast<uint8_t*>(&header),
+              reinterpret_cast<uint8_t*>(&header) + sizeof(Internal::Algorithm::NavigationMeshHeader_V10));
+
+  auto& h = *reinterpret_cast<decltype(header)*>(navigationMeshBinary.data());
+
+  h.dataOffset       = sizeof(header);
+  h.edgeCount        = meshEdges.size();
+  h.polyCount        = meshFaces.size();
+  h.vertexCount      = meshVertices.size();
+  h.gravityVector[0] = 0.0f;
+  h.gravityVector[1] = -1.0f;
+  h.gravityVector[2] = 0.0f;
+  h.version          = 0;
+  h.vertexDataOffset = 0;
+  h.edgeDataOffset   = meshVertices.size() * sizeof(NavigationMesh::Vertex);
+  h.polyDataOffset   = h.edgeDataOffset + meshEdges.size() * sizeof(NavigationMesh::Edge);
+
+  // Copy data
+  navigationMeshBinary.insert(navigationMeshBinary.end(),
+              reinterpret_cast<uint8_t*>(meshVertices.data()),
+              reinterpret_cast<uint8_t*>(meshVertices.data()) + (meshVertices.size() * sizeof(NavigationMesh::Vertex)));
+  navigationMeshBinary.insert(navigationMeshBinary.end(),
+              reinterpret_cast<uint8_t*>(meshEdges.data()),
+              reinterpret_cast<uint8_t*>(meshEdges.data()) + (meshEdges.size() * sizeof(NavigationMesh::Edge)));
+  navigationMeshBinary.insert(navigationMeshBinary.end(),
+              reinterpret_cast<uint8_t*>(meshFaces.data()),
+              reinterpret_cast<uint8_t*>(meshFaces.data()) + (meshFaces.size() * sizeof(NavigationMesh::Face)));
+
+  return NavigationMeshFactory::CreateFromBuffer(navigationMeshBinary);
+}
+
+std::unique_ptr<Algorithm::NavigationMesh> NavigationMeshFactory::CreateFromVertexFaceList(const std::vector<Vector3>& vertices, const std::vector<Vector3>& normals, const std::vector<uint32_t>& faceIndices)
+{
+  return CreateFromVertexFaceList(vertices.data(), normals.data(), vertices.size(), faceIndices.data(), faceIndices.size());
+}
+
+std::vector<uint8_t> NavigationMeshFactory::GetMeshBinary(const Dali::Scene3D::Algorithm::NavigationMesh& navigationMesh)
+{
+  auto& meshImpl = Internal::Algorithm::GetImplementation(navigationMesh);
+
+  // Return as mutable copy
+  return meshImpl.GetData();
 }
 
 } // namespace Dali::Scene3D::Loader
\ No newline at end of file
index bbe5f00..148a07f 100644 (file)
 
 namespace Dali::Scene3D::Loader
 {
+/**
+ * @brief Factory to create a NavigationMesh from various sources.
+ * @SINCE_2_2.12
+ */
 struct DALI_SCENE3D_API NavigationMeshFactory
 {
 public:
   /**
    * @brief Creates NavigationMesh object from file
    *
+   * @SINCE_2_2.12
    * @param[in] filename file to load
    * @return Valid NavigationMesh or nullptr
    */
@@ -41,10 +46,53 @@ public:
   /**
    * @brief Creates NavigationMesh object from binary buffer
    *
+   * @SINCE_2_2.12
    * @param[in] buffer buffer with data
    * @return Valid NavigationMesh or nullptr
    */
   static std::unique_ptr<Algorithm::NavigationMesh> CreateFromBuffer(const std::vector<uint8_t>& buffer);
+
+  /**
+   * @brief Creates new mesh from lists of vertices and faces
+   *
+   * List of faces contains indices into the vertex list
+   *
+   * @SINCE_2_2.53
+   * @param[in] vertices List of Vector3 vertices
+   * @param[in] vertexNormals List of Vector3 vertices
+   * @param[in] faceIndices List of faces
+   * @return Valid NavigationMesh or nullptr
+   */
+  static std::unique_ptr<Algorithm::NavigationMesh> CreateFromVertexFaceList(const std::vector<Vector3>& vertices, const std::vector<Vector3>& vertexNormals, const std::vector<uint32_t>& faceIndices);
+
+  /**
+   * @brief Creates new mesh from lists of vertices and faces
+   *
+   * List of faces contains indices into the vertex list
+   *
+   * This function reduces number of array copys when called from NUI.
+   *
+   * @SINCE_2_2.53
+   * @param[in] vertices Pointer to C-style array of vertices
+   * @param[in] vertexCount Number of vertices
+   * @param[in] vertexNormals to C-style array of vertex normals
+   * @param[in] faceIndices Pointer to C-style array of face elements indices
+   * @param[in] indexCount Number of indices
+   * @return Valid NavigationMesh or nullptr
+   */
+  static std::unique_ptr<Algorithm::NavigationMesh> CreateFromVertexFaceList(const Vector3* vertices, const Vector3* vertexNormals, uint32_t vertexCount, const uint32_t* faceIndices, uint32_t indexCount);
+
+  /**
+   * @brief Serializes mesh data to the binary format.
+   *
+   * The binary data returned by the function can be used
+   * as an input for NavigationMeshFactory::CreateFromBuffer()
+   *
+   * @SINCE_2_2.53
+   * @param[in] navigationMesh Navigation mesh to serialize
+   * @return Buffer containing serialized mesh data
+   */
+  static std::vector<uint8_t> GetMeshBinary(const Dali::Scene3D::Algorithm::NavigationMesh& navigationMesh);
 };
 } // namespace Dali::Scene3D::Loader
 
index f3aa578..c1cea09 100644 (file)
@@ -43,6 +43,7 @@ class ViewProjection;
 
 /**
  * @brief Interface to report (const) resource ids to.
+ * @SINCE_2_0.7
  */
 class DALI_SCENE3D_API IResourceReceiver
 {
@@ -54,6 +55,7 @@ public:
 
 /**
  * @brief Interface to report modifiable resource ids to.
+ * @SINCE_2_0.7
  * @note These are supposed to be transient. Obviously, the references collected
  *  this way must not outlive the objects that they came from.
  */
@@ -69,6 +71,7 @@ public:
  * @brief Intermediate representation for a constraint that shall be
  *  set up after the Actors were created. The target of the constraint
  *  is the node definition that carries it.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API ConstraintDefinition
 {
@@ -99,6 +102,7 @@ struct DALI_SCENE3D_API Transforms
 
 /**
  * @brief Information about a skeleton and the shader that needs to be configured with it.
+ * @SINCE_2_0.7
  * @note Multiple skeletons shalt not share the same shader.
  */
 struct DALI_SCENE3D_API SkinningShaderConfigurationRequest
@@ -115,6 +119,7 @@ struct DALI_SCENE3D_API SkinningShaderConfigurationRequest
 
 /**
  * @brief Needed to configure blend shape properties.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API BlendshapeShaderConfigurationRequest
 {
@@ -131,6 +136,7 @@ struct DALI_SCENE3D_API BlendshapeShaderConfigurationRequest
 
 /**
  * @brief Request for creating a constraint, output from NodeDefinition::OnCreate.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API ConstraintRequest
 {
@@ -142,6 +148,7 @@ struct DALI_SCENE3D_API ConstraintRequest
  * @brief Defines a node, consisting of a name, a transform, a size, a list of child nodes,
  *  and slots for customization and rendering logic, which are mutually exclusive in the
  *  current implementation.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API NodeDefinition
 {
@@ -221,18 +228,21 @@ public: // TYPES
 public: // METHODS
   /**
    * @brief Creates a ModelNode from this definition only.
+   * @SINCE_2_0.7
    * @note Not recursive.
    */
   ModelNode CreateModelNode(CreateParams& params);
 
   /**
    * @brief Gets local space matrix of this node
+   * @SINCE_2_1.32
    * @return Matrix of local space.
    */
   Matrix GetLocalSpace() const;
 
   /**
    * @brief Retrieves minimum and maximum position of this node in local space.
+   * @SINCE_2_1.32
    * @param[in] resources ResourceBundle that contains mesh information of this node.
    * @param[out] min Minimum position of the mesh of this node.
    * @param[out] max Maximum position of the mesh of this node.
@@ -242,21 +252,27 @@ public: // METHODS
 
   /**
    * @brief Retrieves Scale Factor uniform name.
+   *
    * This uniform name can be used to change scale factor for ibl.
+   * @SINCE_2_1.32
    * @return std::string_view of the scale factor uniform name.
    */
   static std::string_view GetIblScaleFactorUniformName();
 
   /**
    * @brief Retrieves ibl Ydirection uniform name.
+   *
    * This uniform name can be used to flip y direction of ibl in shader.
+   * @SINCE_2_1.32
    * @return std::string_view of the YDirection uniform name.
    */
   static std::string_view GetIblYDirectionUniformName();
 
   /**
    * @brief Retrieves ibl MaxLod uniform name.
+   *
    * This uniform name can be used to set max lod of ibl in shader.
+   * @SINCE_2_2.19
    * @return std::string_view of the Max Lod uniform name.
    */
   static std::string_view GetIblMaxLodUniformName();
@@ -299,6 +315,7 @@ public: // METHODS
 
 /**
  * @brief Parameters for an Arc node.
+ * @SINCE_2_0.7
  */
 class DALI_SCENE3D_API ArcRenderable : public ModelRenderable
 {
index 2379fa6..3b558ee 100644 (file)
@@ -25,13 +25,16 @@ namespace Dali::Scene3D::Loader
 {
 namespace RendererState
 {
-/*
- * @brief Attempts to interpret a string for renderer states, which can be a combination of the following
+/**
+ * @brief Attempts to interpret a string for renderer states.
+ *
+ * Wwhich can be a combination of the following:
  *  (using '|' as a delimiter, if multiple specified):<br/>
  *  - one of Value, exc. for NONE or those with the _BITS, _SHIFT, _MASK or _ITEMS suffix;<br/>
  *  - DEPTH_FUNC:${one of Comparison::Type, exc. OMIT};<br/>
  *  - BLEND_(SRC_DST)_(RGB|ALPHA):${one of BlendFactor::Type, exc. OMIT};<br/>
  *  - BUFFER_MODE:${one of BufferMode::Type, exc. OMIT};
+ * @SINCE_2_0.7
  * @param string The string to parse;
  * @param length The length of the string; If left at 0, strlen() will be called, which of
  *   course is only suitable i the string is null-terminated.
index 240a343..25365e9 100644 (file)
@@ -25,8 +25,9 @@
 
 namespace Dali::Scene3D::Loader
 {
-/*
+/**
  * @brief Contains values for comparison functions used in depth and stencil testing.
+ * @SINCE_2_0.7
  * @note Relative order of members must match DepthFunction::Type and StencilFunction::Type.
  */
 struct DALI_SCENE3D_API Comparison
@@ -47,8 +48,9 @@ struct DALI_SCENE3D_API Comparison
   Comparison() = delete;
 };
 
-/*
+/**
  * @brief Determines the blend factor used.
+ * @SINCE_2_0.7
  * @note Relative order of members must match BlendFactor::Type.
  */
 struct DALI_SCENE3D_API BlendFactor
@@ -76,27 +78,29 @@ struct DALI_SCENE3D_API BlendFactor
   BlendFactor() = delete;
 };
 
-/*
+/**
  * @brief Determines which buffers shall the Renderer write into.
+ * @SINCE_2_0.7
  * @note Relative order of members must match RenderMode::Type.
  */
 struct DALI_SCENE3D_API BufferMode
 {
   enum Type
   {
-    OMIT,         ///< not specified - will not be updated
-    NONE,         ///< Don’t write to either color or stencil buffer (But will potentially render to depth buffer).
-    AUTO,         ///< Writes are managed by the Actor Clipping API. This is DALi's default.
-    COLOR,        ///< Ignore stencil properties.  Write to the color buffer.
-    STENCIL,      ///< Use the stencil properties. Do not write to the color buffer.
-    COLOR_STENCIL ///< Use the stencil properties AND Write to the color buffer.
+    OMIT,         ///< not specified - will not be updated. @SINCE_2_0.7
+    NONE,         ///< Don’t write to either color or stencil buffer (But will potentially render to depth buffer). @SINCE_2_0.7
+    AUTO,         ///< Writes are managed by the Actor Clipping API. This is DALi's default. @SINCE_2_0.7
+    COLOR,        ///< Ignore stencil properties.  Write to the color buffer. @SINCE_2_0.7
+    STENCIL,      ///< Use the stencil properties. Do not write to the color buffer. @SINCE_2_0.7
+    COLOR_STENCIL ///< Use the stencil properties AND Write to the color buffer. @SINCE_2_0.7
   };
 
   BufferMode() = delete;
 };
 
-/*
+/**
  * @brief Contains values and functionality for configuring Renderers.
+ * @SINCE_2_0.7
  */
 namespace RendererState
 {
@@ -133,9 +137,10 @@ enum DALI_SCENE3D_API Value : Type
   DEFAULT = DEPTH_WRITE | DEPTH_TEST | CULL_BACK | (Comparison::LESS_EQUAL << DEPTH_FUNCTION_SHIFT),
 };
 
-/*
+/**
  * @brief Encodes the given blend factors into a RenderMode value, maskable into other options,
- *  passable into ApplyRenderMode().
+ * passable into ApplyRenderMode().
+ * @SINCE_2_0.7
  */
 inline DALI_SCENE3D_API constexpr uint32_t FromBlendFactors(BlendFactor::Type srcRgb, BlendFactor::Type destRgb, BlendFactor::Type srcAlpha, BlendFactor::Type destAlpha)
 {
@@ -144,8 +149,9 @@ inline DALI_SCENE3D_API constexpr uint32_t FromBlendFactors(BlendFactor::Type sr
          << BLEND_FACTOR_BASE_SHIFT;
 }
 
-/*
+/**
  * @brief Applies the settings encoded in @a rendererState, to a @a renderer.
+ * @SINCE_2_0.7
  * @note Depth function is only set if not Comparison::OMIT.
  * @note Blend factors are only set if not BlendFactor::OMIT.
  * @note Buffer mode is only set is not BufferMode::OMIT.
index 08dea60..c701112 100644 (file)
@@ -34,8 +34,9 @@
 
 namespace Dali::Scene3D::Loader
 {
-/*
+/**
  * @brief The types of resources that .dli may define.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API ResourceType
 {
@@ -50,17 +51,20 @@ struct DALI_SCENE3D_API ResourceType
   ResourceType() = delete;
 };
 
-/*
- * @return The string value corresponding to the given resource @a type.
+/**
+ * @brief The string value corresponding to the given resource @a type.
+ * @SINCE_2_0.7
+ * @return The string value for type.
  */
 DALI_SCENE3D_API const char* GetResourceTypeName(ResourceType::Value type);
 
 using ResourceRefCounts = std::vector<Vector<uint32_t>>;
 
-/*
+/**
  * @brief Stores all resource definitions along with the DALi resources that
  *  could be created from them, directly indexible into with values from a dli
  *  document.
+ * @SINCE_2_0.7
  */
 class DALI_SCENE3D_API ResourceBundle
 {
@@ -88,9 +92,11 @@ public:
   ResourceBundle& operator=(ResourceBundle&&) = default;
 
   /**
-   * @return A ResourceRefCounts object with the correct number of entries for
+   * @brief A ResourceRefCounts object with the correct number of entries for
    *  all resource types (based on the various resource definition vectors),
    *  with all reference counts set to 0.
+   * @SINCE_2_0.7
+   * @return A ResourceRefCounts object.
    */
   ResourceRefCounts CreateRefCounter() const;
 
@@ -98,15 +104,19 @@ public:
    * @brief Based on a ResourceRefCounts, and more specifically the reference
    *  count of materials therein, it will calculate the reference count of
    *  environment maps.
+   * @SINCE_2_0.7
    */
   void CountEnvironmentReferences();
 
   /**
-   * @brief Performs the loading of all resources based on their respective
-   * reference count in @a refCounts. Resources that had a non-zero ref count will be
-   * loaded unless we already have a handle to them (OR the ForceReload option was specified).
+   * @brief Performs the loading of all resources based on their respective reference count in @a refCounts.
+   *
+   * Resources that had a non-zero ref count will be loaded unless we already have a handle to them
+   * (OR the ForceReload option was specified).
    * Any handles we have to resources that come in with a zero ref count will be reset,
    * UNLESS the KeepUnused option was specified.
+   *
+   * @SINCE_2_0.7
    * @param[in] pathProvider path provider for resource data.
    * @param[in] options Option to load resource
    * @note This method creates DALi objects like Dali::Texture, Dali::Geometry, etc.
@@ -115,11 +125,14 @@ public:
                      Options::Type options = Options::None);
 
   /**
-   * @brief Loads of all resources based on their respective
-   * reference count in @a refCounts. Resources that had a non-zero ref count will be
-   * loaded unless we already have a handle to them (OR the ForceReload option was specified).
+   * @brief Loads of all resources based on their respective reference count in @a refCounts.
+   *
+   * Resources that had a non-zero ref count will be loaded unless we already have a handle to them
+   * (OR the ForceReload option was specified).
    * Any handles we have to resources that come in with a zero ref count will be reset,
    * UNLESS the KeepUnused option was specified.
+   *
+   * @SINCE_2_2.9
    * @note This method don't create any of DALi objects.
    * @param[in] pathProvider path provider for resource data.
    * @param[in] options Option to load resource
@@ -132,6 +145,7 @@ public:
 
   /**
    * @brief Generates DALi objects from already loaded Raw Resources.
+   * @SINCE_2_2.9
    * @param[in] options Option to load resource
    * @note This method generates DALi objects from raw data that is already
    * loaded by LoadRawResources method. Therefore, LoadRawResources should be called first
index 312b9e6..776d161 100644 (file)
@@ -35,9 +35,10 @@ namespace Dali::Scene3D::Loader
 {
 class MatrixStack;
 
-/*
+/**
  * @brief Intermediate representation of a scene with functionality required to
- *  create DALi objects (Actors, Renderers) from it.
+ * create DALi objects (Actors, Renderers) from it.
+ * @SINCE_2_0.7
  */
 class DALI_SCENE3D_API SceneDefinition
 {
@@ -51,87 +52,102 @@ public: // METHODS
   SceneDefinition(SceneDefinition&& other);
   ~SceneDefinition();
 
-  /*
+  /**
    * @brief Registers a scene root node.
+   * @SINCE_2_0.7
    * @return The index of the scene root node *registration*.
    */
   Index AddRootNode(Index iNode);
 
-  /*
-   * @return the list of scene root node IDs in the order of their loading.
+  /**
+   * @brief Retrieves a list of scene root node IDs in the order of loading.
+   * @SINCE_2_0.7
+   * @return List of scene root node IDs in the order of loading
    */
   const std::vector<Index>& GetRoots() const;
 
-  /*
+  /**
    * @brief Removes scene root registration at the given index @a iRoot.
-   * @note @a iRoot is the index of the registration (i.e. into the vector returned by GetRoots()),
-   *  not of the node.
+   * @SINCE_2_0.7
+   * @note @a iRoot is the index of the registration (i.e. into the vector returned by GetRoots()), not of the node.
    */
   void RemoveRootNode(Index iRoot);
 
-  /*
-   * @return The number of node( definition)s in the scene.
+  /**
+   * @brief Retrieve the number of node(definition)s in the scene.
+   * @SINCE_2_0.7
+   * @return The number of node(definition)s in the scene
    */
   uint32_t GetNodeCount() const;
 
-  /*
-   * @return Const pointer to the node (definition) at the given index.
+  /**
+   * @brief Retrieve a const pointer to the node (definition) at the given index.
+   * @SINCE_2_0.7
+   * @return Const pointer to the node (definition).
    */
   const NodeDefinition* GetNode(Index iNode) const;
 
-  /*
-   * @return Pointer to the node (definition) at the given index.
+  /**
+   * @brief Retrive a pointer to the node (definition) at the given index.
+   * @SINCE_2_0.7
+   * @return Pointer to the node (definition).
    */
   NodeDefinition* GetNode(Index iNode);
 
-  /*
-   * @brief Traverses the scene starting from the node at the given index into
-   *  nodes, using the given customization @a choices and the visitor @a v.
+  /**
+   * @brief Traverses the scene starting from the node at the given index into nodes,
+   * using the given customization @a choices and the visitor @a v.
+   * @SINCE_2_0.7
    */
   void Visit(Index iNode, const Customization::Choices& choices, NodeDefinition::IVisitor& v);
 
-  /*
-   * @brief Traverses the scene starting from the node at the given index into
-   *  nodes, using the given customization @a choices and the visitor @a v.
+  /**
+   * @brief Traverses the scene starting from the node at the given index into nodes,
+   * using the given customization @a choices and the visitor @a v.
+   * @SINCE_2_0.7
    */
   void Visit(Index iNode, const Customization::Choices& choices, NodeDefinition::IConstVisitor& v) const;
 
-  /*
-   * @brief Counts the references to meshes, shaders, materials that nodes in
-   *  the scene are holding, writing the results into @a refCounts.
+  /**
+   * @brief Counts the references to meshes, shaders, materials that nodes in the scene are holding,
+   * writing the results into @a refCounts.
+   * @SINCE_2_0.7
    * @note @a refCounts' entries must have the correct size. Use ResourceBundle::GetRefCounter().
    */
   void CountResourceRefs(Index iNode, const Customization::Choices& choices, ResourceRefCounts& refCounts) const;
 
-  /*
-   * @brief Given a bundle of @a resources that are loaded, and customization
-   *  @a choices, this method traverses the scene, creating the ModelNodes and renderers
-   *  from node definitions.
+  /**
+   * @brief Given a bundle of @a resources that are loaded, and customization @a choices,
+   * this method traverses the scene, creating the ModelNodes and renderers from node definitions.
+   * @SINCE_2_0.7
    * @return Handle to the root node.
    */
   ModelNode CreateNodes(Index iNode, const Customization::Choices& choices, NodeDefinition::CreateParams& params);
 
-  /*
-   * @brief Creates / update a registry of mappings from customization tags to
-   *  a lists of names of customizable nodes under each tag, and the number of
-   *  options. If @a outMissingChoices was specified, each tag that it encounters
-   *  in the scene but not in @a choices, will be registered on it with the default
-   *  choice of 0.
+  /**
+   * @brief Creates / update a registry of mappings from customization tags to a lists of names of
+   * customizable nodes under each tag, and the number of options.
+   *
+   * If @a outMissingChoices was specified, each tag that it encounters in the scene but not in @a choices,
+   * will be registered on it with the default choice of 0.
+   * @SINCE_2_0.7
    */
   void GetCustomizationOptions(const Customization::Choices& choices,
                                Customization::Map&           outCustomizationOptions,
                                Customization::Choices*       outMissingChoices) const;
 
-  /*
-   * @brief Attempts to add @a nodeDef to the end of nodes, and its index to the end of
-   *  its parent's list of children (if iParent != NodeDefinition::INVALID_PARENT).
+  /**
+   * @brief Attempts to add @a nodeDef to the end of nodes, and its index to the end of its parent's
+   * list of children (if iParent != NodeDefinition::INVALID_PARENT).
+   * @SINCE_2_0.7
    * @return If the operation was successful - which requires nodeDef->name to be unique -
    *  a pointer to the stored node definition; nullptr otherwise.
    */
   NodeDefinition* AddNode(std::unique_ptr<NodeDefinition>&& nodeDef);
 
-  /*
+  /**
    * @brief Moves the node to some other parent and / or to a different index.
+   * @SINCE_2_0.7
    * @return Whether the operation was successful.
    * @note This is currently breaking an assumption of never having a child of a node at a lower
    *  index as that of the node itself, due to the fact that we're only changing parent ids (and
@@ -142,82 +158,90 @@ public: // METHODS
    */
   bool ReparentNode(const std::string& name, const std::string& newParentName, Index siblingOrder);
 
-  /*
+  /**
    * @brief Removes a node with the given name, including all of its children, and updating
    *  the indices on all remaining node definitions.
+   * @SINCE_2_0.7
    * @return Whether the operation was successful.
    */
   bool RemoveNode(const std::string& name);
 
-  /*
+  /**
    * @brief Builds the model matrix stack for the node at the given @a index.
+   * @SINCE_2_0.7
    * @note It only pushes new matrices; does not require the stack to be empty (or cares if it was not).
    */
   void GetNodeModelStack(Index index, MatrixStack& model) const;
 
-  /*
+  /**
    * @brief Attempts to find the definition of a node with the given @a name. Only upon
    *  success, and if @a outIndex is non-null, the index of the node is written to it.
+   * @SINCE_2_0.7
    * @return Pointer to the node definition; nullptr if not found.
    * @note No ownership transfer.
    */
   NodeDefinition* FindNode(const std::string& name, Index* outIndex = nullptr);
 
-  /*
+  /**
    * @brief Attempts to find the definition of a node with the given @a name. Only upon
    *  success, and if @a outIndex is non-null, the index of the node is written to it.
+   * @SINCE_2_0.7
    * @return Pointer to the node definition; nullptr if not found.
    * @note No ownership transfer.
    */
   const NodeDefinition* FindNode(const std::string& name, Index* outIndex = nullptr) const;
 
-  /*
-   * @return The index of the given NodeDefinition@ a node, or -1 if the node definition
-   *  was not found.
+  /**
+   * @brief The index of the given NodeDefinition @a node, or -1 if the node definition was not found.
+   * @SINCE_2_0.7
+   * @return The index of the given NodeDefinition @a node, or -1 if the node definition was not found
    */
   Index FindNodeIndex(const NodeDefinition& node) const;
 
-  /*
+  /**
    * @brief Calls @a consumer with up to @a limit NodeDefinitions that evaluate to true
    *  with @a predicate.
+   * @SINCE_2_0.7
    * @note A @a limit value of 0 means no limit.
    */
   void FindNodes(NodePredicate predicate, NodeConsumer consumer, unsigned int limit = 0);
 
-  /*
-   * @brief Calls @a consumer with up to @a limit NodeDefinitions that evaluate to true
-   *  with @a predicate.
+  /**
+   * @brief Calls @a consumer with up to @a limit NodeDefinitions that evaluate to true with @a predicate.
+   * @SINCE_2_0.7
    * @note A @a limit value of 0 means no limit.
    */
   void FindNodes(NodePredicate predicate, ConstNodeConsumer consumer, unsigned int limit = 0) const;
 
-  /*
+  /**
    * @brief Applies constraints from the given requests.
+   * @SINCE_2_0.7
    */
   void ApplyConstraints(Actor&                           root,
                         std::vector<ConstraintRequest>&& constrainables,
                         StringCallback                   onError = DefaultErrorCallback) const;
 
-  /*
-   * @brief Ensures that there is no overlap between shaders used by nodes that have
-   *  meshes skinned to different skeletons.
+  /**
+   * @brief Ensures that there is no overlap between shaders used by nodes that have meshes skinned to different skeletons.
+   * @SINCE_2_0.7
    */
   void EnsureUniqueSkinningShaderInstances(ResourceBundle& resources) const;
 
-  /*
-   * @brief Performs the configuration of the given skinning shaders with the given skeleton
-   *   This means that the absolute transforms of the joints are calculated and set as one of
-   *   the uniforms in the mat4 @b uBone array (in depth first traversal). Further, the following
-   *   are created:<br />
-   *   - a @b jointMatrix property on each joint Actor;<br />
-   *   - constraint from the Actor's local position and rotation (and if it has a @e joint
-   *     parent, the jointMatrix of the parent) to its @b jointMatrix property;<br />
-   *   - a constraint from the the Actor's @b jointMatrix property to the related entry in
-   *     the shader's @b uBone property;<br />
-   *   This ensures the automatic update of the skeletal animation, should any of the joints'
-   *   transform changes, by whatever means.
-   * @return The success of the operations. Error messages will be posted to the optional
-   *   @a onError callback.
+  /**
+   * @brief Performs the configuration of the given skinning shaders with the given skeleton.
+   *
+   * This means that the absolute transforms of the joints are calculated and set as one of
+   * the uniforms in the mat4 @b uBone array (in depth first traversal). Further, the following
+   * are created:<br />
+   *  - a @b jointMatrix property on each joint Actor;<br />
+   *  - constraint from the Actor's local position and rotation (and if it has a @e joint
+   *    parent, the jointMatrix of the parent) to its @b jointMatrix property;<br />
+   *  - a constraint from the the Actor's @b jointMatrix property to the related entry in
+   *    the shader's @b uBone property;<br />
+   * This ensures the automatic update of the skeletal animation, should any of the joints' transform changes,
+   * by whatever means.
+   * @SINCE_2_0.7
+   * @note Error messages will be posted to the optional @a onError callback.
    * @note A maximum of SkinningDetails::MAX_JOINTS joints per skeleton are supported at the moment.
    * @note Even if multiple skinned meshes use the same skinning shader, the correct number
    *   of separate instances need to be declared in the .dli to avoid clashing uniform
@@ -227,8 +251,9 @@ public: // METHODS
                                 Actor                                             root,
                                 std::vector<SkinningShaderConfigurationRequest>&& requests) const;
 
-  /*
+  /**
    * @brief Ensures there is no two meshes with blend shapes sharing the same shader.
+   * @SINCE_2_0.7
    */
   void EnsureUniqueBlendShapeShaderInstances(ResourceBundle& resources) const;
 
@@ -237,7 +262,8 @@ public: // METHODS
    *
    * For each node with blend shapes it registers into the actor the weights properties for each morph target
    * and some needed uniforms into the shader.
-   * 
+   *
+   * @SINCE_2_0.7
    * @param[in] root The root actor.
    * @param[in] requests The requests to configure blend shapes.
    * @param[in] resources The resources bundle. Meshes need to be accessed to configure the blend shapes.
index f39ac5f..743d343 100644 (file)
 
 namespace Dali::Scene3D::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.
+ * @SINCE_2_0.7
  */
 struct DALI_SCENE3D_API ShaderDefinition
 {
@@ -48,22 +49,24 @@ struct DALI_SCENE3D_API ShaderDefinition
   ShaderDefinition() = default;
 
   ShaderDefinition(const ShaderDefinition& other);
-  ShaderDefinition& operator=(const ShaderDefinition& other);
+  ShaderDefinition& operator=(const ShaderDefinition& other) = delete;
 
   ShaderDefinition(ShaderDefinition&&) = default;
   ShaderDefinition& operator=(ShaderDefinition&&) = default;
 
-  /*
+  /**
    * @brief Attempts to load the source of the vertex and fragment shaders,
    *  then performs pre-processing of defines.
+   * @SINCE_2_0.7
    * @note This may be called from any thread.
    */
   RawData LoadRaw(const std::string& shadersPath) const;
 
-  /*
+  /**
    * @brief Creates a DALi Shader from the sources in @a raw, traverses
    *  uniforms to get them to register their data against their name,
    *  then returns the Shader.
+   * @SINCE_2_0.7
    * @note This must be called from the event thread.
    */
   Shader Load(RawData&& raw) const;
index af28cd8..2ef95ce 100644 (file)
@@ -40,8 +40,10 @@ typedef IntrusivePtr<ShaderManager> ShaderManagerPtr;
 
 /**
  * @brief This class is to manage Shaders.
+ *
  * This class could be used as factory class to create Dali::Shader.
  * And once created Dali::Shader is kept in this manager and will be returned when the same Dali::Shader is requested to be created.
+ * @SINCE_2_2.34
  */
 class DALI_SCENE3D_API ShaderManager : public RefObject
 {
@@ -51,8 +53,10 @@ public:
 
   /**
    * @brief Produces a Dali::Shader for the input materialDefinition and meshDefinition.
+   *
    * Returns a cached Dali::Shader if the requested Dali::Shader has already been created once.
    * (Although the input materialDefinition and meshDefinition are not identical to those used to create the cached Dali::Shader, they share the cached one.)
+   * @SINCE_2_2.34
    * @param[in] materialDefinition MaterialDefinition that includes information of material to create Shader.
    * @param[in] meshDefinition meshDefinition that includes information of mesh to create Shader.
    * @return ShaderOption for the materialDefinition and meshDefinition.
@@ -60,8 +64,10 @@ public:
   ShaderOption ProduceShaderOption(const MaterialDefinition& materialDefinition, const MeshDefinition& meshDefinition);
 
   /**
-   * @brief Produces a Dali::Shader for the input ShaderOption
+   * @brief Produces a Dali::Shader for the input ShaderOption.
+   *
    * Returns a cached Dali::Shader if the requested Dali::Shader has already been created once.
+   * @SINCE_2_2.34
    * @param[in] shaderOption shader option to create Shader.
    * @return Dali::Shader of the shader option
    */
@@ -69,6 +75,7 @@ public:
 
   /**
    * @brief Returns RendererState of the input materialDefinition.
+   * @SINCE_2_2.34
    * @param[in] materialDefinition MaterialDefinition to get RendererState
    * @return RendererState of the materialDefinition.
    */
@@ -76,6 +83,7 @@ public:
 
   /**
    * @brief Adds new lights for each of shaders.
+   * @SINCE_2_2.34
    * @param[in] light Light object to be newly added.
    * @return True when the new light object is added successfully.
    */
@@ -83,35 +91,40 @@ public:
 
   /**
    * @brief Removes light from each of shaders.
+   * @SINCE_2_2.34
    * @param[in] light Light object to be removed.
    */
   void RemoveLight(Scene3D::Light light);
 
   /**
    * @brief Retrieves added light counts.
+   * @SINCE_2_2.34
    * @return The number of added light count.
    */
   uint32_t GetLightCount() const;
 
   /**
    * @brief Set a shadow to this scene by input light.
-   *
+   * @SINCE_2_2.34
    * @param[in] light Light object to make shadow.
    */
   void SetShadow(Scene3D::Light light);
 
   /**
    * @brief Removes Shadow from this SceneView.
+   * @SINCE_2_2.34
    */
   void RemoveShadow();
 
   /**
    * @brief Update uniform properties of shadow for the input light.
+   * @SINCE_2_2.34
    * @param[in] light Light object to update shadow uniform.
    */
   void UpdateShadowUniform(Scene3D::Light light);
 
 private:
+  /// @cond internal
   /**
    * @brief Sets constraint to the shaders with light of light index.
    * @param[in] lightIndex index of light that will be connected with shaders by constraint.
@@ -148,6 +161,7 @@ private:
    */
   DALI_INTERNAL void SetShadowConstraintToShader(Dali::Shader shader);
 
+  /// @endcond
 private:
   struct Impl;
   const std::unique_ptr<Impl> mImpl;
index 378d85b..063d4c0 100644 (file)
@@ -69,30 +69,35 @@ public:
 public:
   /**
    * @brief Sets transparency option.
+   * @SINCE_2_2.33
    */
   void SetTransparency();
 
   /**
    * @brief Adds new shader definition option.
-   * If the option is already added, nothin is changed.
    *
+   * If the option is already added, nothin is changed.
+   * @SINCE_2_2.33
    * @param[in] shaderOptionType Option to be added,
    */
   void AddOption(Type shaderOptionType);
 
   /**
-   * Adds macro definitions for joints based on the number of joint sets.
+   * @brief Adds macro definitions for joints based on the number of joint sets.
+   * @SINCE_2_2.52
    */
   void AddJointMacros(size_t numberOfJointSets);
 
   /**
-   * Enables empty preprocessor definitions to be defined to a value
+   * @brief Enables empty preprocessor definitions to be defined to a value.
+   * @SINCE_2_2.52
    */
   void AddMacroDefinition(std::string macro, std::string definition);
 
   /**
    * @brief Retrieves current shader option hash
    *
+   * @SINCE_2_2.33
    * @return Hash value of currently added options.
    */
   HashType GetOptionHash() const;
@@ -100,6 +105,7 @@ public:
   /**
    * @brief Retrieves a list of define keywords.
    *
+   * @SINCE_2_2.33
    * @param[out] defines A list of define keywords those are used in this option.
    */
   void GetDefines(std::vector<std::string>& defines) const;
@@ -107,13 +113,15 @@ public:
   /**
    * @brief Retrieves a single shader define keyword of input type.
    *
+   * @SINCE_2_2.33
    * @param[in] shaderOptionType Shader definition option type to know its keyword.
    * @return string keyword of shader define.
    */
   static std::string_view GetDefineKeyword(Type shaderOptionType);
 
   /**
-   * Get any macro definitions
+   * @brief Get any macro definitions.
+   * @SINCE_2_2.52
    */
   const std::vector<MacroDefinition>& GetMacroDefinitions() const;
 
index 0fca023..4db02ff 100644 (file)
@@ -26,8 +26,9 @@
 
 namespace Dali::Scene3D::Loader
 {
-/*
+/**
  * @brief A set of joints (stored as node indices), and an optional root node index.
+ * @SINCE_2_0.7
  * @note The list of joints must not be empty and must not contain INVALID_INDEX.
  * @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.
index 59f778a..7752219 100644 (file)
@@ -18,8 +18,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/rendering/shader.h>
 #include <dali/public-api/animation/constraint.h>
+#include <dali/public-api/rendering/shader.h>
 #include <string>
 
 // INTERNAL INCLUDES
@@ -41,13 +41,15 @@ public:
     Matrix                        inverseMatrix;
   };
 
-  /*
+  /**
    * @brief Upper limit on the number of joints supported.
+   * @SINCE_2_0.7
    */
   static const uint32_t MAX_JOINTS;
 
-  /*
+  /**
    * @brief Name of bone matrix uniform (array).
+   * @SINCE_2_0.7
    */
   static const char* BONE_UNIFORM_NAME;
 
index 7a3564d..10a8c4c 100644 (file)
 
 namespace Dali::Scene3D::Loader
 {
-/*
+/**
  * @brief A callback to post strings to.
+ * @SINCE_2_0.7
  */
 using StringCallback = std::function<void(const std::string&)>;
 
-/*
+/**
  * @brief Simply passes the formatted message to LOGE().
+ * @SINCE_2_0.7
  */
 DALI_SCENE3D_API void DefaultErrorCallback(const std::string& message);
 
index 17d4261..8add8d5 100644 (file)
 
 namespace Dali::Scene3D::Loader
 {
-/*
- * @brief Fixed size backing buffer to use with std::ostreams where control over
- *  allocations (which this does not make), is required.
- * @note All stream insertions that would overflow the buffer that StreamBuffer
- *  was created with, will fail.
+/**
+ * @brief Fixed size backing buffer to use with std::ostreams where control over allocations (which this does not make), is required.
+ * @SINCE_2_0.7
+ * @note All stream insertions that would overflow the buffer that StreamBuffer was created with, will fail.
  */
 class DALI_SCENE3D_API StreamBuffer : public std::basic_streambuf<char>
 {
@@ -41,10 +40,11 @@ public:
   StreamBuffer(char* buffer, size_t size) noexcept(true);
 };
 
-/*
- * @brief Wraps an ostream with a pre-allocated, fixed size backing buffer
- *  which a message can be formatted into. Upon destruction, it throws a
- *  DaliException with the message.
+/**
+ * @brief Wraps an ostream with a pre-allocated, fixed size backing buffer which a message can be formatted into.
+ *
+ * Upon destruction, it throws a DaliException with the message.
+ * @SINCE_2_0.7
  */
 class DALI_SCENE3D_API ExceptionFlinger
 {
@@ -80,39 +80,46 @@ private:
   std::ostream mStream;
 };
 
-/*
+/**
  * @brief Formats the given printf-style varargs into a std::string.
+ * @SINCE_2_0.7
  */
 DALI_SCENE3D_API std::string FormatString(const char* format, ...);
 
-/*
- * @return The @n th bit in a bitmask.
+/**
+ * @brief The @n th bit in a bitmask.
+ * @SINCE_2_0.7
+ * @return The @n th bit in a bitmask
  */
 DALI_SCENE3D_API constexpr size_t NthBit(size_t n)
 {
   return 1u << n;
 }
 
-/*
- * @return Whether all of @a mask 's bits are set on @a value.
+/**
+ * @brief Whether all of @a mask 's bits are set on @a value.
+ * @SINCE_2_0.7
+ * @return Whether all of @a mask 's bits are set on @a value
  */
 inline DALI_SCENE3D_API bool MaskMatch(uint32_t value, uint32_t mask)
 {
   return (value & mask) == mask;
 }
 
-/*
+/**
  * @brief Convert a four-letter(, null-terminated) string literal into a uint32_t.
+ * @SINCE_2_0.7
  */
 inline DALI_SCENE3D_API constexpr uint32_t FourCC(const char (&fourCC)[5])
 {
   return (fourCC[3] << 24) | (fourCC[2] << 16) | (fourCC[1] << 8) | fourCC[0];
 }
 
-/*
+/**
  * @brief Insensitive case compare function.
- * @param[in] a, compare string
- * @param[in] b, compare string
+ * @SINCE_2_0.7
+ * @param[in] a compare string
+ * @param[in] b compare string
  * @return true if strings are equal
  */
 inline DALI_SCENE3D_API bool CaseInsensitiveCharacterCompare(unsigned char a, unsigned char b)
@@ -121,10 +128,11 @@ inline DALI_SCENE3D_API bool CaseInsensitiveCharacterCompare(unsigned char a, un
   return std::tolower(a) == std::tolower(b);
 }
 
-/*
+/**
  * @return true if the lower cased ASCII strings are equal.
- * @param[in] a, compare string
- * @param[in] b, compare string
+ * @SINCE_2_0.7
+ * @param[in] a compare string
+ * @param[in] b compare string
  */
 inline DALI_SCENE3D_API bool CaseInsensitiveStringCompare(const std::string& a, const std::string& b)
 {
@@ -136,17 +144,19 @@ inline DALI_SCENE3D_API bool CaseInsensitiveStringCompare(const std::string& a,
   return result;
 }
 
-/*
- * @brief Attempts to load the contents of a text file; returns empty string on
- *  failure. A pointer to a boolean may be passed in @a fail; this will be set
- *  to true in case of failure (should only be checked if the returned string
- *  was empty()).
+/**
+ * @brief Attempts to load the contents of a text file; returns empty string on failure.
+ *
+ * A pointer to a boolean may be passed in @a fail; this will be set to true in case of failure
+ * (should only be checked if the returned string was empty()).
+ * @SINCE_2_0.7
  */
 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
- *  @a actor then each of its children, in depth-first traversal.
+/**
+ * @brief Makes a number of calls to @a fn, passing to each one the given @a actor then each of its children, in depth-first traversal.
+ *
+ * @SINCE_2_0.7
  * @note @a fn must not change the actor hierarchy during traversal.
  * @note Use of a @a fn that is itself recursing in @a is also discouraged
  *  for performance and stability reasons.
@@ -163,9 +173,9 @@ inline DALI_SCENE3D_API void VisitActor(Actor a, Func fn)
   }
 }
 
-/*
- * @brief Convenience function to set the given actor @a 's anchor point
- *  and parent origin to center.
+/**
+ * @brief Convenience function to set the given actor @a 's anchor point and parent origin to center.
+ * @SINCE_2_0.7
  */
 inline DALI_SCENE3D_API void SetActorCentered(Actor a)
 {
@@ -184,13 +194,15 @@ enum DALI_SCENE3D_API Values : Type
 };
 } // namespace TexturedQuadOptions
 
-/*
+/**
  * @brief Makes... geometry for a textured quad.
+ * @SINCE_2_0.7
  */
 DALI_SCENE3D_API Geometry MakeTexturedQuadGeometry(TexturedQuadOptions::Type options = TexturedQuadOptions::NONE);
 
-/*
+/**
  * @brief Fixes the path of a file. Replaces the '\\' separator by the '/' one.
+ * @SINCE_2_0.7
  * @param[in,out] path The path to be fixed.
  */
 DALI_SCENE3D_API void ToUnixFileSeparators(std::string& path);
index c1e5532..3516a33 100644 (file)
@@ -26,8 +26,8 @@
 namespace Dali::Scene3D::Loader
 {
 /**
- * @brief Contains view and projection matrices, also caching the view-projection
- *      and inverse projection matrices.
+ * @brief Contains view and projection matrices, also caching the view-projection and inverse projection matrices.
+ * @SINCE_2_0.7
  */
 class ViewProjection
 {
@@ -41,8 +41,9 @@ public:
     return mProjection;
   }
 
-  /*
+  /**
    * @brief Updates the cached view projection and inverse projection matrices.
+   * @SINCE_2_0.7
    */
   void Update();
 
index d42c838..6e2c73b 100644 (file)
@@ -48,7 +48,7 @@ class Material;
 /**
  * @brief Class for setting Material properties of 3D models
  *
- * @SINCE_2_2.99
+ * @SINCE_2_2.22
  *
  * @note This Material class is for setting Material properties of 3D models.
  * This Material supports properties and textures for PBR.
@@ -67,21 +67,21 @@ class DALI_SCENE3D_API Material : public Dali::BaseHandle
 public:
   /**
    * @brief Enumeration for the start and end property ranges for material.
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    */
   enum PropertyRange
   {
-    PROPERTY_START_INDEX          = PROPERTY_REGISTRATION_START_INDEX,    ///< Start index is used by the property registration macro. @SINCE_2_2.99
-    MATERIAL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,                 ///< Start index of Control properties. @SINCE_2_2.99
-    MATERIAL_PROPERTY_END_INDEX   = MATERIAL_PROPERTY_START_INDEX + 1000, ///< Reserving 1000 property indices. @SINCE_2_2.99
+    PROPERTY_START_INDEX          = PROPERTY_REGISTRATION_START_INDEX,    ///< Start index is used by the property registration macro. @SINCE_2_2.22
+    MATERIAL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,                 ///< Start index of Control properties. @SINCE_2_2.22
+    MATERIAL_PROPERTY_END_INDEX   = MATERIAL_PROPERTY_START_INDEX + 1000, ///< Reserving 1000 property indices. @SINCE_2_2.22
 
-    ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,        ///< @SINCE_2_2.99
-    ANIMATABLE_PROPERTY_END_INDEX   = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000, ///< Reserve animatable property indices, @SINCE_2_2.99
+    ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,        ///< @SINCE_2_2.22
+    ANIMATABLE_PROPERTY_END_INDEX   = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000, ///< Reserve animatable property indices, @SINCE_2_2.22
   };
 
   /**
    * @brief Enumeration for the instance of properties belonging to the Material class.
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    */
   struct Property
   {
@@ -90,140 +90,140 @@ public:
       /**
        * @brief Name of material.
        * @details type Property::STRING.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       NAME = MATERIAL_PROPERTY_START_INDEX,
 
       /**
        * @brief Property for the URL of the base color texture.
        * @details Type Property::STRING.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       BASE_COLOR_URL,
 
       /**
        * @brief Property for the base color factor of the material surface.
        * @details Type Property::VECTOR4.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       BASE_COLOR_FACTOR,
 
       /**
        * @brief Property for the URL of the metallic-roughness texture.
        * @details Type Property::STRING.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       METALLIC_ROUGHNESS_URL,
 
       /**
        * @brief Property for the metallic factor of the material surface.
        * @details Type Property::FLOAT.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       METALLIC_FACTOR,
 
       /**
        * @brief Property for the roughness factor of the material surface.
        * @details Type Property::FLOAT.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       ROUGHNESS_FACTOR,
 
       /**
        * @brief Property for the URL of the normal texture.
        * @details Type Property::STRING.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       NORMAL_URL,
 
       /**
        * @brief Property for the scale factor applied to normal vectors.
        * @details Type Property::FLOAT.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       NORMAL_SCALE,
 
       /**
        * @brief Property for the URL of the occlusion texture.
        * @details Type Property::STRING.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       OCCLUSION_URL,
 
       /**
        * @brief Property for the occlusion strength of the material surface.
        * @details Type Property::FLOAT.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       OCCLUSION_STRENGTH,
 
       /**
        * @brief Property for the URL of the emissive texture.
        * @details Type Property::STRING.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       EMISSIVE_URL,
 
       /**
        * @brief Emissive factor Property.
        * @details type Property::VECTOR3.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       EMISSIVE_FACTOR,
 
       /**
        * @brief Alpha mode Property.
        * @details type Property::INTEGER.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       ALPHA_MODE,
 
       /**
        * @brief Alpha cutoff Property.
        * @details type Property::FLOAT.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       ALPHA_CUTOFF,
 
       /**
        * @brief Double sided Property.
        * @details type Property::BOOLEAN.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       DOUBLE_SIDED,
 
       /**
        *@brief Index of refraction (IOR) of the material surface
        *@details type Property::FLOAT
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       IOR,
 
       /**
        * @brief Property for the URL of the specular texture.
        * @details Type Property::STRING.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       SPECULAR_URL,
 
       /**
        *@brief Property for the specular factor of the material surface.
        *@details Type Property::FLOAT.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       SPECULAR_FACTOR,
 
       /**
        * @brief Property for the URL of the specular color texture.
        * @details Type Property::STRING.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       SPECULAR_COLOR_URL,
 
       /**
        *@brief Property for the specular color factor of the material surface.
        *@details Type Property::VECTOR3.
-       * @SINCE_2_2.99
+       * @SINCE_2_2.22
        */
       SPECULAR_COLOR_FACTOR,
     };
@@ -233,49 +233,49 @@ public:
   {
     /**
      * @brief Base Color Texture Property.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      * @note This texture represents the base color of the material. In most cases, this will be the diffuse color of the material.
      */
     BASE_COLOR,
 
     /**
      * @brief Metallic Roughness Texture Property.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      * @note This texture represents the metallicness and roughness of the material. This texture can be used to make the material look more metallic or rough.
      */
     METALLIC_ROUGHNESS,
 
     /**
      * @brief Normal Texture Property.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      * @note This texture represents the surface of the material. This texture can be used to make the surface of the material look smooth or rough.
      */
     NORMAL,
 
     /**
      * @brief Occlusion Texture Property.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      * @note This texture represents the depth of the material. This texture can be used to make the material look more three-dimensional.
      */
     OCCLUSION,
 
     /**
      * @brief Emissive Texture Property.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      * @note This texture makes the material look like it's emitting light. This texture can be used to make the material look like it's glowing.
      */
     EMISSIVE,
 
     /**
      * @brief Specular Texture Property.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      * @note This texture represents the specular reflection of the material. This texture can be used to make the material look more reflective.
      */
     SPECULAR,
 
     /**
      * @brief Specular Color Texture Property.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      * @note This texture represents the color of the specular reflection of the material. This texture can be used to set the color of the specular reflection of the material.
      */
     SPECULAR_COLOR,
@@ -285,19 +285,19 @@ public:
   {
     /**
      * @brief This indicates that the material is fully opaque and that the alpha value should be ignored.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      */
     OPAQUE,
 
     /**
      * @brief This indicates that the material is either fully opaque or fully transparent depending on the alpha value. The alpha value is used to mask out areas of the material that should be transparent.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      */
     MASK,
 
     /**
      * @brief This indicates that the material is transparent and that the alpha value should be used to blend the material with the background.
-     * @SINCE_2_2.99
+     * @SINCE_2_2.22
      */
     BLEND,
   };
@@ -306,7 +306,7 @@ public: // Creation & Destruction
   /**
    * @brief Create an initialized Material.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @return A handle to a newly allocated Dali resource
    */
   static Material New();
@@ -317,7 +317,7 @@ public: // Creation & Destruction
    * Only derived versions can be instantiated. Calling member
    * functions with an uninitialized Dali::Object is not allowed.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    */
   Material();
 
@@ -326,14 +326,14 @@ public: // Creation & Destruction
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    */
   ~Material();
 
   /**
    * @brief Copy constructor.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] material Handle to an object
    */
   Material(const Material& material);
@@ -341,7 +341,7 @@ public: // Creation & Destruction
   /**
    * @brief Move constructor
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] rhs A reference to the moved handle
    */
   Material(Material&& rhs) noexcept;
@@ -349,7 +349,7 @@ public: // Creation & Destruction
   /**
    * @brief Assignment operator.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] material Handle to an object
    * @return reference to this
    */
@@ -358,7 +358,7 @@ public: // Creation & Destruction
   /**
    * @brief Move assignment
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this
    */
@@ -370,7 +370,7 @@ public: // Creation & Destruction
    * If handle points to a Material, the downcast produces valid handle.
    * If not, the returned handle is left uninitialized.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] handle Handle to an object
    * @return Handle to a Material or an uninitialized handle
    */
@@ -381,7 +381,7 @@ public: // Public Method
    * @brief Sets the value of an existing property.
    * @note BaseHandle is not subclass of Handle. So this API is not use Handle.SetProperty
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] index The index of the property
    * @param[in] propertyValue The new value of the property
    */
@@ -391,7 +391,7 @@ public: // Public Method
    * @brief Retrieves a property value.
    * @note BaseHandle is not subclass of Handle. So this API is not use Handle.SetProperty
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] index The index of the property
    * @return The property value
    * @note This returns the value set by SetProperty() or the animation target value if it is being animated.
@@ -401,7 +401,7 @@ public: // Public Method
   /**
    * @brief Convenience function for obtaining a property of a known type.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] index The index of the property
    * @return The property value
    * @pre The property types match i.e. PropertyTypes::Get<T>() is equal to GetPropertyType(index).
@@ -418,7 +418,7 @@ public: // Public Method
   /**
    * @brief Sets the texture for a given texture type.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] index The texture type index
    * @param[in] texture The texture to set.
    */
@@ -427,7 +427,7 @@ public: // Public Method
   /**
    * @brief Gets the texture for a given texture type.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] index The texture type index
    * @return The texture at the given index.
    */
@@ -436,7 +436,7 @@ public: // Public Method
   /**
    * @brief Sets the sampler for a given texture type.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] index The texture type index
    * @param[in] sampler The sampler to use for this texture type
    */
@@ -445,7 +445,7 @@ public: // Public Method
   /**
    * @brief Gets the sampler for a given texture type.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] index The texture type index
    * @return The sampler used for this texture type
    */
index f4bd758..2832531 100644 (file)
@@ -128,6 +128,21 @@ Loader::BlendShapes::Index ModelNode::GetBlendShapeIndexByName(std::string_view
   return Internal::GetImplementation(*this).GetBlendShapeIndexByName(blendShapeName);
 }
 
+void ModelNode::SetColliderMesh(std::unique_ptr<Algorithm::ColliderMesh>&& colliderMesh)
+{
+  Internal::GetImplementation(*this).SetColliderMesh(std::move(colliderMesh));
+}
+
+const Algorithm::ColliderMesh& ModelNode::GetColliderMesh()
+{
+  return Internal::GetImplementation(*this).GetColliderMesh();
+}
+
+bool ModelNode::HasColliderMesh() const
+{
+  return Internal::GetImplementation(*this).HasColliderMesh();
+}
+
 } // namespace Scene3D
 
 } // namespace Dali
index 508b80c..5ae5831 100644 (file)
 #include <dali/public-api/common/dali-common.h>
 
 // INTERNAL INCLUDES
+#include <dali-scene3d/public-api/algorithm/navigation-mesh.h>
 #include <dali-scene3d/public-api/api.h>
 #include <dali-scene3d/public-api/loader/blend-shape-details.h> ///< For Loader::BlendShapes::Index
 #include <dali-scene3d/public-api/model-components/model-primitive.h>
-
 namespace Dali
 {
 namespace Scene3D
@@ -48,7 +48,7 @@ class ModelNode;
  * If a 3D format file is loaded by Model, ModelNode is created internally to construct the model.
  * In addition, you can create a Custom ModelNode using ModelPrimitive and Material directly and add it to Model.
  *
- * @SINCE_2_2.99
+ * @SINCE_2_2.22
  *
  * @code
  * ModelNode modelNode = ModelNode::New();
@@ -66,7 +66,7 @@ public:
   /**
    * @brief Create an initialized ModelNode.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @return A handle to a newly allocated Dali resource
    */
   static ModelNode New();
@@ -77,7 +77,7 @@ public:
    * Only derived versions can be instantiated. Calling member
    * functions with an uninitialized Dali::Object is not allowed.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    */
   ModelNode();
 
@@ -86,14 +86,14 @@ public:
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    */
   ~ModelNode();
 
   /**
    * @brief Copy constructor.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] modelNode Handle to an object
    */
   ModelNode(const ModelNode& modelNode);
@@ -101,7 +101,7 @@ public:
   /**
    * @brief Move constructor
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] rhs A reference to the moved handle
    */
   ModelNode(ModelNode&& rhs) noexcept;
@@ -109,7 +109,7 @@ public:
   /**
    * @brief Assignment operator.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] modelNode Handle to an object
    * @return reference to this
    */
@@ -118,7 +118,7 @@ public:
   /**
    * @brief Move assignment
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this
    */
@@ -130,7 +130,7 @@ public:
    * If handle points to a ModelNode, the downcast produces valid handle.
    * If not, the returned handle is left uninitialized.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] handle Handle to an object
    * @return Handle to a ModelNode or an uninitialized handle
    */
@@ -140,7 +140,7 @@ public: // Public Method
   /**
    * @brief Gets the number of ModelPrimitives this node has.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @return The number of ModelPrimitives this node has.
    */
   uint32_t GetModelPrimitiveCount() const;
@@ -148,7 +148,7 @@ public: // Public Method
   /**
    * @brief Appends a ModelPrimitive to this node.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] modelPrimitive The ModelPrimitive to append.
    */
   void AddModelPrimitive(ModelPrimitive modelPrimitive);
@@ -156,7 +156,7 @@ public: // Public Method
   /**
    * @brief Removes a ModelPrimitive from this node.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] modelPrimitive The ModelPrimitive to remove.
    */
   void RemoveModelPrimitive(ModelPrimitive modelPrimitive);
@@ -164,7 +164,7 @@ public: // Public Method
   /**
    * @brief Removes a ModelPrimitive from this node by index.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] index The index of the ModelPrimitive to remove.
    */
   void RemoveModelPrimitive(uint32_t index);
@@ -172,7 +172,7 @@ public: // Public Method
   /**
    * @brief Gets a ModelPrimitive by index.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] index The index of the ModelPrimitive to get.
    * @return The ModelPrimitive at the given index, or an empty handle if the index is out of range.
    */
@@ -181,7 +181,7 @@ public: // Public Method
   /**
    * @brief Returns a child ModelNode object with a name that matches nodeName.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.34
    * @param[in] nodeName The name of the child ModelNode object you want to find.
    * @return Returns a child ModelNode object with a name that matches nodeName. If there is no corresponding child ModelNode object, it returns an empty ModelNode object.
    */
@@ -191,7 +191,7 @@ public: // Public Method
    * @brief Retrieve the list of blendshape name that current ModelNode hold.
    * The name will be appended end of input list.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.34
    * @param[in, out] blendShapeNames The name of blendShape list collected.
    */
   void RetrieveBlendShapeNames(std::vector<std::string>& blendShapeNames) const;
@@ -199,12 +199,46 @@ public: // Public Method
   /**
    * @brief Get the index of blend shape by given name.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.34
    * @param[in] blendShapeName The name of blendshape that is not empty.
    * @return Index of blendshape, or return invalid if there is no blendshape with given name.
    */
   Loader::BlendShapes::Index GetBlendShapeIndexByName(std::string_view blendShapeName) const;
 
+  /**
+   * @brief Sets collider mesh on the ModelNode
+   *
+   * The ownership of a collider mesh is taken over by the ModelNode.
+   *
+   * If there was a collider mesh set previously it will be erased.
+   *
+   * To remove collider mesh empty unique_ptr must be passed.
+   *
+   * @SINCE_2_2.53
+   * @param[in] colliderMesh r-value to unique pointer of ColliderMesh
+   */
+  void SetColliderMesh(std::unique_ptr<Algorithm::ColliderMesh>&& colliderMesh);
+
+  /**
+   * @brief Returns associated collider mesh
+   *
+   * HasColliderMesh() must be called to determine whether a valid
+   * collider mesh is associated. Calling GetColliderMesh() without
+   * previous check may produce undefined behaviour.
+   *
+   * @SINCE_2_2.53
+   * @return Associated collider mesh
+   */
+  const Algorithm::ColliderMesh& GetColliderMesh();
+
+  /**
+   * @brief Determines whether there is a valid collider mesh set
+   *
+   * @SINCE_2_2.53
+   * @return True if collider mesh is set, False otherwise
+   */
+  [[nodiscard]] bool HasColliderMesh() const;
+
 public: // Not intended for application developers
   /// @cond internal
   /**
index 97ee9d3..22074e7 100644 (file)
@@ -47,7 +47,7 @@ class ModelPrimitive;
  * Users can set Dali::Geometry and Material to ModelPrimitive using SetGeometry and SetMaterial methods respectively.
  * When ModelPrimitive added to ModelNode using ModelNode::AddModelPrimitive() method, the Geometry is rendered on the screen according to the Material settings.
  *
- * @SINCE_2_2.99
+ * @SINCE_2_2.22
  *
  * If you load resources from 3D format files such as glTF using Model class, ModelPrimitive is also created internally.
  * In this case, blendShape morphing or skeletal animation defined in the format can be used.
@@ -59,7 +59,7 @@ public: // Creation & Destruction
   /**
    * @brief Create an initialized ModelPrimitive.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @return A handle to a newly allocated Dali resource
    */
   static ModelPrimitive New();
@@ -70,7 +70,7 @@ public: // Creation & Destruction
    * Only derived versions can be instantiated. Calling member
    * functions with an uninitialized Dali::Object is not allowed.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    */
   ModelPrimitive();
 
@@ -79,14 +79,14 @@ public: // Creation & Destruction
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    */
   ~ModelPrimitive();
 
   /**
    * @brief Copy constructor.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] modelPrimtive Handle to an object
    */
   ModelPrimitive(const ModelPrimitive& modelPrimtive);
@@ -94,7 +94,7 @@ public: // Creation & Destruction
   /**
    * @brief Move constructor
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] rhs A reference to the moved handle
    */
   ModelPrimitive(ModelPrimitive&& rhs) noexcept;
@@ -102,7 +102,7 @@ public: // Creation & Destruction
   /**
    * @brief Assignment operator.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] modelPrimitive Handle to an object
    * @return reference to this
    */
@@ -111,7 +111,7 @@ public: // Creation & Destruction
   /**
    * @brief Move assignment
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this
    */
@@ -123,7 +123,7 @@ public: // Creation & Destruction
    * If handle points to a ModelPrimitive, the downcast produces valid handle.
    * If not, the returned handle is left uninitialized.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] handle Handle to an object
    * @return Handle to a ModelPrimitive or an uninitialized handle
    */
@@ -133,7 +133,7 @@ public: // Public Method
   /**
    * @brief Set the geometry for this renderer.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] geometry The geometry to set.
    */
   void SetGeometry(Dali::Geometry geometry);
@@ -141,7 +141,7 @@ public: // Public Method
   /**
    * @brief Get the geometry for this renderer.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @return The geometry for this renderer.
    */
   Dali::Geometry GetGeometry() const;
@@ -149,7 +149,7 @@ public: // Public Method
   /**
    * @brief Sets the material for this primitive.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @param[in] material The material
    */
   void SetMaterial(Material material);
@@ -157,7 +157,7 @@ public: // Public Method
   /**
    * @brief Retrieves a material.
    *
-   * @SINCE_2_2.99
+   * @SINCE_2_2.22
    * @return The material handle
    */
   Material GetMaterial() const;
index c42eed8..5b1adaf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -45,9 +45,12 @@ Glyph::Glyph(const std::string& url, const std::string utf8Character, float asce
   ascender{ascender},
   descender{descender}
 {
-  DALI_ASSERT_DEBUG(utf8Character.size() <= 4u);
+  DALI_ASSERT_DEBUG(utf8Character.size() <= 6u);
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
   std::copy(utf8Character.begin(), utf8Character.end(), utf8);
+#pragma GCC diagnostic pop
 }
 
 Glyph::~Glyph()
index dbd0c02..ca22694 100644 (file)
@@ -67,7 +67,7 @@ struct DALI_TOOLKIT_API Glyph
   ~Glyph();
 
   std::string url;       ///< The url of the glyph.
-  uint8_t     utf8[4];   ///< the glyph encoded in utf8
+  uint8_t     utf8[6];   ///< the glyph encoded in utf8
   float       ascender;  ///< The ascender. The distance from the base line to the top of the glyph.
   float       descender; ///< The descender. The distance from the base line to the bottom of the glyph.
 };
index 662121e..f1b51bb 100644 (file)
@@ -7,6 +7,11 @@ INPUT mediump vec4 vCornerRadius;
 #endif
 #endif
 
+#if defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE) || defined(IS_REQUIRED_BLUR)
+// Be used when we calculate anti-alias range near 1 pixel.
+uniform highp vec3 uScale;
+#endif
+
 uniform lowp vec4 uColor;
 uniform lowp vec3 mixColor;
 #ifdef IS_REQUIRED_BLUR
@@ -18,7 +23,6 @@ uniform lowp vec4 borderlineColor;
 uniform lowp vec4 uActorColor;
 #endif
 
-
 #if defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE) || defined(IS_REQUIRED_BLUR)
 // Global values both rounded corner and borderline use
 
@@ -71,8 +75,10 @@ void calculatePotential()
 
 void setupMinMaxPotential()
 {
-  // Set soft anti-alias range at most 2% of visual size
-  gPotentialRange = min(1.0, max(vRectSize.x, vRectSize.y) * 0.02);
+  // Set soft anti-alias range at most 10% of visual size.
+  // The range should be inverse proportion with scale of view.
+  // To avoid divid-by-zero, let we allow minimum scale value is 0.001 (0.1%)
+  gPotentialRange = min(1.0, max(vRectSize.x, vRectSize.y) * 0.2) / max(0.001, max(uScale.x, uScale.y));
 
   gMaxOutlinePotential = gRadius + gPotentialRange;
   gMinOutlinePotential = gRadius - gPotentialRange;
@@ -89,8 +95,8 @@ void setupMinMaxPotential()
 #endif
 
   // reduce defect near edge of rounded corner.
-  gMaxOutlinePotential += clamp(-min(gDiff.x, gDiff.y)/ max(1.0, gRadius) , 0.0, 1.0);
-  gMinOutlinePotential += clamp(-min(gDiff.x, gDiff.y)/ max(1.0, gRadius) , 0.0, 1.0);
+  gMaxOutlinePotential += clamp(-min(gDiff.x, gDiff.y) / max(1.0, gRadius), 0.0, 1.0);
+  gMinOutlinePotential += clamp(-min(gDiff.x, gDiff.y) / max(1.0, gRadius), 0.0, 1.0);
 }
 
 void PreprocessPotential()
index 5104f6b..c2b9c5d 100644 (file)
@@ -11,6 +11,11 @@ INPUT mediump vec4 vCornerRadius;
 // scale factor to fit start and end position of gradient.
 uniform mediump float uTextureCoordinateScaleFactor;
 
+#if defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE)
+// Be used when we calculate anti-alias range near 1 pixel.
+uniform highp vec3 uScale;
+#endif
+
 uniform sampler2D sTexture; // sampler1D?
 uniform lowp vec4 uColor;
 uniform lowp vec3 mixColor;
@@ -72,8 +77,10 @@ void calculatePotential()
 
 void setupMinMaxPotential()
 {
-  // Set soft anti-alias range at most 2% of visual size
-  gPotentialRange = min(1.0, max(vRectSize.x, vRectSize.y) * 0.02);
+  // Set soft anti-alias range at most 10% of visual size.
+  // The range should be inverse proportion with scale of view.
+  // To avoid divid-by-zero, let we allow minimum scale value is 0.001 (0.1%)
+  gPotentialRange = min(1.0, max(vRectSize.x, vRectSize.y) * 0.2) / max(0.001, max(uScale.x, uScale.y));
 
   gMaxOutlinePotential = gRadius + gPotentialRange;
   gMinOutlinePotential = gRadius - gPotentialRange;
@@ -87,8 +94,8 @@ void setupMinMaxPotential()
 #endif
 
   // reduce defect near edge of rounded corner.
-  gMaxOutlinePotential += clamp(-min(gDiff.x, gDiff.y)/ max(1.0, gRadius) , 0.0, 1.0);
-  gMinOutlinePotential += clamp(-min(gDiff.x, gDiff.y)/ max(1.0, gRadius) , 0.0, 1.0);
+  gMaxOutlinePotential += clamp(-min(gDiff.x, gDiff.y) / max(1.0, gRadius), 0.0, 1.0);
+  gMinOutlinePotential += clamp(-min(gDiff.x, gDiff.y) / max(1.0, gRadius), 0.0, 1.0);
 }
 
 void PreprocessPotential()
index c2c17e5..bad5500 100644 (file)
@@ -26,6 +26,11 @@ uniform mediump vec4 uAtlasRect;
 uniform lowp vec2 wrapMode;
 #endif
 
+#if defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE)
+// Be used when we calculate anti-alias range near 1 pixel.
+uniform highp vec3 uScale;
+#endif
+
 uniform lowp vec4 uColor;
 uniform lowp vec3 mixColor;
 uniform lowp float preMultipliedAlpha;
@@ -99,8 +104,10 @@ void calculatePotential()
 
 void setupMinMaxPotential()
 {
-  // Set soft anti-alias range at most 2% of visual size
-  gPotentialRange = min(1.0, max(vRectSize.x, vRectSize.y) * 0.02);
+  // Set soft anti-alias range at most 10% of visual size.
+  // The range should be inverse proportion with scale of view.
+  // To avoid divid-by-zero, let we allow minimum scale value is 0.001 (0.1%)
+  gPotentialRange = min(1.0, max(vRectSize.x, vRectSize.y) * 0.2) / max(0.001, max(uScale.x, uScale.y));
 
   gMaxOutlinePotential = gRadius + gPotentialRange;
   gMinOutlinePotential = gRadius - gPotentialRange;
@@ -114,8 +121,8 @@ void setupMinMaxPotential()
 #endif
 
   // reduce defect near edge of rounded corner.
-  gMaxOutlinePotential += clamp(-min(gDiff.x, gDiff.y)/ max(1.0, gRadius) , 0.0, 1.0);
-  gMinOutlinePotential += clamp(-min(gDiff.x, gDiff.y)/ max(1.0, gRadius) , 0.0, 1.0);
+  gMaxOutlinePotential += clamp(-min(gDiff.x, gDiff.y) / max(1.0, gRadius), 0.0, 1.0);
+  gMinOutlinePotential += clamp(-min(gDiff.x, gDiff.y) / max(1.0, gRadius), 0.0, 1.0);
 }
 
 void PreprocessPotential()
index d4d6ea6..03075f4 100644 (file)
@@ -306,13 +306,13 @@ private:
     : bufferId(bufferId),
       bufferHash(bufferHash),
       encodedImageBuffer(encodedImageBuffer),
-      referenceCount(1u)
+      referenceCount(1)
     {
     }
     TextureCacheManager::TextureId   bufferId;
     TextureCacheManager::TextureHash bufferHash;
     EncodedImageBuffer               encodedImageBuffer;
-    uint32_t                         referenceCount;
+    int32_t                          referenceCount;
   };
 
   typedef Dali::FreeList TextureIdConverterType; ///< The converter type from TextureId to index of TextureInfoContainer.
index a81d761..75a2478 100644 (file)
@@ -234,7 +234,7 @@ struct TextureInfo
     maskTextureId(maskTextureId),
     hash(hash),
     scaleFactor(scaleFactor),
-    referenceCount(1u),
+    referenceCount(1),
     loadState(LoadState::NOT_STARTED),
     fittingMode(fittingMode),
     samplingMode(samplingMode),
@@ -268,7 +268,7 @@ struct TextureInfo
   TextureId                  maskTextureId;        ///< The mask TextureId to be applied on load
   TextureHash                hash;                 ///< The hash used to cache this Texture
   float                      scaleFactor;          ///< The scale factor to apply to the Texture when masking
-  uint32_t                   referenceCount;       ///< The reference count of clients using this Texture
+  int32_t                    referenceCount;       ///< The reference count of clients using this Texture
   LoadState                  loadState;            ///< The load state showing the load progress of the Texture
   Dali::FittingMode::Type    fittingMode : 3;      ///< The requested FittingMode
   Dali::SamplingMode::Type   samplingMode : 3;     ///< The requested SamplingMode
@@ -297,14 +297,14 @@ struct ExternalTextureInfo
                       const bool        preMultiplied)
   : textureId(textureId),
     textureSet(textureSet),
-    referenceCount(1u),
+    referenceCount(1),
     preMultiplied(preMultiplied)
   {
   }
 
   TextureId  textureId;         ///< The TextureId associated with this ExternalTexture
   TextureSet textureSet;        ///< The external texture
-  uint32_t   referenceCount;    ///< The reference count of clients using this ExternalTexture
+  int32_t    referenceCount;    ///< The reference count of clients using this ExternalTexture
   bool       preMultiplied : 1; ///< True if the image's color was multiplied by it's alpha
 };
 
index e7a90a1..52e9764 100644 (file)
@@ -597,7 +597,11 @@ void Control::OnPropertySet(Property::Index index, const Property::Value& proper
     }
     case Actor::Property::VISIBLE:
     {
-      GetAccessibleObject()->EmitVisible(Self().GetProperty<bool>(Actor::Property::VISIBLE));
+      auto* accessible = GetAccessibleObject();
+      if(DALI_LIKELY(accessible))
+      {
+        accessible->EmitVisible(Self().GetProperty<bool>(Actor::Property::VISIBLE));
+      }
       break;
     }
     case DevelActor::Property::USER_INTERACTION_ENABLED:
index f8a452e..0457eca 100644 (file)
@@ -29,7 +29,7 @@ namespace Toolkit
 {
 const unsigned int TOOLKIT_MAJOR_VERSION = 2;
 const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 52;
+const unsigned int TOOLKIT_MICRO_VERSION = 53;
 const char* const  TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 591be97..fada506 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali2-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    2.2.52
+Version:    2.2.53
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT