7 #ifndef Navigation_GateDefinition_H
8 #define Navigation_GateDefinition_H
27 GateDefinition(
GateType type,
const Vec3f& pathPos,
const Vec2f& gateLeftDir);
28 GateDefinition(
GateType type,
const Vec3f& pathPos,
const Vec3f& turnInnerPos,
const Vec2f& gateLeftDir);
30 GateType GetGateType()
const {
return m_gateType; }
31 const Vec3f& GetPathPos()
const {
return m_pathPos; }
32 const Vec3f& GetTurnInnerPos()
const {
return m_turnInnerPos; }
33 const Vec2f& GetGateLeftDir()
const {
return m_gateLeftDir; }
42 template <
class OSTREAM>
43 inline OSTREAM& operator<<(OSTREAM& os,
const GateDefinition& g)
45 os <<
"[p=" << g.GetPathPos() <<
", t=" << g.GetTurnInnerPos() <<
", lDir=" << g.GetGateLeftDir();
46 switch (g.GetGateType())
49 case StartGate : os <<
", type=StartGate ]";
break;
50 case EndGate : os <<
", type=EndGate ]";
break;
54 case LeftTurnEnd : os <<
", type=LeftTurnEnd ]";
break;
58 case RightTurnEnd : os <<
", type=RightTurnEnd ]";
break;
62 default: os <<
", !!! wrong gate type (" << g.GetGateType() <<
") !!!]";
break;
68 class GateDefinitionPersistentDisplayListIds
71 GateDefinitionPersistentDisplayListIds()
80 ~GateDefinitionPersistentDisplayListIds() {}
82 void Initialize(World* world);
91 KyUInt32 m_displayListId_TurnInnerPos;
95 class GateDefinitionDisplayConfig
98 GateDefinitionDisplayConfig() { SetDefaults(); }
102 VisualShapeColor m_pathPosColor;
103 VisualShapeColor m_turnInnerPosColor;
104 VisualShapeColor m_leftDirColor;
105 VisualColor m_pathEdgeColor;
106 VisualColor m_pathToTurnInnerPosColor_Left;
107 VisualColor m_pathToTurnInnerPosColor_Right;
109 VisualColor m_gateTypeColor[GATE_TYPE_COUNT];
115 GateDefinitionPersistentDisplayListIds m_persistentDisplayListIds;
119 class GateDefinitionArray :
public RefCountBase<GateDefinitionArray, MemStat_Channel>
122 GateDefinitionArray()
123 : m_advancedVisualDebuggingEnabled(false)
126 void Clear() { m_gateDefinitions.Clear(); }
128 void PushBack(
const GateDefinition& gateDefinition);
130 bool IsEmpty()
const {
return m_gateDefinitions.IsEmpty(); }
131 KyUInt32 GetGateDefinitionCount()
const {
return m_gateDefinitions.GetCount(); }
132 const GateDefinition& GetGateDefinition(
KyUInt32 idx)
const {
return m_gateDefinitions[idx]; }
134 void SendVisualDebug(World* world,
const GateDefinitionDisplayConfig& displayConfig,
const char* listBaseName =
"",
const char* groupName =
"GateDefinitionArray",
KyUInt32 visualDebugId =
KyUInt32MAXVAL)
const;
137 KyArray<GateDefinition> m_gateDefinitions;
140 bool m_advancedVisualDebuggingEnabled;
145 #endif // Navigation_GateDefinition_H
Indicates the Gate is the start of a sampled turn to the left (CCW). The next Gate must have either L...
Definition: channel.h:31
Indicates the Gate is a right turn end.
Definition: channel.h:38
GateType
Enumerates the different kind of Gates.
Definition: channel.h:23
Indicates the Gate is a left turn end.
Definition: channel.h:33
Indicates the Gate is a sampled left turn intermediary Gate.
Definition: channel.h:32
Indicates the Gate is the start of a sampled turn to the right (CW). The next Gate must have either R...
Definition: channel.h:36
Indicates the Gate is not defined.
Definition: channel.h:25
#define KY_NULL
Null value.
Definition: types.h:247
Indicates the Gate is a small turn to the left (CCW).
Definition: channel.h:30
Indicates the Gate is a Channel start Gate.
Definition: channel.h:27
Indicates the Gate is a Channel width adjustment Gate. There is no direction modification there...
Definition: channel.h:40
Definition: gamekitcrowddispersion.h:20
Indicates the Gate is a small turn to the right (clockwise).
Definition: channel.h:35
Indicates the Gate is a Channel end Gate.
Definition: channel.h:28
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
Indicates the Gate is a Channel altitude clamping adjustment Gate. There is no direction modification...
Definition: channel.h:41
Indicates the Gate is a sampled right turn intermediary Gate.
Definition: channel.h:37
#define KyUInt32MAXVAL
The maximum value that can be stored in the KyUInt32 variable type.
Definition: types.h:226
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43