Skip to content
Snippets Groups Projects
Commit 8b07819b authored by Fabian Paus's avatar Fabian Paus
Browse files

ArViz: Add interaction flag for global axes

parent a31363e2
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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();
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment