OpenMoHAA
0.82.0
Loading...
Searching...
No Matches
navigation_recast_load_ext.h
1
/*
2
===========================================================================
3
Copyright (C) 2025 the OpenMoHAA team
4
5
This file is part of OpenMoHAA source code.
6
7
OpenMoHAA source code is free software; you can redistribute it
8
and/or modify it under the terms of the GNU General Public License as
9
published by the Free Software Foundation; either version 2 of the License,
10
or (at your option) any later version.
11
12
OpenMoHAA source code is distributed in the hope that it will be
13
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with OpenMoHAA source code; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
===========================================================================
21
*/
22
27
28
#pragma once
29
30
#include "../qcommon/class.h"
31
#include "../qcommon/vector.h"
32
#include "../qcommon/container.h"
33
34
struct
rcPolyMesh;
35
40
struct
offMeshNavigationPoint {
41
Vector
start;
42
Vector
end;
43
float
radius;
44
unsigned
short
flags;
45
unsigned
char
area;
46
bool
bidirectional;
47
int
id;
48
49
offMeshNavigationPoint()
50
: radius(0)
51
, flags(0)
52
, area(0)
53
, bidirectional(
true
)
54
, id(0)
55
{}
56
57
bool
operator==(
const
offMeshNavigationPoint& other)
const
{
return
start == other.start && end == other.end; }
58
59
bool
operator!=(
const
offMeshNavigationPoint& other)
const
{
return
!(*
this
== other); }
60
};
61
62
class
INavigationMapExtension
:
public
Class
63
{
64
private
:
65
CLASS_PROTOTYPE(
INavigationMapExtension
);
66
67
public
:
68
virtual
void
Handle(
Container<offMeshNavigationPoint>
& points,
const
rcPolyMesh *polyMesh) {};
69
};
70
71
class
NavigationMapExtension_Ladders
:
public
INavigationMapExtension
72
{
73
private
:
74
CLASS_PROTOTYPE(
NavigationMapExtension_Ladders
);
75
76
public
:
77
void
Handle(
Container<offMeshNavigationPoint>
& points,
const
rcPolyMesh *polyMesh)
override
;
78
};
79
80
class
NavigationMapExtension_JumpFall
:
public
INavigationMapExtension
81
{
82
private
:
83
CLASS_PROTOTYPE(
NavigationMapExtension_JumpFall
);
84
85
public
:
86
void
Handle(
Container<offMeshNavigationPoint>
& points,
const
rcPolyMesh *polyMesh)
override
;
87
88
private
:
89
void
FixupPoint(vec3_t pos);
90
offMeshNavigationPoint
CanConnectFallPoint(
const
rcPolyMesh *polyMesh,
const
Vector
& pos1,
const
Vector
& pos2);
91
offMeshNavigationPoint
CanConnectJumpPoint(
const
rcPolyMesh *polyMesh,
const
Vector
& pos1,
const
Vector
& pos2);
92
offMeshNavigationPoint
CanConnectStraightPoint(
const
rcPolyMesh *polyMesh,
const
Vector
& pos1,
const
Vector
& pos2);
93
};
Container
Definition
container.h:85
INavigationMapExtension
Definition
navigation_recast_load_ext.h:63
NavigationMapExtension_JumpFall
Definition
navigation_recast_load_ext.h:81
NavigationMapExtension_Ladders
Definition
navigation_recast_load_ext.h:72
Vector
Definition
vector.h:61
offMeshNavigationPoint
An offmesh point that the navigation system will use to find path.
Definition
navigation_recast_load_ext.h:40
code
fgame
navigation_recast_load_ext.h
Generated by
1.13.2