[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / internal / algorithm / path-finder-waypoint-data.h
1 #ifndef DALI_SCENE3D_INTERNAL_PATH_FINDER_WAYPOINT_DATA_H
2 #define DALI_SCENE3D_INTERNAL_PATH_FINDER_WAYPOINT_DATA_H
3
4 /*
5  * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 // INTERNAL INCLUDES
21 #include <dali-scene3d/internal/algorithm/navigation-mesh-impl.h>
22 #include <dali-scene3d/public-api/algorithm/path-finder-waypoint.h>
23
24 // EXTERNAL INCLUDES
25 #include <cinttypes>
26
27 namespace Dali::Scene3D::Internal::Algorithm
28 {
29 class NavigationMesh;
30
31 /**
32  * Structure containing data describing single waypoint
33  *
34  * The structure stores:
35  * - node of NavigationMesh within which the waypoint is placed
36  * - a point within NavigationMesh face space (2D)
37  * - a point within NavigationMesh parent transform space (3D)
38  * Additionally, it stores data used by algorithm:
39  * - face - pointer to the face of NavigationMesh
40  * - edge - Edge between this waypoint and next on the path
41  */
42 struct WayPointData
43 {
44   uint32_t                    nodeIndex; ///< Index of the node/face
45   const NavigationMesh::Face* face;      ///< Polygon containing waypoint
46   Dali::Vector2               point2d;   ///< waypoint point in the polygon space, origin is a polygon centre
47   Dali::Vector3               point3d;   ///< point in the 3D space in the navmesh parent space
48
49   // internal data needed for processing
50   const NavigationMesh::Edge* edge; ///< Edge between this face and next face
51 };
52 } // namespace Dali::Scene3D::Internal::Algorithm
53
54 #endif // DALI_SCENE3D_INTERNAL_PATH_FINDER_WAYPOINT_DATA_H