![]() |
Mapper
0.9.0
API documentation
|
Helper class to 'follow' (i.e. More...
#include <tool_helpers.h>
Public Member Functions | |
FollowPathToolHelper () | |
Constructs a new helper. More... | |
void | startFollowingFromCoord (const PathObject *path, MapCoordVector::size_type coord_index) |
Starts following the given object from a coordinate. More... | |
void | startFollowingFromPathCoord (const PathObject *path, const PathCoord &coord) |
Starts following the given object from an arbitrary position indicated by the path coord. More... | |
std::unique_ptr< PathObject > | updateFollowing (const PathCoord &end_coord) |
Updates the process and returns the followed part of the path. More... | |
const PathObject * | followed_object () const |
Returns the object which is being followed. More... | |
std::size_t | partIndex () const |
Returns the index of the path part which is being followed. More... | |
Helper class to 'follow' (i.e.
extract continuous parts from) PathObjects.
A FollowPathToolHelper can be reused for following different paths.
OpenOrienteering::FollowPathToolHelper::FollowPathToolHelper | ( | ) |
Constructs a new helper.
|
inline |
Returns the object which is being followed.
|
inline |
Returns the index of the path part which is being followed.
void OpenOrienteering::FollowPathToolHelper::startFollowingFromCoord | ( | const PathObject * | path, |
MapCoordVector::size_type | coord_index | ||
) |
Starts following the given object from a coordinate.
void OpenOrienteering::FollowPathToolHelper::startFollowingFromPathCoord | ( | const PathObject * | path, |
const PathCoord & | coord | ||
) |
Starts following the given object from an arbitrary position indicated by the path coord.
The path coord does not need to be from the object's path coord vector.
std::unique_ptr< PathObject > OpenOrienteering::FollowPathToolHelper::updateFollowing | ( | const PathCoord & | end_coord | ) |
Updates the process and returns the followed part of the path.
Returns a pointer that owns nothing if the following failed, e.g. because the path coord is on another path part than the beginning or path and end are the same.