NoJobEngine
2.0.7
Toggle main menu visibility
Loading...
Searching...
No Matches
NavMeshFunnel.h
Go to the documentation of this file.
1
6
#pragma once
7
8
#include "
Engine/AI/Navigation/NavMesh.h
"
9
#include "
Engine/AI/Navigation/NavMeshPathfinder.h
"
10
11
#include <vector>
12
13
#include <glm/glm.hpp>
14
15
namespace
NoJob
16
{
17
struct
NavPointPath
18
{
19
std::vector<glm::vec3>
Points
;
20
21
bool
IsValid
()
const
22
{
23
return
!
Points
.empty();
24
}
25
26
void
Clear
()
27
{
28
Points
.clear();
29
}
30
};
31
32
class
NavMeshFunnel
33
{
34
public
:
35
static
NavPointPath
BuildPath
(
36
const
NavMesh
& navMesh,
37
const
NavPath
& corridor,
38
const
glm::vec3& startPosition,
39
const
glm::vec3& goalPosition);
40
41
private
:
42
struct
Portal
43
{
44
glm::vec3 Left{ 0.0f };
45
glm::vec3 Right{ 0.0f };
46
};
47
48
static
bool
BuildPortals(
49
const
NavMesh
& navMesh,
50
const
NavPath
& corridor,
51
const
glm::vec3& startPosition,
52
const
glm::vec3& goalPosition,
53
std::vector<Portal>& portals);
54
55
static
bool
FindSharedPortal(
56
const
NavMesh
& navMesh,
57
NavPolygonID
fromPolygon,
58
NavPolygonID
toPolygon,
59
Portal& portal);
60
61
static
float
SignedAreaXZ(
62
const
glm::vec3& a,
63
const
glm::vec3& b,
64
const
glm::vec3& c);
65
66
static
bool
NearlyEqual(
67
const
glm::vec3& a,
68
const
glm::vec3& b);
69
};
70
}
NavMesh.h
NavMesh declarations for the Navigation subsystem.
NavMeshPathfinder.h
NavMeshPathfinder declarations for the Navigation subsystem.
NoJob::NavMeshFunnel
Definition
NavMeshFunnel.h:33
NoJob::NavMeshFunnel::BuildPath
static NavPointPath BuildPath(const NavMesh &navMesh, const NavPath &corridor, const glm::vec3 &startPosition, const glm::vec3 &goalPosition)
Definition
NavMeshFunnel.cpp:15
NoJob::NavMesh
Definition
NavMesh.h:53
NoJob
Definition
BTActionNode.h:13
NoJob::NavPolygonID
uint32_t NavPolygonID
Definition
NavMesh.h:18
NoJob::NavPath
Definition
NavMeshPathfinder.h:17
NoJob::NavPointPath
Definition
NavMeshFunnel.h:18
NoJob::NavPointPath::Clear
void Clear()
Definition
NavMeshFunnel.h:26
NoJob::NavPointPath::IsValid
bool IsValid() const
Definition
NavMeshFunnel.h:21
NoJob::NavPointPath::Points
std::vector< glm::vec3 > Points
Definition
NavMeshFunnel.h:19
Engine
AI
Navigation
NavMeshFunnel.h
Generated by
1.18.0