2 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include <dali-scene3d/public-api/algorithm/navigation-mesh.h>
21 #include <dali-scene3d/internal/algorithm/navigation-mesh-impl.h>
25 namespace Dali::Scene3D::Algorithm
28 NavigationMesh::NavigationMesh( NavigationMeshImpl* impl )
33 NavigationMesh::~NavigationMesh() = default;
35 [[nodiscard]] uint32_t NavigationMesh::GetFaceCount() const
37 return mImpl->GetFaceCount();
40 [[nodiscard]] uint32_t NavigationMesh::GetEdgeCount() const
42 return mImpl->GetEdgeCount();
45 [[nodiscard]] uint32_t NavigationMesh::GetVertexCount() const
47 return mImpl->GetVertexCount();
50 bool NavigationMesh::FindFloor(const Dali::Vector3& position, Dali::Vector3& outPosition, uint32_t& polyIndex)
52 return mImpl->FindFloor(position, outPosition, polyIndex);
55 bool NavigationMesh::FindFloorForFace(const Dali::Vector3& position, uint32_t faceIndex, bool dontCheckNeighbours, Dali::Vector3& outPosition)
57 return mImpl->FindFloorForFace(position, faceIndex, dontCheckNeighbours, outPosition);
60 [[nodiscard]] const NavigationMesh::Face* NavigationMesh::GetFace(int index) const
62 return mImpl->GetFace(index);
65 [[nodiscard]] const NavigationMesh::Edge* NavigationMesh::GetEdge(int index) const
67 return mImpl->GetEdge(index);
70 [[nodiscard]] const NavigationMesh::Vertex* NavigationMesh::GetVertex(int index) const
72 return mImpl->GetVertex(index);
75 void NavigationMesh::SetSceneTransform(const Dali::Matrix& transform)
77 mImpl->SetTransform(transform);
80 Dali::Vector3 NavigationMesh::PointSceneToLocal(const Dali::Vector3& point)
82 return mImpl->PointSceneToLocal(point);
85 Dali::Vector3 NavigationMesh::PointLocalToScene(const Dali::Vector3& point)
87 return mImpl->PointLocalToScene(point);
90 Dali::Vector3 NavigationMesh::GetGravityVector() const
92 return mImpl->GetGravityVector();