--- /dev/null
+#ifndef DALI_SCENE3D_NAVIGATION_MESH_HEADER_H
+#define DALI_SCENE3D_NAVIGATION_MESH_HEADER_H
+/*
+ * 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 <inttypes.h>
+
+namespace Dali::Scene3D::Internal::Algorithm
+{
+/**
+ * @struct NavigationMeshHeader
+ *
+ * Base header structure contains only the version field. It will allow adding changes to the
+ * exporter while maintaining backward compatibility.
+ */
+struct NavigationMeshHeader
+{
+ uint32_t checksum; ///< Checksum (used to test for endianness, tested by reader )
+ uint32_t version; ///< Version of the API
+};
+
+/**
+ * @struct NavigationMeshHeader_V10
+ *
+ * Extension of header for version 1.0 of NavigationMesh binary file
+ */
+struct NavigationMeshHeader_V10 : public NavigationMeshHeader
+{
+ uint32_t dataOffset; ///< Offset where data starts (depends on endianness)
+
+ uint32_t vertexCount; ///< total count of vertices
+ uint32_t vertexDataOffset; ///< offset into data array where vertices start
+
+ uint32_t edgeCount; ///< total count of edges
+ uint32_t edgeDataOffset; ///< offset into data array where edges are stored
+
+ uint32_t polyCount; ///< total number of polys
+ uint32_t polyDataOffset; ///< offset into data array where edges are stored
+
+ float gravityVector[3]; /// Gravity vector for the data (down vector)
+};
+
+}
+#endif // DALI_SCENE3D_NAVIGATION_MESH_HEADER_H
std::vector<ColliderMeshData> meshData;
IterateThroughChildren(sceneView, meshData);
- auto renderTask = touchEvent.GetRenderTask();
+ auto renderTask = Stage::GetCurrent().GetRenderTaskList().GetTask(0);
auto cameraActor = renderTask.GetCameraActor();
const auto& result = touchEvent.GetScreenPosition(0);
set(scene3d_internal_dir "${scene3d_dir}/internal")
set(scene3d_src_files ${scene3d_src_files}
+ ${scene3d_internal_dir}/algorithm/navigation-mesh-impl.cpp
${scene3d_internal_dir}/common/environment-map-load-task.cpp
${scene3d_internal_dir}/common/model-cache-manager.cpp
${scene3d_internal_dir}/common/model-load-task.cpp
* @param[in] origin Origin of ray
* @param[in] direction Direction of ray
*
- * @SINCE_2_3.0
* @return Valid FaceIndex on hit or NULL_FACE on miss
*/
[[nodiscard]] FaceIndex RayFaceIntersect(const Vector3& origin, const Vector3& direction) const;
* 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_3.0
* @return The signal to connect to
*/
MeshHitSignalType& MeshHitSignal();
set(scene3d_public_api_dir "${scene3d_dir}/public-api")
set(scene3d_src_files ${scene3d_src_files}
+ ${scene3d_public_api_dir}/algorithm/navigation-mesh.cpp
${scene3d_public_api_dir}/controls/model/model.cpp
${scene3d_public_api_dir}/controls/scene-view/scene-view.cpp
${scene3d_public_api_dir}/light/light.cpp
${scene3d_public_api_dir}/loader/skinning-details.cpp
${scene3d_public_api_dir}/loader/string-callback.cpp
${scene3d_public_api_dir}/loader/utils.cpp
+ ${scene3d_public_api_dir}/loader/navigation-mesh-factory.cpp
${scene3d_public_api_dir}/loader/view-projection.cpp
${scene3d_public_api_dir}/model-components/material.cpp
${scene3d_public_api_dir}/model-components/model-node.cpp
${scene3d_public_api_dir}/model-motion/motion-index/motion-property-index.cpp
${scene3d_public_api_dir}/model-motion/motion-index/motion-transform-index.cpp
${scene3d_public_api_dir}/model-motion/motion-value.cpp
-)
\ No newline at end of file
+)
*
* List of faces contains indices into the vertex list
*
- * @SINCE_2_3.0
* @param[in] vertices List of Vector3 vertices
* @param[in] vertexNormals List of Vector3 vertices
* @param[in] faceIndices List of faces
*
* This function reduces number of array copys when called from NUI.
*
- * @SINCE_2_3.0
* @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
* The binary data returned by the function can be used
* as an input for NavigationMeshFactory::CreateFromBuffer()
*
- * @SINCE_2_3.0
* @param[in] navigationMesh Navigation mesh to serialize
* @return Buffer containing serialized mesh data
*/
*
* To remove collider mesh empty unique_ptr must be passed.
*
- * @SINCE_2_3.0
* @param[in] colliderMesh r-value to unique pointer of ColliderMesh
*/
void SetColliderMesh(std::unique_ptr<Algorithm::ColliderMesh>&& colliderMesh);
* collider mesh is associated. Calling GetColliderMesh() without
* previous check may produce undefined behaviour.
*
- * @SINCE_2_3.0
* @return Associated collider mesh
*/
const Algorithm::ColliderMesh& GetColliderMesh();
/**
* @brief Determines whether there is a valid collider mesh set
*
- * @SINCE_2_3.0
* @return True if collider mesh is set, False otherwise
*/
[[nodiscard]] bool HasColliderMesh() const;