From 0381914b42131069b2e51a301b42d04ad574167e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 30 Jan 2012 12:26:28 +0000 Subject: [PATCH] Added support for Scale1DDragger, Scale2DDragger and TranslatePlaneDragger to --dragger command line option --- examples/osgmanipulator/osgmanipulator.cpp | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/examples/osgmanipulator/osgmanipulator.cpp b/examples/osgmanipulator/osgmanipulator.cpp index 640461e91..a49c00a7e 100644 --- a/examples/osgmanipulator/osgmanipulator.cpp +++ b/examples/osgmanipulator/osgmanipulator.cpp @@ -26,10 +26,13 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include @@ -83,6 +86,24 @@ osgManipulator::Dragger* createDragger(const std::string& name) d->setupDefaultGeometry(); dragger = d; } + else if ("TranslatePlaneDragger" == name) + { + osgManipulator::TranslatePlaneDragger* d = new osgManipulator::TranslatePlaneDragger(); + d->setupDefaultGeometry(); + dragger = d; + } + else if ("Scale1DDragger" == name) + { + osgManipulator::Scale1DDragger* d = new osgManipulator::Scale1DDragger(); + d->setupDefaultGeometry(); + dragger = d; + } + else if ("Scale2DDragger" == name) + { + osgManipulator::Scale2DDragger* d = new osgManipulator::Scale2DDragger(); + d->setupDefaultGeometry(); + dragger = d; + } else { osgManipulator::TabBoxDragger* d = new osgManipulator::TabBoxDragger(); @@ -305,7 +326,7 @@ int main( int argc, char **argv ) arguments.getApplicationUsage()->addCommandLineOption("--help-keys","Display keyboard & mouse bindings available"); arguments.getApplicationUsage()->addCommandLineOption("--help-all","Display all command line, env vars and keyboard & mouse bindings."); - arguments.getApplicationUsage()->addCommandLineOption("--dragger ","Use the specified dragger for manipulation [TabPlaneDragger,TabPlaneTrackballDragger,TrackballDragger,Translate1DDragger,Translate2DDragger,TranslateAxisDragger,TabBoxDragger]"); + arguments.getApplicationUsage()->addCommandLineOption("--dragger ","Use the specified dragger for manipulation [TabPlaneDragger, TabPlaneTrackballDragger, TrackballDragger, Translate1DDragger, Translate2DDragger, TranslateAxisDragger, TabBoxDragger, TranslatePlaneDragger, Scale1DDragger, Scale2DDragger]"); arguments.getApplicationUsage()->addCommandLineOption("--fixedDraggerSize","Fix the size of the dragger geometry in the screen space"); bool fixedSizeInScreen = false;