22 #ifndef __PNS_WALKAROUND_H
23 #define __PNS_WALKAROUND_H
29 #include "pns_router.h"
30 #include "pns_logger.h"
31 #include "pns_algo_base.h"
37 static const int DefaultIterationLimit = 50;
43 m_iterationLimit( DefaultIterationLimit )
45 m_forceSingleDirection =
false;
46 m_forceLongerPath =
false;
47 m_forceWinding =
false;
48 m_cursorApproachMode =
false;
49 m_itemMask = ITEM::ANY_T;
52 m_recursiveBlockageCount = 0;
53 m_recursiveCollision[0] = m_recursiveCollision[1] =
false;
60 enum WALKAROUND_STATUS
67 void SetWorld(
NODE* aNode )
72 void SetIterationLimit(
const int aIterLimit )
74 m_iterationLimit = aIterLimit;
77 void SetSolidsOnly(
bool aSolidsOnly )
80 m_itemMask = ITEM::SOLID_T;
82 m_itemMask = ITEM::ANY_T;
85 void SetItemMask(
int aMask )
90 void SetSingleDirection(
bool aForceSingleDirection )
92 m_forceSingleDirection = aForceSingleDirection;
93 m_forceLongerPath = aForceSingleDirection;
96 void SetSingleDirection2(
bool aForceSingleDirection )
98 m_forceSingleDirection = aForceSingleDirection;
101 void SetApproachCursor(
bool aEnabled,
const VECTOR2I& aPos )
104 m_cursorApproachMode = aEnabled;
107 void SetForceWinding (
bool aEnabled,
bool aCw )
110 m_forceWinding = aEnabled;
113 void RestrictToSet(
bool aEnabled,
const std::set<ITEM*>& aSet )
116 m_restrictedSet = aSet;
118 m_restrictedSet.clear();
121 WALKAROUND_STATUS Route(
const LINE& aInitialPath,
LINE& aWalkPath,
122 bool aOptimize =
true );
130 void start(
const LINE& aInitialPath );
132 WALKAROUND_STATUS singleStep(
LINE& aPath,
bool aWindingDirection );
133 NODE::OPT_OBSTACLE nearestObstacle(
const LINE& aPath );
137 int m_recursiveBlockageCount;
139 int m_iterationLimit;
141 bool m_forceSingleDirection, m_forceLongerPath;
142 bool m_cursorApproachMode;
146 NODE::OPT_OBSTACLE m_currentObstacle[2];
147 bool m_recursiveCollision[2];
149 std::set<ITEM*> m_restrictedSet;
Class ALGO_BASE.
Definition: pns_algo_base.h:40
Definition: pns_line.h:61
Definition: pns_logger.h:40
Class NODE.
Definition: pns_node.h:138
Definition: pns_router.h:113
Definition: pns_walkaround.h:36
virtual LOGGER * Logger() override
Returns the logger object, allowing to dump geometry to a file.
Definition: pns_walkaround.h:124