gwnavruntime/pathfollower/circlearcsplineturn.h Source File
Go to the documentation of this file.
8 #ifndef Navigation_CircleArcSplineBubbleData_H
9 #define Navigation_CircleArcSplineBubbleData_H
23 class CircleArcSplineComputer;
24 class CircleArcSplineTurn;
30 class CircleArcSplineBubbleData
33 CircleArcSplineBubbleData() { Reset(); }
35 BubbleType GetBubbleType()
const {
return m_bubbleType; }
37 #ifdef CircleArcSplineBubbleData_MaintainGateAndRadiusRange
38 KyUInt32 GetFirstGateIndex()
const {
return m_firstGateIndex; }
39 KyUInt32 GetLastGateIndex()
const {
return m_lastGateIndex; }
40 KyFloat32 GetMinRadius()
const {
return m_minRadius; }
41 KyFloat32 GetMaxRadius()
const {
return m_maxRadius; }
42 #endif // CircleArcSplineBubbleData_MaintainGateAndRadiusRange
44 const Vec3f& GetMidPoint()
const {
return m_midPoint; }
45 const Vec2f& GetMedianTurnAxis()
const {
return m_medianTurnAxis; }
46 const Vec3f& GetEntryPos()
const {
return m_entryPos; }
47 const Vec3f& GetExitPos()
const {
return m_exitPos; }
48 KyUInt32 GetEntrySectionIdx()
const {
return m_entrySectionIdx; }
49 KyUInt32 GetExitSectionIdx()
const {
return m_exitSectionIdx; }
50 const Vec2f& GetEntryDir()
const {
return m_entryDir; }
51 const Vec2f& GetExitDir()
const {
return m_exitDir; }
52 KyUInt32 GetRadiusIndexInProfile()
const {
return m_radiusIndexInProfile; }
53 bool HasRangeBeenDefined()
const {
return m_hasRangeBeenDefined; }
57 m_bubbleType = UndefinedBubbleType;
60 #ifdef CircleArcSplineBubbleData_MaintainGateAndRadiusRange
65 #endif // CircleArcSplineBubbleData_MaintainGateAndRadiusRange
67 m_hasRangeBeenDefined =
false;
73 friend class CircleArcSplineTurn;
77 #ifdef CircleArcSplineBubbleData_MaintainGateAndRadiusRange
86 #endif // CircleArcSplineBubbleData_MaintainGateAndRadiusRange
88 bool m_hasRangeBeenDefined;
89 Vec2f m_medianTurnAxis;
105 class CircleArcSplineTurn
108 CircleArcSplineTurn() : m_channel(
KY_NULL) {}
109 CircleArcSplineTurn(
const Channel* channel) : m_channel(channel) {}
110 CircleArcSplineTurn(
const CircleArcSplineTurn& other) { *
this = other; }
112 void operator=(
const CircleArcSplineTurn& other)
114 m_channel = other.m_channel;
115 m_bubble = other.m_bubble;
116 m_bubbleData = other.m_bubbleData;
121 const Bubble& GetBubble()
const {
return m_bubble; }
122 const CircleArcSplineBubbleData& GetBubbleData()
const {
return m_bubbleData; }
124 void SetBubble(
const Bubble& bubble,
BubbleType bubbleType);
126 void SetRadiusIndexInProfile(
KyUInt32 radiusIndexInProfile) { m_bubbleData.m_radiusIndexInProfile = radiusIndexInProfile; }
127 void UpdateDataAsSinglePoint(
const Vec3f& position,
KyUInt32 sectionIdx);
128 void UpdateDataAsSinglePoint(
const Vec3f& position,
KyUInt32 sectionIdx,
const Vec2f& entryDir,
const Vec2f& exitDir);
129 void UpdateData(
const Vec3f& entryPos,
KyUInt32 entrySectionIdx,
const Vec3f& exitPos,
KyUInt32 exitSectionIdx);
130 void UpdateData(
const Vec3f& entryPos,
KyUInt32 entrySectionIdx,
const Vec3f& exitPos,
KyUInt32 exitSectionIdx,
const Vec2f& entryDir,
const Vec2f& exitDir);
132 #ifdef CircleArcSplineBubbleData_MaintainGateAndRadiusRange
135 #endif // CircleArcSplineBubbleData_MaintainGateAndRadiusRange
137 bool IsASmallTurn(
KyFloat32 fullTurnToleranceSin)
const;
140 void ComputeMedianTurnAxis();
141 #ifdef CircleArcSplineBubbleData_MaintainGateAndRadiusRange
142 void ComputeRadiusRange();
143 #endif // CircleArcSplineBubbleData_MaintainGateAndRadiusRange
146 friend class CircleArcSplineComputer;
147 const Channel* m_channel;
149 CircleArcSplineBubbleData m_bubbleData;
153 typedef SharedPoolList<CircleArcSplineTurn> TurnList;
158 #endif // Navigation_CircleArcSplineBubbleData_H
#define KyFloat32MAXVAL
The maximum value that can be stored in the KyFloat32 variable type.
Definition: types.h:227
#define KY_NULL
Null value.
Definition: types.h:247
BubbleType
Defines the type of a bubble accordingly to the place it has in a BubbleArray, a BubbleList, etc.
Definition: bubble.h:26
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
#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