Emergency 20 Dokumentation  4.2.0
GroundMaps.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include <boost/noncopyable.hpp>
14 
15 
16 //[-------------------------------------------------------]
17 //[ Namespace ]
18 //[-------------------------------------------------------]
19 namespace em5
20 {
21 
22 
23  //[-------------------------------------------------------]
24  //[ Classes ]
25  //[-------------------------------------------------------]
30  class GroundMaps : public boost::noncopyable
31  {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Public definitions ]
36  //[-------------------------------------------------------]
37  public:
38  // Ground map IDs
39  // -> All IDs are basic bitmasks (just single bits) that can be combined to define filters for ground map queries
41  {
42  GROUNDMAP_TERRAIN = 0x00000001,
43  GROUNDMAP_LIQUIDS = 0x00000100,
45  GROUNDMAP_WALKABLES = 0x00010000,
47  };
48 
49  // Filter masks
50  // -> Predefined bitmasks for ground map query filtering
52  {
53  // Basic filter bitmasks
54  FILTER_MASK_ALL = 0xffffffff,
55 
56  // Filter bitmasks for the most common use-cases
57  FILTER_DEFAULT = 0xffffffff,
58  FILTER_TERRAIN_ONLY = 0x000000ff,
59  FILTER_LIQUIDS_ONLY = 0x0000ff00,
60  FILTER_NO_LIQUIDS = 0xffff00ff,
61  FILTER_TERRAIN_LIQUIDS = 0x0000ffff,
63  };
64 
65 
66  //[-------------------------------------------------------]
67  //[ Public static methods ]
68  //[-------------------------------------------------------]
69  public:
70  static void setupGroundMaps();
71  static bool areGroundMapsValid();
72  static void updateAllGroundMaps();
73 
74 
75  //[-------------------------------------------------------]
76  //[ Private static methods ]
77  //[-------------------------------------------------------]
78  private:
79  static void updateFreeGroundAreaNavigationMap();
80 
81 
82  };
83 
84 
85 //[-------------------------------------------------------]
86 //[ Namespace ]
87 //[-------------------------------------------------------]
88 } // em5
Definition: ActionPriority.h:13
static void updateAllGroundMaps()
Terrain + all walkable levels + liquids (e.g. water surfaces) surface.
Definition: GroundMaps.h:57
Event-specific walkables created at runtime.
Definition: GroundMaps.h:46
GroundMapId
Definition: GroundMaps.h:40
EMERGENCY 5 ground map definitions.
Definition: GroundMaps.h:30
Terrain + walkables level 0.
Definition: GroundMaps.h:42
Terrain + walkables level 0 + liquids (e.g. water surfaces)
Definition: GroundMaps.h:61
Definition: GroundMaps.h:54
static void setupGroundMaps()
FilterMasks
Definition: GroundMaps.h:51
static bool areGroundMapsValid()
Terrain + walkables level 0 + liquids (e.g. water surfaces)
Definition: GroundMaps.h:62
Terrain + walkables level 0.
Definition: GroundMaps.h:58
Liquids (e.g. water surfaces)
Definition: GroundMaps.h:59
Walkables of levels 1..3.
Definition: GroundMaps.h:45
Liquids (e.g. water surfaces) created at runtime.
Definition: GroundMaps.h:44
Terrain + all walkable levels.
Definition: GroundMaps.h:60
Liquids (e.g. water surfaces)
Definition: GroundMaps.h:43