49 m_ignoresBlocker(false),
138 if (
m_path.empty() || step == 0) {
142 int32_t pos =
static_cast<int32_t
>(
m_walked) + step;
143 if (pos > static_cast<int32_t>(
m_path.size()) || pos < 0) {
147 for (int32_t i = 0; i < step; ++i, ++
m_current);
149 for (int32_t i = 0; i > step; --i, --
m_current);
193 }
else if (length >=
m_path.size()) {
198 if (newend >
m_path.size()) {
266 std::vector<ModelCoordinate> coords;
287 std::list<std::string> areas;
306 Layer* layer = (*it).getLayer();
void setOccupiedArea(const std::vector< ModelCoordinate > &area)
Sets occupied coordinates for multi cell object.
std::list< std::string > getWalkableAreas() const
Returns a list that contains all walkable area ids.
void cutPath(uint32_t length=1)
Cuts path after the given length.
Object * m_object
pointer to multi object
Location m_endNode
end location
void setObject(Object *obj)
Sets the object, needed for multi cell and z-step range.
std::vector< ModelCoordinate > getMultiObjectCoordinates(int32_t rotation) const
Returns all multi object coordinates for the given rotation.
RouteStatusInfo m_status
search status
std::list< Location > Path
A path is a list with locations. Each location holds the coordinate for one cell. ...
void setDynamicBlockerIgnored(bool ignore)
Sets the route to ignore dynamic blocker.
int32_t getZStepRange()
Returns z-step range from object.
const Location & getPreviousNode()
Returns previous location.
const Location & getStartNode()
Returns the start location.
bool walkToNextNode(int32_t step=1)
Changes the position on the path.
Object * getObject()
Returns the object, needed for multi cell and z-step range.
void setRouteStatus(RouteStatusInfo status)
Sets route status.
int32_t m_sessionId
session id of the search
const Location & getNextNode()
Returns next location.
const Location & getEndNode()
Returns the target location.
uint32_t getPathLength()
Returns the length of the path.
static Logger _log(LM_AUDIO)
bool m_ignoresBlocker
ignores dynamic blocker
uint32_t m_walked
walked steps on the path
Path getBlockingPathLocations()
Returns the blocking locations of the path.
PathIterator m_current
current position on the path
bool reachedEnd()
Gets if the end of the path was achieved.
int32_t m_rotation
current rotation
const std::list< std::string > getLimitedAreas()
void setPath(const Path &path)
Sets the path for the route.
void setRotation(int32_t rotation)
Sets the current rotation.
void setStartNode(const Location &node)
Sets the start location.
int32_t getSessionId()
Returns the session identifier.
void setCostId(const std::string &cost)
Sets cost identifier which should be used for pathfinding.
bool isDynamicBlockerIgnored()
Gets if the route ignores dynamic blocker.
RouteStatusInfo getRouteStatus()
Returns route status.
Path::iterator PathIterator
path iterator
void setReplanned(bool replanned)
Sets the route to replanned.
bool isMultiObject() const
Gets if object uses special cost.
std::vector< ModelCoordinate > m_area
occupied cells by multicell object
Path getPath()
Returns the path.
uint32_t getWalkedLength()
Returns the walked steps.
const std::vector< ModelCoordinate > & getOccupiedArea()
Returns occupied coordinates for multi cell object.
std::string m_costId
used cost identifier
int32_t getZStepRange() const
Returns z-step range from object.
const std::string & getCostId()
Returns cost identifier which is used for pathfinding.
std::vector< ModelCoordinate > getOccupiedCells(int32_t rotation)
Returns relative coordinates for multi cell object based on rotation.
bool cellContainsBlockingInstance(const ModelCoordinate &cellCoordinate)
Determines if a given cell on the layer contains a blocking instance.
const Location & getCurrentNode()
Returns current location.
bool isMultiCell()
Gets if path is for a multi cell object.
void setEndNode(const Location &node)
Sets the target location.
int32_t getRotation()
Returns the current rotation.
bool m_replanned
is path replanned
Location m_startNode
start location
bool isReplanned()
Gets if the route is replanned.
Route(const Location &start, const Location &end)
Constructor.
void setSessionId(int32_t id)
Sets the session identifier.