Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
navmeshsources.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
18
//------------------------------------------------------------------------------
19
#if WITH_NEBULA_EDITOR
20
#include "
game/entity.h
"
21
#include "
math/bbox.h
"
22
#include "
math/mat4.h
"
23
#include "
util/array.h
"
24
#include "
util/guid.h
"
25
#include "
util/string.h
"
26
#include "
util/stringatom.h
"
27
#include "
navbuild/geometrysources.h
"
28
#include "
nflatbuffer/nebula_flat.h
"
29
#include "flat/navigation/navmesh.h"
30
#include <memory>
31
#include <vector>
32
33
namespace
Editor
34
{
35
class
Scene;
36
}
37
38
namespace
NavigationFeature
39
{
40
41
struct
NavMeshGatherOptions
42
{
44
bool
onlyStatic =
true
;
46
bool
models =
true
;
48
bool
colliders =
true
;
49
};
50
52
bool
GatherNavMeshSources(
53
Editor::Scene* scene,
54
Game::Entity entity,
55
const
NavMeshGatherOptions& options,
56
std::vector<std::unique_ptr<Navigation::GeometryEntryT>>& out,
57
Util::String& outReason);
58
60
Game::Entity FindEntityByGuid(Editor::Scene* scene,
const
Util::Guid& guid);
62
Util::String EntityName(Editor::Scene* scene, Game::Entity entity);
63
65
struct
NavAreaVolume
66
{
67
Game::Entity entity;
// authored entity
68
Util::StringAtom area;
69
int
priority = 0;
70
Math::mat4 transform;
// entity position, orientation and scale
71
Math::bbox localBox;
// the box in the space of the entity, centered with the half extents
72
Math::mat4 pointTransform;
// entity position and orientation, the points are not scaled
73
Util::Array<Math::vec3> points;
// points which replace the footprint of the box, relative to pointTransform
74
};
75
77
Util::Array<NavAreaVolume> GetNavAreaVolumes(Editor::Scene* scene);
79
Navigation::Build::AreaPrism NavAreaPrism(
const
NavAreaVolume& volume);
81
void
DrawAreaPrism(
const
Navigation::Build::AreaPrism& prism,
const
Math::vec4& color);
83
std::unique_ptr<Navigation::NavAreaModifierT> MakeAreaModifier(Editor::Scene* scene,
const
NavAreaVolume& volume);
84
85
}
// namespace NavigationFeature
86
#endif
// WITH_NEBULA_EDITOR
87
//------------------------------------------------------------------------------
entity.h
array.h
bbox.h
geometrysources.h
guid.h
mat4.h
NavigationFeature
Queries on a loaded navmesh.
Definition
agentmanager.cc:30
nebula_flat.h
string.h
stringatom.h
code
addons
navigationfeature
editor
navmeshsources.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.