diff --git a/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.cpp b/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.cpp index 139844494c4805a6085c5c9b18c5ec829df9f8b8..1ae00f53e83540846398453750275ac93aaf40e7 100644 --- a/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.cpp +++ b/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.cpp @@ -284,19 +284,26 @@ void armarx::RobotIKWidgetController::kinematicChainChanged(const QString &arg1) manipSeparator = new SoSeparator; currentSeparator = new SoSeparator; + tcpCurrentColor = new SoMaterial; + tcpCurrentColor->transparency = 0.6f; tcpCurrent = new SoSphere; - tcpCurrent->radius = 0.03f; + tcpCurrent->radius = 0.06f; + tcpDesiredColor = new SoMaterial; + tcpDesiredColor->ambientColor.setValue(0, 1, 0); + tcpDesiredColor->transparency = 0.3f; tcpDesired = new SoSphere; - tcpDesired->radius = 0.03f; + tcpDesired->radius = 0.06f; tcpManip = new SoCenterballManip; tcpCurrentTransform = new SoTransform; tcpManipTransform = new SoTransform; manipSeparator->addChild(tcpManipTransform); manipSeparator->addChild(tcpManip); + manipSeparator->addChild(tcpDesiredColor); manipSeparator->addChild(tcpDesired); currentSeparator->addChild(tcpCurrentTransform); + currentSeparator->addChild(tcpCurrentColor); currentSeparator->addChild(tcpCurrent); this->ui.robotViewer->getRobotViewer()->getRootNode()->insertChild(currentSeparator, 0); diff --git a/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.h b/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.h index 98bda26db9d213830458a8126458b68f2b262be4..0042f92d70911ae5182294d62695434241745fb0 100644 --- a/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.h +++ b/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotIKGuiPlugin.h @@ -47,6 +47,7 @@ #include <Inventor/sensors/SoTimerSensor.h> #include <Inventor/manips/SoCenterballManip.h> #include <Inventor/nodes/SoSphere.h> +#include <Inventor/nodes/SoMaterial.h> namespace armarx { @@ -115,8 +116,10 @@ namespace armarx SoSeparator* currentSeparator; SoCenterballManip* tcpManip; SoTransform* tcpManipTransform; + SoMaterial* tcpDesiredColor; SoSphere* tcpDesired; SoTransform* tcpCurrentTransform; + SoMaterial* tcpCurrentColor; SoSphere* tcpCurrent; SoTimerSensor* timerSensor; diff --git a/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotViewer.cpp b/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotViewer.cpp index 80f5806649d575bd3d2d26abe16d97ae78acafc8..b28e34e88e99fa1c00db588cee93ecf7b6fe754e 100644 --- a/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotViewer.cpp +++ b/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotViewer.cpp @@ -10,7 +10,7 @@ #include <Inventor/events/SoMouseButtonEvent.h> #include <Inventor/events/SoLocation2Event.h> -armarx::RobotViewer::RobotViewer(QWidget* widget) : SoQtExaminerViewer(widget), sceneRootNode(new SoSeparator), contentRootNode(new SoSeparator), camera(new SoPerspectiveCamera) +armarx::RobotViewer::RobotViewer(QWidget* widget) : SoQtExaminerViewer(widget), sceneRootNode(new SoSeparator), contentRootNode(new SoSeparator), camera(new SoOrthographicCamera) { this->setBackgroundColor(SbColor(150 / 255.0f, 150 / 255.0f, 150 / 255.0f)); this->setAccumulationBuffer(true); diff --git a/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotViewer.h b/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotViewer.h index d5997ec42b5f6273b98ad0d0af733539e16720a5..23157e005e3312e482e876a13b8a094f1c0bb921 100644 --- a/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotViewer.h +++ b/source/RobotAPI/gui-plugins/RobotIKPlugin/RobotViewer.h @@ -2,7 +2,7 @@ #define __RobotViewer_h__ /* Coin headers */ -#include <Inventor/nodes/SoPerspectiveCamera.h> +#include <Inventor/nodes/SoOrthographicCamera.h> #include <Inventor/Qt/viewers/SoQtExaminerViewer.h> namespace armarx @@ -18,7 +18,7 @@ namespace armarx virtual SbBool processSoEvent(const SoEvent* const event); SoSeparator* sceneRootNode; SoSeparator* contentRootNode; - SoPerspectiveCamera* camera; + SoOrthographicCamera* camera; }; }