NoJobEngine
2.0.7
Toggle main menu visibility
Loading...
Searching...
No Matches
NavMeshPathfinder.h
Go to the documentation of this file.
1
6
#pragma once
7
8
#include "
Engine/AI/Navigation/NavMesh.h
"
9
10
#include <vector>
11
12
#include <glm/glm.hpp>
13
14
namespace
NoJob
15
{
16
struct
NavPath
17
{
18
std::vector<NavPolygonID>
Polygons
;
19
20
bool
IsValid
()
const
21
{
22
return
!
Polygons
.empty();
23
}
24
25
void
Clear
()
26
{
27
Polygons
.clear();
28
}
29
};
30
31
class
NavMeshPathfinder
32
{
33
public
:
34
static
NavPath
FindPath
(
35
const
NavMesh
& navMesh,
36
NavPolygonID
startPolygon,
37
NavPolygonID
goalPolygon);
38
39
private
:
40
static
float
Heuristic(
41
const
NavMesh
& navMesh,
42
NavPolygonID
from,
43
NavPolygonID
to);
44
45
static
float
CalculateTransitionCost(
46
const
NavMesh
& navMesh,
47
NavPolygonID
from,
48
NavPolygonID
to,
49
const
NavEdge
& edge);
50
51
static
NavPath
ReconstructPath(
52
NavPolygonID
startPolygon,
53
NavPolygonID
goalPolygon,
54
const
std::vector<NavPolygonID>& cameFrom);
55
};
56
}
NavMesh.h
NavMesh declarations for the Navigation subsystem.
NoJob::NavMesh
Definition
NavMesh.h:53
NoJob::NavMeshPathfinder
Definition
NavMeshPathfinder.h:32
NoJob::NavMeshPathfinder::FindPath
static NavPath FindPath(const NavMesh &navMesh, NavPolygonID startPolygon, NavPolygonID goalPolygon)
Definition
NavMeshPathfinder.cpp:35
NoJob
Definition
BTActionNode.h:13
NoJob::NavPolygonID
uint32_t NavPolygonID
Definition
NavMesh.h:18
NoJob::NavEdge
Definition
NavMesh.h:32
NoJob::NavPath
Definition
NavMeshPathfinder.h:17
NoJob::NavPath::IsValid
bool IsValid() const
Definition
NavMeshPathfinder.h:20
NoJob::NavPath::Clear
void Clear()
Definition
NavMeshPathfinder.h:25
NoJob::NavPath::Polygons
std::vector< NavPolygonID > Polygons
Definition
NavMeshPathfinder.h:18
Engine
AI
Navigation
NavMeshPathfinder.h
Generated by
1.18.0