gwnavruntime/channel/funnel.h Source File
Go to the documentation of this file.
7 #ifndef Navigation_Funnel_H
8 #define Navigation_Funnel_H
28 FunnelClosedOverRight,
31 KY_INLINE
static bool IsClosureCase(FunnelResult result) {
return ((result == FunnelClosedOverRight) || (result == FunnelClosedOverLeft)); }
50 , m_apexSide(UndefinedFunnelSide)
51 , m_funnelDirection(ForwardFunnel)
52 , m_previousResult(FunnelUnchanged)
53 , m_isLeftBorderInitialized(
false)
54 , m_isRightBorderInitialized(
false)
57 void Initialize(
KyUInt32 apexIdx, FunnelSide apexSide, FunnelDirection funnelDirection = ForwardFunnel);
58 FunnelResult Update(
const Vec2f& vecToCorner,
KyUInt32 idx, FunnelSide side);
60 FunnelDirection GetFunnelDirection()
const {
return m_funnelDirection; }
61 KyUInt32 GetApexIdx()
const {
return m_apexIdx; }
62 FunnelSide GetApexSide()
const {
return m_apexSide; }
63 KyUInt32 GetLeftCornerIdx()
const {
return m_leftCornerIdx; }
64 KyUInt32 GetRightCornerIdx()
const {
return m_rightCornerIdx; }
65 FunnelResult GetPreviousResult()
const {
return m_previousResult; }
68 void TightenLeftBorder(
const Vec2f& vecToCorner,
KyUInt32 cornerIdx);
69 void TightenRightBorder(
const Vec2f& vecToCorner,
KyUInt32 cornerIdx);
71 bool IsOutsideOnLeft(
const Vec2f& axis2d)
const;
72 bool IsOutsideOnRight(
const Vec2f& axis2d)
const;
74 void ResolveActualClosureCase(FunnelResult naturalClosure);
85 FunnelSide m_apexSide;
86 FunnelDirection m_funnelDirection;
88 FunnelResult m_previousResult;
90 bool m_isLeftBorderInitialized;
91 bool m_isRightBorderInitialized;
97 #endif // Navigation_Funnel_H
This class defines a two-dimensional vector whose coordinates are stored using floating-point numbers...
Definition: vec2f.h:24
Basic straight line funnel acting directly on 2D positions.
Definition: funnel.h:43
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36