Tramway SDK
navmesh.h
Go to the documentation of this file.
1// TRAMWAY DRIFT AND DUNGEON EXPLORATION SIMULATOR 2022
2// All rights reserved.
3
4#ifndef TRAM_SDK_FRAMEWORK_NAVMESH_H
5#define TRAM_SDK_FRAMEWORK_NAVMESH_H
6
7#include <framework/core.h>
8#include <framework/uid.h>
9#include <framework/math.h>
10
11#include <vector>
12
13namespace tram {
14
15typedef uint32_t node_id_t;
16
20};
21
22class Navmesh {
23public:
25 ~Navmesh() = delete;
26
27 inline name_t GetName() { return name; }
28 inline const std::vector<node_id_t>& GetNodes() { return nodes; }
29
30 void LoadFromDisk();
31
32 static NavmeshNode GetNavmeshNode (node_id_t node_id);
33 static Navmesh* Find (name_t name);
34protected:
36 std::vector<node_id_t> nodes;
37};
38
39}
40
41#endif // TRAM_SDK_FRAMEWORK_NAVMESH_H
Definition: navmesh.h:22
Navmesh(name_t name)
Definition: navmesh.h:24
std::vector< node_id_t > nodes
Definition: navmesh.h:36
~Navmesh()=delete
const std::vector< node_id_t > & GetNodes()
Definition: navmesh.h:28
void LoadFromDisk()
Definition: navmesh.cpp:52
static NavmeshNode GetNavmeshNode(node_id_t node_id)
Definition: navmesh.cpp:38
name_t GetName()
Definition: navmesh.h:27
name_t name
Definition: navmesh.h:35
static Navmesh * Find(name_t name)
Definition: navmesh.cpp:42
Definition: api.h:9
glm::vec3 vec3
Definition: math.h:12
uint32_t node_id_t
Definition: navmesh.h:15
Definition: navmesh.h:17
node_id_t right
Definition: navmesh.h:18
node_id_t prev
Definition: navmesh.h:18
vec3 position
Definition: navmesh.h:19
node_id_t next
Definition: navmesh.h:18
node_id_t left
Definition: navmesh.h:18
Definition: uid.h:11