|
|
Interactive ArViz front-end for the room polygons stored in the navigation memory. More...
#include <armarx/navigation/components/room_editor/RoomEditor.h>
Classes | |
| struct | Parameters |
Public Types | |
| using | RoomChangedCallback = std::function<void(const EditableRoom&)> |
| Called whenever a room was modified by the user. | |
Public Member Functions | |
| bool | isInteracting () const |
| True while the user is dragging a handle. Reloading should be paused meanwhile. | |
| void | redrawAll (viz::StagedCommit &stage) |
| Stages a full redraw of all layers (rooms and handles). | |
| RoomEditor (viz::Client arviz, const Parameters ¶meters) | |
| const std::vector< EditableRoom > & | rooms () const |
| void | setRoomChangedCallback (RoomChangedCallback callback) |
| void | setRooms (const std::vector< EditableRoom > &rooms) |
| Replaces the edited rooms, e.g. | |
| void | update (const viz::CommitResult &result, viz::StagedCommit &stage) |
| Processes the interaction feedback of the previous commit and stages everything that has to be (re-)drawn. | |
Interactive ArViz front-end for the room polygons stored in the navigation memory.
Each polygon vertex is visualized as a draggable handle which is restricted to the XY plane. Additionally, a handle is placed on the midpoint of every edge. Dragging such an edge handle (or using its context menu) cuts the edge, i.e. inserts a new vertex in between the two adjacent ones.
The editor is purely concerned with visualization and interaction. Whenever a room has been modified, the callback registered via setRoomChangedCallback() is invoked, which is where the change is persisted (e.g. written back to the memory).
| using RoomChangedCallback = std::function<void(const EditableRoom&)> |
Called whenever a room was modified by the user.
| RoomEditor | ( | viz::Client | arviz, |
| const Parameters & | parameters ) |
| bool isInteracting | ( | ) | const |
True while the user is dragging a handle. Reloading should be paused meanwhile.
| void redrawAll | ( | viz::StagedCommit & | stage | ) |
Stages a full redraw of all layers (rooms and handles).
| const std::vector< EditableRoom > & rooms | ( | ) | const |
| void setRoomChangedCallback | ( | RoomChangedCallback | callback | ) |
| void setRooms | ( | const std::vector< EditableRoom > & | rooms | ) |
Replaces the edited rooms, e.g.
after (re-)reading them from the memory.
Any interaction that is currently in progress is discarded.
| void update | ( | const viz::CommitResult & | result, |
| viz::StagedCommit & | stage ) |
Processes the interaction feedback of the previous commit and stages everything that has to be (re-)drawn.
Must be called once per cycle, right after stage has been reset.