7 #ifndef Navigation_StringPuller_H
8 #define Navigation_StringPuller_H
23 class BiTangentSorter_IncreasingAngleFromReferenceDirection;
25 enum StringPullerResult
27 StringPuller_NotInitialized,
28 StringPuller_NotComputed,
30 StringPuller_Done_Success,
32 StringPuller_Done_InvalidInput,
33 StringPuller_Done_CurrentPivotOppositeBorderNotFound,
34 StringPuller_Done_BubbleToCornerFunnelFailure,
35 StringPuller_Done_NextPivotNotFound,
36 StringPuller_Done_NextPivotOppositeBorderNotFound,
51 KY_INLINE
void Compute(StringPulledBubbleList& stringPulledBubbleList);
54 void Advance(StringPulledBubbleList& stringPulledBubbleList,
KyUInt32 maxPivotPerAdvance = 1);
58 KyResult RunFromCurrentPivot(StringPulledBubbleList& stringPulledBubbleList);
62 KyResult StringPullBetweenPivots(StringPulledBubbleList& stringPulledBubbleList);
64 KyResult ComputeCurrentPivotEnterOrthoOppositeBoderIndex();
65 KyResult ComputeNextPivotEnterOrthoOppositeBoderIndex();
67 KyResult ComputeCornerEnterOrthoOppositeBoderIndex(
KyUInt32 cornerIndex, FunnelSide cornerSide,
const Vec2f& enterDirection,
71 KyResult CollectIntersectingBubblesInPivotTurn();
72 KyResult CollectIntersectingBubblesSameSideThanCurrentPivot();
73 KyResult CollectIntersectingBubblesSameSideThanClosedCorner();
77 KyUInt32 GetNextTangentBubbleIdx(FunnelSide funnelSide,
const Vec2f& refDir);
79 void VisualDebugRunFromCurrentPivot()
const;
80 void VisualDebugGetNextTangentBubbleIdx(
KyUInt32 bubbleCount,
const Bubble& curPivotBubble,
const Vec2f& refDir, BiTangentSorter_IncreasingAngleFromReferenceDirection& increasingAngleSorter)
const;
81 void VisualDebugStringPullBetweenPivots()
const;
82 void VisualDebugComputeCornerEnterOrtho_1(
const VisualColor& displayColor,
const char* displayListName,
KyUInt32 cornerIndex)
const;
83 void VisualDebugComputeCornerEnterOrtho_2(
const VisualColor& displayColor,
const char* displayListName,
KyUInt32 cornerIndex,
const Vec2f& curPivotEnterOrthoDir,
const Vec2f& enterDirection)
const;
84 void VisualDebugComputeCornerEnterOrtho_3(
const char* displayListName,
KyUInt32 oppositeBorderStartIdx,
KyUInt32 oppositeBorderEndIdx,
VisualColor displayColor)
const;
95 BubbleFunnelBorder m_funnelClosedBorder;
100 FunnelSide m_currentPivotSide;
101 Vec2f m_currentPivotEnterDirection;
102 KyUInt32 m_currentPivotOrthoOppositeBorderStartIdx;
103 KyUInt32 m_currentPivotOrthoOppositeBorderEndIdx;
106 FunnelSide m_nextPivotSide;
107 Vec2f m_nextPivotEnterDirection;
108 KyUInt32 m_nextPivotOrthoOppositeBorderStartIdx;
109 KyUInt32 m_nextPivotOrthoOppositeBorderEndIdx;
124 StringPullerResult m_result;
128 mutable StringStream m_groupName;
131 bool m_advancedVisualDebuggingEnabled;
132 World* m_advancedVisualDebuggingWorld;
136 KY_INLINE
void StringPuller::Compute(StringPulledBubbleList& stringPulledBubbleList) { Advance(stringPulledBubbleList,
KyUInt32MAXVAL); }
140 #endif // Navigation_StringPuller_H
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
This class encapsulate an array of Bubbles.
Definition: bubblearray.h:23
Represents a single RGBA color.
Definition: visualcolor.h:19
This class is a runtime container for Gameware Navigation WorldElements such as NavData, Bots, BoxObstacles, TagVolumes...
Definition: world.h:54
RotationDirection
Defines the 4 possible cases of possibly constrained rotation in the horizontal plane for a given ele...
Definition: rotation.h:20
KyFloat32 SquareDistance2d(const Vec3f &v1, const Vec3f &v2)
Returns the square of the distance between v1 and v2, ignoring Z coordinates.
Definition: vec3f.h:277
This class represents a circle with potential rotation limitation.
Definition: bubble.h:35
This class defines a two-dimensional vector whose coordinates are stored using floating-point numbers...
Definition: vec2f.h:24
Definition: gamekitcrowddispersion.h:20
Computes a StringPulledBubbleList from the provided array of bubbles.
Definition: stringpuller.h:42
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
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23