Mapper  0.9.0
API documentation
Public Member Functions | Static Public Member Functions | List of all members
OpenOrienteering::ObjectSelector Class Reference

Implements the object selection logic for edit tools. More...

#include <object_selector.h>

Public Member Functions

 ObjectSelector (Map *map)
 Creates a selector for the given map. More...
 
bool selectAt (const MapCoordF &position, double tolerance, bool toggle)
 Selects an object at the given position. More...
 
bool selectBox (const MapCoordF &corner1, const MapCoordF &corner2, bool toggle)
 Applies box selection. More...
 

Static Public Member Functions

static bool sortObjects (const std::pair< int, Object *> &a, const std::pair< int, Object *> &b)
 

Detailed Description

Implements the object selection logic for edit tools.

Constructor & Destructor Documentation

◆ ObjectSelector()

OpenOrienteering::ObjectSelector::ObjectSelector ( Map map)

Creates a selector for the given map.

Member Function Documentation

◆ selectAt()

bool OpenOrienteering::ObjectSelector::selectAt ( const MapCoordF position,
double  tolerance,
bool  toggle 
)

Selects an object at the given position.

If there is already an object selected at this position, switches through the available objects.

Parameters
tolerancemaximum, normal selection distance in map units. It is enlarged by 1.5 if no objects are found with the normal distance.
togglecorresponds to the shift key modifier.
Returns
true if the selection has changed.

◆ selectBox()

bool OpenOrienteering::ObjectSelector::selectBox ( const MapCoordF corner1,
const MapCoordF corner2,
bool  toggle 
)

Applies box selection.

Parameters
togglecorresponds to the shift key modifier.
Returns
true if the selection has changed.

◆ sortObjects()

bool OpenOrienteering::ObjectSelector::sortObjects ( const std::pair< int, Object *> &  a,
const std::pair< int, Object *> &  b 
)
static

The documentation for this class was generated from the following files: