forked from themrdemonized/xray-monolith
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatrol_path.h
More file actions
54 lines (45 loc) · 1.45 KB
/
patrol_path.h
File metadata and controls
54 lines (45 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
////////////////////////////////////////////////////////////////////////////
// Module : patrol_path.h
// Created : 15.06.2004
// Modified : 15.06.2004
// Author : Dmitriy Iassenev
// Description : Patrol path
////////////////////////////////////////////////////////////////////////////
#pragma once
#include "stdafx.h"
#include "graph_abstract.h"
#include "patrol_point.h"
class CPatrolPath : public CGraphAbstractSerialize<CPatrolPoint, float, u32>
{
private:
struct CAlwaysTrueEvaluator
{
IC bool operator()(const Fvector& position) const
{
return (true);
}
};
protected:
typedef CGraphAbstractSerialize<CPatrolPoint, float, u32> inherited;
public:
#ifdef DEBUG
shared_str m_name;
#endif
public:
CPatrolPath(shared_str name = "");
virtual ~CPatrolPath();
CPatrolPath& load_raw(const CLevelGraph* level_graph, const CGameLevelCrossTable* cross, const CGameGraph* game_graph, IReader& stream);
CPatrolPath& load_from_config(CInifile* ini_paths, LPCSTR patrol_name);
IC const CVertex* point(shared_str name) const;
template <typename T>
IC const CVertex* point(const Fvector& position, const T& evaluator) const;
IC const CVertex* point(const Fvector& position) const;
private:
std::pair<u32, float> CPatrolPath::parse_point_link(std::string link, std::map<shared_str, u32> vertex_ids_by_name);
#ifdef DEBUG
public:
virtual void load (IReader &stream);
IC void name (const shared_str &name);
#endif
};
#include "patrol_path_inline.h"