KOSMIndoorMap

navmesh.h
1/*
2 SPDX-FileCopyrightText: 2024 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KOSMINDOORROUTING_NAVMESH_H
7#define KOSMINDOORROUTING_NAVMESH_H
8
9#include "kosmindoorrouting_export.h"
10
11#include <memory>
12
13class QString;
14
15namespace KOSMIndoorRouting {
16
17class NavMeshTransform;
18class NavMeshPrivate;
19
20/** Compiled nav mesh for routing */
21class KOSMINDOORROUTING_EXPORT NavMesh
22{
23public:
24 explicit NavMesh();
25 NavMesh(NavMesh &&) noexcept;
26 NavMesh(const NavMesh&);
27 ~NavMesh();
28 NavMesh& operator=(NavMesh&&) noexcept;
29 NavMesh& operator=(const NavMesh&);
30
31 /** Returns @c true if the nav mesh is neither null (ie. not built)
32 * and hasn't been invalidated by realtime data changes.
33 * The latter implies that this can change on existing instances.
34 */
35 [[nodiscard]] bool isValid() const;
36
37 void clear();
38
39 [[nodiscard]] NavMeshTransform transform() const;
40
41 /** Write nav mesh data to the given file.
42 * Uses the file format used by the Recast demo, so this is primarily
43 * for debugging.
44 */
45 void writeToFile(const QString &fileName) const;
46
47private:
48 friend class NavMeshPrivate;
49 std::shared_ptr<NavMeshPrivate> d;
50};
51}
52
53#endif
Compiled nav mesh for routing.
Definition navmesh.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.