Index: trunk/lib/FlairSimulator/src/Gui_impl.cpp
===================================================================
--- trunk/lib/FlairSimulator/src/Gui_impl.cpp	(revision 287)
+++ trunk/lib/FlairSimulator/src/Gui_impl.cpp	(revision 288)
@@ -180,4 +180,5 @@
   ITexture* texture=0;
   IGUIFont* font =0;
+  VisualizationCamera::AxisType axisType=VisualizationCamera::AxisType::vrpn;
   
   if (!driver->queryFeature(video::EVDF_RENDER_TO_TARGET)) {
@@ -216,4 +217,8 @@
 
   setWindowCaption(0, 0);
+  
+  Printf("\nUsefull keys:\n");
+  Printf(" page up/down: circle between cameras\n");
+  Printf(" a: change axis display (VRPN, earth or none)\n");
 
   while (device->run()) {
@@ -260,5 +265,5 @@
     //render to texture for axis if possible
     if (texture) {
-      cameras.at(cam_id)->renderAxisToTexture(texture);
+      cameras.at(cam_id)->renderAxisToTexture(texture,font,axisType);
     }
     
@@ -278,11 +283,4 @@
     
     driver->setViewPort(core::rect<s32>(0, 0, smgr->getVideoDriver()->getScreenSize().Width, smgr->getVideoDriver()->getScreenSize().Height));
-    if(font) {
-      font->draw(L"VRPN:",rect<s32>(10,scene_height-30,100,50),SColor(128,255,255,255));
-      font->draw(L"X",rect<s32>(60,scene_height-30,100,50),SColor(255,255,0,0));
-      font->draw(L"Y",rect<s32>(70,scene_height-30,100,50),SColor(255,0,255,0));
-      font->draw(L"Z",rect<s32>(80,scene_height-30,100,50),SColor(255,0,0,255));
-      
-    }
     device->getGUIEnvironment()->drawAll();
     driver->endScene();
@@ -306,4 +304,17 @@
       receiver->SetModel(getModelFromVisualizationCamera(models,cameras.at(cam_id)));
       setWindowCaption(cam_id, fps);
+    }
+    if (receiver->IsKeyDown(KEY_KEY_A)) {
+      switch(axisType) {
+        case VisualizationCamera::AxisType::vrpn:
+          axisType=VisualizationCamera::AxisType::earth;
+          break;
+        case VisualizationCamera::AxisType::earth:
+          axisType=VisualizationCamera::AxisType::none;
+          break;
+        case VisualizationCamera::AxisType::none:
+          axisType=VisualizationCamera::AxisType::vrpn;
+          break;
+      }
     }
 
Index: trunk/lib/FlairSimulator/src/VisualizationCamera.cpp
===================================================================
--- trunk/lib/FlairSimulator/src/VisualizationCamera.cpp	(revision 287)
+++ trunk/lib/FlairSimulator/src/VisualizationCamera.cpp	(revision 288)
@@ -27,4 +27,6 @@
 #include <IrrlichtDevice.h>
 #include <ISceneManager.h>
+#include <IGUIEnvironment.h>
+#include <IGUIFont.h>
 
 using namespace irr;
@@ -36,4 +38,47 @@
 namespace flair {
 namespace simulator {
+
+class AxisSceneNode: public ISceneNode {
+    public:
+      AxisSceneNode(ISceneManager *axis_scenemanager):ISceneNode(axis_scenemanager->getRootSceneNode(), axis_scenemanager, -1) {
+        //draw ned axis
+        IAnimatedMesh* arrowMeshRed = axis_scenemanager->addArrowMesh( "x_axisArrow",video::SColor(255, 255, 0, 0),video::SColor(255, 255, 0, 0));
+        nodeX = axis_scenemanager->addMeshSceneNode(arrowMeshRed,this);
+        nodeX->setMaterialFlag(video::EMF_LIGHTING, false);
+        nodeX->setRotation(vector3df(0,0,-90));//use vrpn yaw rotation from earth
+        nodeX->setScale(vector3df(1,3,1));
+        
+        IAnimatedMesh* arrowMeshGreen = axis_scenemanager->addArrowMesh( "y_axisArrow",video::SColor(255, 0, 255, 0),video::SColor(255, 0, 255, 0));
+        nodeY = axis_scenemanager->addMeshSceneNode(arrowMeshGreen,this);
+        nodeY->setMaterialFlag(video::EMF_LIGHTING, false);
+        nodeY->setScale(vector3df(1,3,1));
+        
+        IAnimatedMesh* arrowMeshBlue = axis_scenemanager->addArrowMesh( "z_axisArrow",video::SColor(255, 0, 0, 255),video::SColor(255, 0, 0, 255));
+        nodeZ = axis_scenemanager->addMeshSceneNode(arrowMeshBlue,this);
+        nodeZ->setMaterialFlag(video::EMF_LIGHTING, false);
+        nodeZ->setRotation(vector3df(-90,0,0));//irrlicht is left handed, draw a right handed axis
+        nodeZ->setScale(vector3df(1,3,1));  
+      }
+      
+      void render(void) {
+        IVideoDriver *driver = SceneManager->getVideoDriver();
+        driver->setTransform(ETS_WORLD, AbsoluteTransformation);
+      }
+
+      void OnRegisterSceneNode(void) {
+        if (IsVisible)
+          SceneManager->registerNodeForRendering(this);
+
+        ISceneNode::OnRegisterSceneNode();
+      }
+      
+      const aabbox3d<f32> &getBoundingBox(void) const {
+        return box;
+      }
+      
+    private:
+      aabbox3d<f32> box;
+      ISceneNode *nodeX,*nodeY,*nodeZ;
+};
 
 VisualizationCamera::VisualizationCamera(std::string inName) {
@@ -54,45 +99,58 @@
   axis_scenemanager=getGui()->getSceneManager()->createNewSceneManager();
   axis_camera= axis_scenemanager->addCameraSceneNode();
-  axis_camera->setAspectRatio(1);  // same as texture ratio, TODO: get it from texture in renderAxisToTexture
   axis_camera->setUpVector(vector3df(0, 0, 1));
   axis_camera->setFOV(PI / 2.5f);
   axis_scenemanager->setActiveCamera(axis_camera);
   
-  //draw ned axis
-  IAnimatedMesh* arrowMeshRed = axis_scenemanager->addArrowMesh( "x_axisArrow",video::SColor(255, 255, 0, 0),video::SColor(255, 255, 0, 0));
-  nodeX = axis_scenemanager->addMeshSceneNode(arrowMeshRed);
-  nodeX->setMaterialFlag(video::EMF_LIGHTING, false);
-  nodeX->setRotation(vector3df(0,0,-90+core::Euler::ToDegree(getSimulator()->Yaw())));//use vrpn yaw rotation from earth
-  nodeX->setScale(vector3df(1,3,1));
-  
-  IAnimatedMesh* arrowMeshGreen = axis_scenemanager->addArrowMesh( "y_axisArrow",video::SColor(255, 0, 255, 0),video::SColor(255, 0, 255, 0));
-  nodeY = axis_scenemanager->addMeshSceneNode(arrowMeshGreen);
-  nodeY->setMaterialFlag(video::EMF_LIGHTING, false);
-  nodeY->setRotation(vector3df(0,0,core::Euler::ToDegree(getSimulator()->Yaw())));//use vrpn yaw rotation from earth
-  nodeY->setScale(vector3df(1,3,1));
-  
-  IAnimatedMesh* arrowMeshBlue = axis_scenemanager->addArrowMesh( "z_axisArrow",video::SColor(255, 0, 0, 255),video::SColor(255, 0, 0, 255));
-  nodeZ = axis_scenemanager->addMeshSceneNode(arrowMeshBlue);
-  nodeZ->setMaterialFlag(video::EMF_LIGHTING, false);
-  nodeZ->setRotation(vector3df(-90,0,0));//irrlicht is left handed, draw a right handed axis
-  nodeZ->setScale(vector3df(1,3,1));
+  vrpnSceneNode=new AxisSceneNode(axis_scenemanager);
+  vrpnSceneNode->setRotation(vector3df(0,0,core::Euler::ToDegree(getSimulator()->Yaw())));//use vrpn yaw rotation from earth
+  earthSceneNode=new AxisSceneNode(axis_scenemanager);
 }
 
 VisualizationCamera::~VisualizationCamera() {}
 
-void VisualizationCamera::renderAxisToTexture(ITexture* texture) {
+
+void VisualizationCamera::renderAxisToTexture(ITexture* texture,IGUIFont *font,AxisType axisType) {
   //put axis at a "normalized" distance
   vector3df direction=camera->getTarget()-camera->getPosition();
   direction.normalize();
-  nodeX->setPosition(camera->getPosition()+direction*6);
-  nodeY->setPosition(camera->getPosition()+direction*6);
-  nodeZ->setPosition(camera->getPosition()+direction*6);
-
+  vrpnSceneNode->setPosition(camera->getPosition()+direction*6);
+  earthSceneNode->setPosition(camera->getPosition()+direction*6);
+  
+  stringw axisText;
+  switch(axisType) {
+    case AxisType::vrpn:
+      vrpnSceneNode->setVisible(true);
+      earthSceneNode->setVisible(false);
+      axisText="VRPN";
+      break;
+    case AxisType::earth:
+      vrpnSceneNode->setVisible(false);
+      earthSceneNode->setVisible(true);
+      axisText="earth";
+      break;
+    case AxisType::none:
+      vrpnSceneNode->setVisible(false);
+      earthSceneNode->setVisible(false);
+      break;
+  }
+  
   axis_camera->setPosition(camera->getPosition());
   axis_camera->setRotation(camera->getRotation());
   axis_camera->setTarget(camera->getTarget());
+  axis_camera->setAspectRatio((float)(texture->getSize().Width)/(float)(texture->getSize().Height));  // same as texture ratio
+
   
   axis_scenemanager->getVideoDriver()->setRenderTarget(texture, true, true, SColor(0,0,0,0));
   axis_scenemanager->drawAll();
+  
+  if(font && axisType!=AxisType::none) {
+    font->draw(axisText,rect<s32>(10,texture->getSize().Height-25,texture->getSize().Width,texture->getSize().Height),SColor(255,255,255,255));
+    font->draw("X",rect<s32>(60,texture->getSize().Height-25,texture->getSize().Width,texture->getSize().Height),SColor(255,255,0,0));
+    font->draw("Y",rect<s32>(70,texture->getSize().Height-25,texture->getSize().Width,texture->getSize().Height),SColor(255,0,255,0));
+    font->draw("Z",rect<s32>(80,texture->getSize().Height-25,texture->getSize().Width,texture->getSize().Height),SColor(255,0,0,255));
+    getGui()->getDevice()->getGUIEnvironment()->drawAll();
+  }
+  
   axis_scenemanager->getVideoDriver()->setRenderTarget(0, true, true, 0);
 }
Index: trunk/lib/FlairSimulator/src/VisualizationCamera.h
===================================================================
--- trunk/lib/FlairSimulator/src/VisualizationCamera.h	(revision 287)
+++ trunk/lib/FlairSimulator/src/VisualizationCamera.h	(revision 288)
@@ -30,8 +30,12 @@
     class ITexture;
   }
+  namespace gui {
+    class IGUIFont;
+  }
 }
 
 namespace flair {
 namespace simulator {
+class AxisSceneNode;
 
 class VisualizationCamera : private irr::scene::ISceneNodeAnimator {
@@ -45,10 +49,12 @@
   irr::scene::ICameraSceneNode *getCameraSceneNode(void);
   std::string getName(void);
-  void renderAxisToTexture(irr::video::ITexture* texture);
+  enum class AxisType { vrpn,earth,none};
+  void renderAxisToTexture(irr::video::ITexture* texture,irr::gui::IGUIFont *font,AxisType axisType);
 
 private:
   virtual bool isEventReceiverEnabled(void) const { return true; }
-  irr::scene::ISceneNode *nodeX,*nodeY,*nodeZ;
   irr::scene::ISceneManager *axis_scenemanager;
+  AxisSceneNode *vrpnSceneNode;
+  AxisSceneNode *earthSceneNode;
 
 protected:
