diff --git a/source/RobotAPI/components/ArViz/Client/Client.h b/source/RobotAPI/components/ArViz/Client/Client.h index 20d209ba089125525a8049106398ed511e62aeab..fd9f81d8cc04004b98b3e97785d042ee7452e5bb 100644 --- a/source/RobotAPI/components/ArViz/Client/Client.h +++ b/source/RobotAPI/components/ArViz/Client/Client.h @@ -95,6 +95,11 @@ namespace viz // TODO: Implement } + void commit(Layer const& layer) + { + commit({layer}); + } + void commit(std::vector<Layer> const& layers) { data::LayerUpdateSeq updates; diff --git a/source/RobotAPI/components/ArViz/Client/elements/ElementOps.h b/source/RobotAPI/components/ArViz/Client/elements/ElementOps.h index fb3f4b81a8ec856f0c54d049ff1f4b5ab5b8077f..a1a8ce949bd76dfa2e5a601ceaa58cc6de540c7e 100644 --- a/source/RobotAPI/components/ArViz/Client/elements/ElementOps.h +++ b/source/RobotAPI/components/ArViz/Client/elements/ElementOps.h @@ -59,6 +59,18 @@ namespace armarx::viz return selection(); } + Self& globalAxes(bool global = true) + { + if (global) + { + data_.enableFlags |= data::InteractionEnableFlags::GLOBAL_AXES; + } + else + { + data_.enableFlags &= ~data::InteractionEnableFlags::GLOBAL_AXES; + } + } + Self& fullTransform() { return translation().rotation(); diff --git a/source/RobotAPI/interface/ArViz/Elements.ice b/source/RobotAPI/interface/ArViz/Elements.ice index 550f75bbff5d8e261ac1a4b7a6b5e36c4675f4fa..e37954367c0f2961ca87ef254e9699267e9a75e2 100644 --- a/source/RobotAPI/interface/ArViz/Elements.ice +++ b/source/RobotAPI/interface/ArViz/Elements.ice @@ -33,16 +33,23 @@ module data { const int NONE = 0; + // Make an object selectable const int SELECT = 1; + // Enable the context menu for an object const int CONTEXT_MENU = 2; + // Enable translation along the three axes const int TRANSLATION_X = 4; const int TRANSLATION_Y = 8; const int TRANSLATION_Z = 16; + // Enable rotation along the three axes const int ROTATION_X = 32; const int ROTATION_Y = 64; const int ROTATION_Z = 128; + + // Are the axes global (1) or object local (0)? + const int GLOBAL_AXES = 256; }; struct InteractionDescription @@ -92,7 +99,7 @@ module data long revision = 0; // Chosen context menu entry is only relevant for type == CONTEXT_MENU_CHOSEN - string chosenContextMenuEntry; + int chosenContextMenuEntry = 0; // Original and chosen poase are only relevant for type == TRANSFORM GlobalPose originalPose;