Fix svace issue (uint32_t to long or std::streamsize)
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / public-api / algorithm / navigation-mesh.cpp
1 /*
2  * Copyright (c) 2023 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 // CLASS HEADER
18 #include <dali-scene3d/public-api/algorithm/navigation-mesh.h>
19
20 // INTERNAL HEADERS
21 #include <dali-scene3d/internal/algorithm/navigation-mesh-impl.h>
22
23 using Dali::Vector3;
24
25 namespace Dali::Scene3D::Algorithm
26 {
27
28 NavigationMesh::NavigationMesh( NavigationMeshImpl* impl )
29 {
30   mImpl.reset( impl );
31 }
32
33 NavigationMesh::~NavigationMesh() = default;
34
35 [[nodiscard]] uint32_t NavigationMesh::GetFaceCount() const
36 {
37   return mImpl->GetFaceCount();
38 }
39
40 [[nodiscard]] uint32_t NavigationMesh::GetEdgeCount() const
41 {
42   return mImpl->GetEdgeCount();
43 }
44
45 [[nodiscard]] uint32_t NavigationMesh::GetVertexCount() const
46 {
47   return mImpl->GetVertexCount();
48 }
49
50 bool NavigationMesh::FindFloor(const Dali::Vector3& position, Dali::Vector3& outPosition, uint32_t& polyIndex)
51 {
52   return mImpl->FindFloor(position, outPosition, polyIndex);
53 }
54
55 bool NavigationMesh::FindFloorForFace(const Dali::Vector3& position, uint32_t faceIndex, bool dontCheckNeighbours, Dali::Vector3& outPosition)
56 {
57   return mImpl->FindFloorForFace(position, faceIndex, dontCheckNeighbours, outPosition);
58 }
59
60 [[nodiscard]] const NavigationMesh::Face* NavigationMesh::GetFace(int index) const
61 {
62   return mImpl->GetFace(index);
63 }
64
65 [[nodiscard]] const NavigationMesh::Edge* NavigationMesh::GetEdge(int index) const
66 {
67   return mImpl->GetEdge(index);
68 }
69
70 [[nodiscard]] const NavigationMesh::Vertex* NavigationMesh::GetVertex(int index) const
71 {
72   return mImpl->GetVertex(index);
73 }
74
75 void NavigationMesh::SetSceneTransform(const Dali::Matrix& transform)
76 {
77   mImpl->SetTransform(transform);
78 }
79
80 Dali::Vector3 NavigationMesh::PointSceneToLocal(const Dali::Vector3& point)
81 {
82   return mImpl->PointSceneToLocal(point);
83 }
84
85 Dali::Vector3 NavigationMesh::PointLocalToScene(const Dali::Vector3& point)
86 {
87   return mImpl->PointLocalToScene(point);
88 }
89
90 Dali::Vector3 NavigationMesh::GetGravityVector() const
91 {
92   return mImpl->GetGravityVector();
93 }
94
95 }