Index: unk/lib/FlairSimulator/src/AnimPoursuite.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/AnimPoursuite.cpp	(revision 68)
+++ 	(revision )
@@ -1,136 +1,0 @@
-// %flair:license{
-// This file is part of the Flair framework distributed under the
-// CECILL-C License, Version 1.0.
-// %flair:license}
-//  created:    2012/08/21
-//  filename:   AnimPoursuite.cpp
-//
-//  author:     Guillaume Sanahuja
-//              Copyright Heudiasyc UMR UTC/CNRS 7253
-//
-//  version:    $Id: $
-//
-//  purpose:    classe definissant une animation poursuite pour camera
-//
-/*********************************************************************/
-#ifdef GL
-
-#include "AnimPoursuite.h"
-#include "Simulator.h"
-#include "Model.h"
-#include "Model_impl.h"
-#include <ICursorControl.h>
-#include <ICameraSceneNode.h>
-
-using namespace irr;
-using namespace gui;
-using namespace core;
-using namespace scene;
-
-namespace flair {
-namespace simulator {
-
-AnimPoursuite::AnimPoursuite(const ISceneNode *parent, float rotateSpeed,
-                             float zoomSpeed) {
-  this->parent = parent;
-  this->zoomSpeed = zoomSpeed;
-  this->rotateSpeed = rotateSpeed;
-  currentZoom = 100;
-  RotY = 20;
-  RotZ = 0;
-  Rotating = false;
-  LMouseKey = false;
-}
-
-AnimPoursuite::~AnimPoursuite() {}
-
-void AnimPoursuite::setPositionOffset(vector3df newpos) { pos_offset = newpos; }
-
-void AnimPoursuite::setTargetOffset(vector3df newpos) {
-  target_offset = newpos;
-}
-
-float AnimPoursuite::sat(float value) {
-  if (value > 89)
-    value = 89;
-  if (value < -89)
-    value = -89;
-  return value;
-}
-
-void AnimPoursuite::animateNode(ISceneNode *node, u32 timeMs) {
-  ICameraSceneNode *camera = static_cast<ICameraSceneNode *>(node);
-  vector3df pos;
-
-  float nRotY = RotY;
-  float nRotZ = RotZ;
-
-  if (LMouseKey == true) {
-    if (!Rotating) {
-      RotateStart = MousePos;
-      Rotating = true;
-      nRotY = RotY;
-      nRotZ = RotZ;
-    } else {
-      nRotY += (RotateStart.Y - MousePos.Y) * rotateSpeed;
-      nRotZ += (RotateStart.X - MousePos.X) * rotateSpeed;
-      nRotY = sat(nRotY);
-    }
-  } else if (Rotating) {
-    RotY += (RotateStart.Y - MousePos.Y) * rotateSpeed;
-    RotZ += (RotateStart.X - MousePos.X) * rotateSpeed;
-    RotY = sat(RotY);
-    nRotY = RotY;
-    nRotZ = RotZ;
-    Rotating = false;
-  }
-
-  pos.X = -currentZoom;
-  pos.Y = 0;
-  pos.Z = 0;
-
-  pos.rotateXZBy(-nRotY);
-  pos.rotateXYBy(getSimulator()->Yaw() + nRotZ + parent->getRotation().Z);
-
-  camera->setPosition(parent->getPosition() + pos + pos_offset);
-  camera->setTarget(parent->getPosition() + target_offset);
-}
-
-ISceneNodeAnimator *AnimPoursuite::createClone(ISceneNode *node,
-                                               ISceneManager *newManager) {
-  return NULL;
-}
-
-bool AnimPoursuite::MouseMoved(const SEvent &event,
-                               irr::core::position2df MousePos) {
-  if (event.EventType != EET_MOUSE_INPUT_EVENT)
-    return false;
-
-  switch (event.MouseInput.Event) {
-
-  case EMIE_MOUSE_WHEEL:
-    currentZoom -= event.MouseInput.Wheel * zoomSpeed;
-    if (currentZoom <= 0)
-      currentZoom = zoomSpeed;
-    break;
-  case EMIE_LMOUSE_PRESSED_DOWN:
-    LMouseKey = true;
-    break;
-  case EMIE_LMOUSE_LEFT_UP:
-    LMouseKey = false;
-    break;
-  case EMIE_MOUSE_MOVED:
-    this->MousePos = MousePos;
-    break;
-  default:
-    return false;
-    break;
-  }
-
-  return true;
-}
-
-} // end namespace simulator
-} // end namespace flair
-
-#endif // GL
Index: /trunk/lib/FlairSimulator/src/FixedCamera.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/FixedCamera.cpp	(revision 69)
+++ /trunk/lib/FlairSimulator/src/FixedCamera.cpp	(revision 69)
@@ -0,0 +1,79 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2016/09/01
+//  filename:   FixedCamera.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    class for a fixed camera in the gui
+//
+/*********************************************************************/
+#ifdef GL
+
+#include "FixedCamera.h"
+#include "Simulator.h"
+#include "Model.h"
+#include "Model_impl.h"
+#include "Gui.h"
+#include <ICursorControl.h>
+#include <ICameraSceneNode.h>
+#include <IrrlichtDevice.h>
+#include <ISceneManager.h>
+
+using namespace irr;
+using namespace gui;
+using namespace core;
+using namespace scene;
+
+namespace flair {
+namespace simulator {
+
+FixedCamera::FixedCamera(core::Vector3D position,float rotateSpeed,float zoomSpeed):VisualizationCamera(rotateSpeed,zoomSpeed)  {
+  RotY = 020;
+  RotZ = 0;
+  Rotating = false;
+
+   // camera
+  camera->setPosition(vector3df(position.x,position.y,position.z));
+}
+
+FixedCamera::~FixedCamera() {}
+
+void FixedCamera::animateNode(ISceneNode *node, u32 timeMs) {
+  ICameraSceneNode *camera = static_cast<ICameraSceneNode *>(node);
+
+  float nRotY = RotY;
+  float nRotZ = RotZ;
+
+  if (LMouseKey == true) {
+    if (!Rotating) {
+      RotateStart = MousePos;
+      Rotating = true;
+      nRotY = RotY;
+      nRotZ = RotZ;
+    } else {
+      nRotY += (RotateStart.Y - MousePos.Y) * rotateSpeed;
+      nRotZ += (RotateStart.X - MousePos.X) * rotateSpeed;
+    }
+  } else if (Rotating) {
+    RotY += (RotateStart.Y - MousePos.Y) * rotateSpeed;
+    RotZ += (RotateStart.X - MousePos.X) * rotateSpeed;
+    nRotY = RotY;
+    nRotZ = RotZ;
+    Rotating = false;
+  }
+
+  camera->setRotation(vector3df(0,nRotY,nRotZ));
+  camera->bindTargetAndRotation(true);
+}
+
+
+} // end namespace simulator
+} // end namespace flair
+
+#endif // GL
Index: /trunk/lib/FlairSimulator/src/FixedCamera.h
===================================================================
--- /trunk/lib/FlairSimulator/src/FixedCamera.h	(revision 69)
+++ /trunk/lib/FlairSimulator/src/FixedCamera.h	(revision 69)
@@ -0,0 +1,42 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2016/09/01
+//  filename:   FixedCamera.h
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    cclass for a fixed camera in the gui
+//
+/*********************************************************************/
+
+#ifndef FIXEDCAMERA_H
+#define FIXEDCAMERA_H
+
+#include "VisualizationCamera.h"
+#include <Vector3D.h>
+
+namespace flair {
+namespace simulator {
+
+class FixedCamera : public VisualizationCamera {
+public:
+  FixedCamera(core::Vector3D position,float rotateSpeed = -500.0f, float zoomSpeed = 4.0f);
+  ~FixedCamera();
+
+  void animateNode(irr::scene::ISceneNode *node, irr::u32 timeMs);
+
+private:
+  irr::core::position2df RotateStart;
+  bool Rotating;
+  float RotY, RotZ;
+};
+
+} // end namespace simulator
+} // end namespace flair
+
+#endif // FIXEDCAMERA_H
Index: /trunk/lib/FlairSimulator/src/FollowMeCamera.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/FollowMeCamera.cpp	(revision 69)
+++ /trunk/lib/FlairSimulator/src/FollowMeCamera.cpp	(revision 69)
@@ -0,0 +1,101 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2012/08/21
+//  filename:   FollowMeCamera.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    classe definissant une animation poursuite pour camera
+//
+/*********************************************************************/
+#ifdef GL
+
+#include "FollowMeCamera.h"
+#include "Simulator.h"
+#include "Model.h"
+#include "Model_impl.h"
+#include "Gui.h"
+#include <ICursorControl.h>
+#include <ICameraSceneNode.h>
+#include <IrrlichtDevice.h>
+#include <ISceneManager.h>
+
+using namespace irr;
+using namespace gui;
+using namespace core;
+using namespace scene;
+
+namespace flair {
+namespace simulator {
+
+FollowMeCamera::FollowMeCamera(const ISceneNode *parent, float rotateSpeed,
+                             float zoomSpeed):VisualizationCamera(rotateSpeed,zoomSpeed)  {
+  this->parent = parent;
+  RotY = 20;
+  RotZ = 0;
+  Rotating = false;
+}
+
+FollowMeCamera::~FollowMeCamera() {}
+
+void FollowMeCamera::setPositionOffset(vector3df newpos) { pos_offset = newpos; }
+
+void FollowMeCamera::setTargetOffset(vector3df newpos) {
+  target_offset = newpos;
+}
+
+float FollowMeCamera::sat(float value) {
+  if (value > 89)
+    value = 89;
+  if (value < -89)
+    value = -89;
+  return value;
+}
+
+void FollowMeCamera::animateNode(ISceneNode *node, u32 timeMs) {
+  vector3df pos;
+
+  float nRotY = RotY;
+  float nRotZ = RotZ;
+
+  if (LMouseKey == true) {
+    if (!Rotating) {
+      RotateStart = MousePos;
+      Rotating = true;
+      nRotY = RotY;
+      nRotZ = RotZ;
+    } else {
+      nRotY += (RotateStart.Y - MousePos.Y) * rotateSpeed;
+      nRotZ += (RotateStart.X - MousePos.X) * rotateSpeed;
+      nRotY = sat(nRotY);
+    }
+  } else if (Rotating) {
+    RotY += (RotateStart.Y - MousePos.Y) * rotateSpeed;
+    RotZ += (RotateStart.X - MousePos.X) * rotateSpeed;
+    RotY = sat(RotY);
+    nRotY = RotY;
+    nRotZ = RotZ;
+    Rotating = false;
+  }
+
+  pos.X = -currentZoom;
+  pos.Y = 0;
+  pos.Z = 0;
+
+  pos.rotateXZBy(-nRotY);
+  pos.rotateXYBy(getSimulator()->Yaw() + nRotZ + parent->getRotation().Z);
+
+  camera->setPosition(parent->getPosition() + pos + pos_offset);
+  camera->setTarget(parent->getPosition() + target_offset);
+}
+
+
+} // end namespace simulator
+} // end namespace flair
+
+#endif // GL
Index: /trunk/lib/FlairSimulator/src/GenericObject.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/GenericObject.cpp	(revision 68)
+++ /trunk/lib/FlairSimulator/src/GenericObject.cpp	(revision 69)
@@ -19,18 +19,11 @@
 #include "Simulator_impl.h"
 
-#include "ConditionVariable.h"
 #include "Quaternion.h"
-#include "Gui.h"
-#include "Gui_impl.h"
-#include <IMesh.h>
 #include <ISceneManager.h>
-#include <IMetaTriangleSelector.h>
-#include <IVideoDriver.h>
-#include "AnimPoursuite.h"
+
 using namespace irr;
 using namespace video;
 using namespace scene;
 using namespace core;
-using namespace io;
 
 using namespace flair::core;
Index: /trunk/lib/FlairSimulator/src/Gui.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/Gui.cpp	(revision 68)
+++ /trunk/lib/FlairSimulator/src/Gui.cpp	(revision 69)
@@ -19,14 +19,8 @@
 #include "Gui_impl.h"
 #include "Simulator.h"
-#include "Simulator_impl.h"
 #include "Model.h"
-#include "Model_impl.h"
-#include "AnimPoursuite.h"
-#include <Euler.h>
-#include <Object.h>
 #include <IMeshSceneNode.h>
 #include <IVideoDriver.h>
 #include <ISceneManager.h>
-#include <unistd.h>
 #include <algorithm>
 #include <GL/gl.h>
@@ -37,5 +31,5 @@
 
 void constructor() {
-  compile_info("FlairSensorActuator");
+  compile_info("FlairSimulator");
 }
 
Index: /trunk/lib/FlairSimulator/src/Gui.h
===================================================================
--- /trunk/lib/FlairSimulator/src/Gui.h	(revision 68)
+++ /trunk/lib/FlairSimulator/src/Gui.h	(revision 69)
@@ -62,8 +62,8 @@
   irr::scene::IAnimatedMesh *getMesh(std::string filename) const;
   irr::scene::ISceneManager *getSceneManager(void) const;
+  irr::IrrlichtDevice *getDevice(void) const;
   float getAspectRatio(void) const;
 
 protected:
-  irr::IrrlichtDevice *getDevice(void) const;
   void setMesh(std::string file,
                irr::core::vector3df position = irr::core::vector3df(0, 0, 0),
Index: /trunk/lib/FlairSimulator/src/Gui_impl.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/Gui_impl.cpp	(revision 68)
+++ /trunk/lib/FlairSimulator/src/Gui_impl.cpp	(revision 69)
@@ -22,5 +22,4 @@
 #include "Model.h"
 #include "Model_impl.h"
-#include "AnimPoursuite.h"
 #include <Object.h>
 #include <Euler.h>
@@ -40,14 +39,9 @@
 public:
   // This is the one method that we have to implement
-  virtual bool OnEvent(const SEvent &event) {
+  bool OnEvent(const SEvent &event) {
     // Remember whether each key is down or up
     if (event.EventType == EET_KEY_INPUT_EVENT)
       KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown;
 
-    // Send all other events to camera
-    if (event.EventType == EET_MOUSE_INPUT_EVENT && camera)
-      // return camera->OnEvent(event);
-      return camera->MouseMoved(event, cursorControl->getRelativePosition());
-
     if (model)
       return model->OnEvent(event);
@@ -57,5 +51,5 @@
 
   // This is used to check whether a key is being held down
-  virtual bool IsKeyDown(EKEY_CODE keyCode) {
+  bool IsKeyDown(EKEY_CODE keyCode) {
     if (KeyIsDown[keyCode] == true) {
       KeyIsDown[keyCode] = false;
@@ -66,12 +60,9 @@
   }
 
-  MyEventReceiver(ICursorControl *cursorControl) {
-    this->cursorControl = cursorControl;
-    camera = NULL;
+  MyEventReceiver(void) {
     model = NULL;
     for (u32 i = 0; i < KEY_KEY_CODES_COUNT; ++i)
       KeyIsDown[i] = false;
   }
-  void SetCamera(AnimPoursuite *camera) { this->camera = camera; }
   void SetModel(Model *model) { this->model = model; }
 
@@ -79,7 +70,5 @@
   // We use this array to store the current state of each key
   bool KeyIsDown[KEY_KEY_CODES_COUNT];
-  AnimPoursuite *camera;
   Model *model;
-  ICursorControl *cursorControl;
 };
 
@@ -96,5 +85,5 @@
   device = createDevice(driver_type, dimension2d<u32>(app_width, app_height),
                         16, false, false, false);
-  receiver = new MyEventReceiver(device->getCursorControl());
+  receiver = new MyEventReceiver();
   device->setEventReceiver(receiver);
   device->getLogger()->setLogLevel(ELL_NONE);
@@ -109,4 +98,17 @@
   smgr->setAmbientLight(video::SColorf(1, 1, 1));
 
+/*
+   // camera
+  camera = smgr->addCameraSceneNode();
+
+  camera->setAspectRatio(
+      (float)scene_width / (float)scene_height); // on force a cause du view port
+
+  camera->setUpVector(vector3df(0, 0, 1));
+
+  FixedCamera* animator = new FixedCamera(vector3df(1,1,1));
+  camera->addAnimator(animator);
+
+  camera->setFarValue(8000);*/
   /*
 env = device->getGUIEnvironment();
@@ -185,5 +187,4 @@
   int cam_id = 0;
 
-  receiver->SetCamera(models.at(cam_id)->pimpl_->animator);
   receiver->SetModel(models.at(cam_id));
 
@@ -199,6 +200,5 @@
     }
     for (size_t j = 0; j < models.size(); j++) {
-      if (i == j)
-        continue;
+      if (i == j) continue;
       models.at(i)->pimpl_->MetaTriangleSelector()->addTriangleSelector(
           models.at(j)->pimpl_->TriangleSelector());
@@ -247,5 +247,5 @@
 
     // vue poursuite
-    smgr->setActiveCamera(models.at(cam_id)->pimpl_->camera);
+    smgr->setActiveCamera(models.at(cam_id)->getFollowMeCamera()->getCameraSceneNode());
     driver->setViewPort(core::rect<s32>(0, 0, scene_width, scene_height));
     smgr->drawAll(); // commente voir plus bas
@@ -279,5 +279,5 @@
     // mais a priori souci avec models.at(i)->pimpl_->CheckCollision();
     // (setelipsoid?)
-    smgr->setActiveCamera(models.at(cam_id)->pimpl_->camera);
+    smgr->setActiveCamera(models.at(cam_id)->getFollowMeCamera()->getCameraSceneNode());
     driver->setViewPort(core::rect<s32>(0, 0, scene_width, scene_height));
     smgr->drawAll();
@@ -294,7 +294,5 @@
     if (receiver->IsKeyDown(KEY_PRIOR)) {
       cam_id++;
-      if (cam_id >= (int)models.size())
-        cam_id = 0;
-      receiver->SetCamera(models.at(cam_id)->pimpl_->animator);
+      if (cam_id >= (int)models.size()) cam_id = 0;
       receiver->SetModel(models.at(cam_id));
       setWindowCaption(models.at(cam_id), fps);
@@ -302,7 +300,5 @@
     if (receiver->IsKeyDown(KEY_NEXT)) {
       cam_id--;
-      if (cam_id < 0)
-        cam_id = models.size() - 1;
-      receiver->SetCamera(models.at(cam_id)->pimpl_->animator);
+      if (cam_id < 0) cam_id = models.size() - 1;
       receiver->SetModel(models.at(cam_id));
       setWindowCaption(models.at(cam_id), fps);
@@ -355,5 +351,4 @@
   }
 
-  receiver->SetCamera(NULL);
   receiver->SetModel(NULL);
 }
Index: /trunk/lib/FlairSimulator/src/Man.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/Man.cpp	(revision 68)
+++ /trunk/lib/FlairSimulator/src/Man.cpp	(revision 69)
@@ -25,5 +25,5 @@
 #include <Tab.h>
 #include <DoubleSpinBox.h>
-#include "AnimPoursuite.h"
+#include "FollowMeCamera.h"
 
 using namespace irr;
@@ -47,6 +47,6 @@
   node->getMaterial(0).Lighting = false;
 
-  getCamera()->setPositionOffset(vector3df(0, 0, 100));
-  getCamera()->setTargetOffset(vector3df(0, 0, 100));
+  getFollowMeCamera()->setPositionOffset(vector3df(0, 0, 100));
+  getFollowMeCamera()->setTargetOffset(vector3df(0, 0, 100));
 
   setTriangleSelector(
Index: /trunk/lib/FlairSimulator/src/Model.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/Model.cpp	(revision 68)
+++ /trunk/lib/FlairSimulator/src/Model.cpp	(revision 69)
@@ -19,4 +19,5 @@
 #include "Simulator.h"
 #include "Simulator_impl.h"
+#include "FollowMeCamera.h"
 #include <DoubleSpinBox.h>
 
@@ -63,5 +64,5 @@
 aabbox3d<f32> *Model::Box() const { return &(pimpl_->box); }
 
-AnimPoursuite *Model::getCamera(void) const { return pimpl_->animator; }
+FollowMeCamera *Model::getFollowMeCamera(void) const { return pimpl_->camera; }
 
 void Model::setTriangleSelector(ITriangleSelector *selector) {
@@ -71,5 +72,5 @@
 }
 
-void Model::setCameraFarValue(float zf) { pimpl_->camera->setFarValue(zf); }
+void Model::setCameraFarValue(float zf) { pimpl_->camera->getCameraSceneNode()->setFarValue(zf); }
 #endif
 
Index: /trunk/lib/FlairSimulator/src/Model.h
===================================================================
--- /trunk/lib/FlairSimulator/src/Model.h	(revision 68)
+++ /trunk/lib/FlairSimulator/src/Model.h	(revision 69)
@@ -25,4 +25,5 @@
 #ifdef GL
 #include <aabbox3d.h>
+#include <IEventReceiver.h>
 namespace irr {
 class SEvent;
@@ -51,11 +52,14 @@
 namespace simulator {
 class Simulator;
-class AnimPoursuite;
+class FollowMeCamera;
 
-class Model : public core::IODevice {
+class Model : public core::IODevice
+#ifdef GL
+, public irr::IEventReceiver
+#endif
+ {
   friend class ::Gui_impl;
   friend class ::Simulator_impl;
   friend class ::Model_impl;
-  friend class AnimPoursuite;
   friend class sensor::SensorGL;
 
@@ -80,5 +84,7 @@
   virtual void WritedbtBuf(char *dbtbuf) = 0;
   virtual void ReaddbtBuf(char *dbtbuf) = 0;
-  virtual bool OnEvent(const irr::SEvent &event) = 0;
+
+  //default event handling
+  bool OnEvent(const irr::SEvent &event) { return false;};
 
   //! Sets the value of the camera's far clipping plane (default: 2000.0f)
@@ -93,5 +99,5 @@
   virtual void CalcModel(void) = 0;
 #ifdef GL
-  AnimPoursuite *getCamera(void) const;
+  FollowMeCamera *getFollowMeCamera(void) const;
   virtual void AnimateModel(void) = 0;
   // void setPosition(core::Vector3D pos);
Index: /trunk/lib/FlairSimulator/src/Model_impl.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/Model_impl.cpp	(revision 68)
+++ /trunk/lib/FlairSimulator/src/Model_impl.cpp	(revision 69)
@@ -37,5 +37,6 @@
 #include <IVideoDriver.h>
 #include <ICameraSceneNode.h>
-#include "AnimPoursuite.h"
+#include "FollowMeCamera.h"
+
 using namespace irr;
 using namespace video;
@@ -82,12 +83,5 @@
 
   // camera
-  camera = getSceneManager()->addCameraSceneNode();
-  camera->setAspectRatio(
-      getGui()->getAspectRatio()); // on force a cause du view port
-  camera->setUpVector(vector3df(0, 0, 1));
-
-  animator = new AnimPoursuite(this);
-  camera->addAnimator(animator);
-  camera->setFarValue(8000);
+  camera = new FollowMeCamera(this);
 
   position_init = false;
Index: /trunk/lib/FlairSimulator/src/Parser.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/Parser.cpp	(revision 68)
+++ /trunk/lib/FlairSimulator/src/Parser.cpp	(revision 69)
@@ -20,5 +20,6 @@
 #include "GenericObject.h"
 #include <vector3d.h>
-#include <irrlicht.h>
+#include <IrrlichtDevice.h>
+#include <IFileSystem.h>
 #include "GenericObject.h"
 
Index: /trunk/lib/FlairSimulator/src/VisualizationCamera.cpp
===================================================================
--- /trunk/lib/FlairSimulator/src/VisualizationCamera.cpp	(revision 69)
+++ /trunk/lib/FlairSimulator/src/VisualizationCamera.cpp	(revision 69)
@@ -0,0 +1,92 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2016/09/01
+//  filename:   VisualizationCamera.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    class for a visualization camera in the gui
+//
+/*********************************************************************/
+#ifdef GL
+
+#include "VisualizationCamera.h"
+#include "Simulator.h"
+#include "Model.h"
+#include "Model_impl.h"
+#include "Gui.h"
+#include <ICursorControl.h>
+#include <ICameraSceneNode.h>
+#include <IrrlichtDevice.h>
+#include <ISceneManager.h>
+
+using namespace irr;
+using namespace gui;
+using namespace core;
+using namespace scene;
+
+namespace flair {
+namespace simulator {
+
+VisualizationCamera::VisualizationCamera(float inRotateSpeed,float inZoomSpeed) {
+  zoomSpeed = inZoomSpeed;
+  rotateSpeed = inRotateSpeed;
+  currentZoom = 100;
+  LMouseKey = false;
+
+   // camera
+  camera = getGui()->getSceneManager()->addCameraSceneNode();
+  camera->setAspectRatio(getGui()->getAspectRatio()); // on force a cause du view port
+  camera->setUpVector(vector3df(0, 0, 1));
+  camera->addAnimator(this);
+  camera->setFarValue(8000);
+}
+
+VisualizationCamera::~VisualizationCamera() {}
+
+ICameraSceneNode *VisualizationCamera::getCameraSceneNode(void) {
+  return camera;
+}
+
+ISceneNodeAnimator *VisualizationCamera::createClone(ISceneNode *node,
+                                               ISceneManager *newManager) {
+  return NULL;
+}
+
+bool VisualizationCamera::OnEvent(const irr::SEvent& event) {
+  if (event.EventType != EET_MOUSE_INPUT_EVENT)
+    return false;
+
+  switch (event.MouseInput.Event) {
+
+  case EMIE_MOUSE_WHEEL:
+    currentZoom -= event.MouseInput.Wheel * zoomSpeed;
+    if (currentZoom <= 0)
+      currentZoom = zoomSpeed;
+    break;
+  case EMIE_LMOUSE_PRESSED_DOWN:
+    LMouseKey = true;
+    break;
+  case EMIE_LMOUSE_LEFT_UP:
+    LMouseKey = false;
+    break;
+  case EMIE_MOUSE_MOVED:
+    MousePos = getGui()->getDevice()->getCursorControl()->getRelativePosition();
+    break;
+  default:
+    return false;
+    break;
+  }
+
+  return true;
+}
+
+} // end namespace simulator
+} // end namespace flair
+
+#endif // GL
Index: /trunk/lib/FlairSimulator/src/VisualizationCamera.h
===================================================================
--- /trunk/lib/FlairSimulator/src/VisualizationCamera.h	(revision 69)
+++ /trunk/lib/FlairSimulator/src/VisualizationCamera.h	(revision 69)
@@ -0,0 +1,58 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2016/09/01
+//  filename:   VisualizationCamera.h
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    cclass for a visualization camera in the gui
+//
+/*********************************************************************/
+
+#ifndef VISUALIZATIONCAMERA_H
+#define VISUALIZATIONCAMERA_H
+
+#include <ISceneNodeAnimator.h>
+#include <position2d.h>
+#include <Vector3D.h>
+
+namespace irr {
+  namespace scene {
+    class ICameraSceneNode;
+  }
+}
+
+namespace flair {
+namespace simulator {
+
+class VisualizationCamera : private irr::scene::ISceneNodeAnimator {
+public:
+  VisualizationCamera(float rotateSpeed = -500.0f, float zoomSpeed = 4.0f);
+  ~VisualizationCamera();
+
+  ISceneNodeAnimator *createClone(irr::scene::ISceneNode *node,
+                                  irr::scene::ISceneManager *newManager = 0);
+  virtual bool OnEvent(const irr::SEvent& event);
+  irr::scene::ICameraSceneNode *getCameraSceneNode(void);
+
+private:
+  virtual bool isEventReceiverEnabled(void) const { return true; }
+
+protected:
+  bool LMouseKey;
+  irr::scene::ICameraSceneNode *camera;
+  irr::core::position2df MousePos;
+  float rotateSpeed;
+  float zoomSpeed;
+  float currentZoom;
+};
+
+} // end namespace simulator
+} // end namespace flair
+
+#endif // VISUALIZATIONCAMERA_H
Index: /trunk/lib/FlairSimulator/src/X4.h
===================================================================
--- /trunk/lib/FlairSimulator/src/X4.h	(revision 68)
+++ /trunk/lib/FlairSimulator/src/X4.h	(revision 69)
@@ -66,5 +66,4 @@
   void CalcModel(void);
 #ifdef GL
-  bool OnEvent(const irr::SEvent &event){};
   void AnimateModel(void);
   size_t dbtSize(void) const;
Index: /trunk/lib/FlairSimulator/src/X8.h
===================================================================
--- /trunk/lib/FlairSimulator/src/X8.h	(revision 68)
+++ /trunk/lib/FlairSimulator/src/X8.h	(revision 69)
@@ -66,5 +66,4 @@
   void CalcModel(void);
 #ifdef GL
-  bool OnEvent(const irr::SEvent &event){};
   void AnimateModel(void);
   size_t dbtSize(void) const;
Index: unk/lib/FlairSimulator/src/unexported/AnimPoursuite.h
===================================================================
--- /trunk/lib/FlairSimulator/src/unexported/AnimPoursuite.h	(revision 68)
+++ 	(revision )
@@ -1,59 +1,0 @@
-// %flair:license{
-// This file is part of the Flair framework distributed under the
-// CECILL-C License, Version 1.0.
-// %flair:license}
-//  created:    2012/08/21
-//  filename:   AnimPoursuite.h
-//
-//  author:     Guillaume Sanahuja
-//              Copyright Heudiasyc UMR UTC/CNRS 7253
-//
-//  version:    $Id: $
-//
-//  purpose:    classe definissant une animation poursuite pour camera
-//
-/*********************************************************************/
-
-#ifndef ANIMPOURSUITE_H
-#define ANIMPOURSUITE_H
-
-#include <ISceneNodeAnimator.h>
-#include <position2d.h>
-#include <vector3d.h>
-
-namespace flair {
-namespace simulator {
-
-class AnimPoursuite : public irr::scene::ISceneNodeAnimator {
-public:
-  AnimPoursuite(const irr::scene::ISceneNode *parent,
-                float rotateSpeed = -500.0f, float zoomSpeed = 4.0f);
-  ~AnimPoursuite();
-
-  void animateNode(irr::scene::ISceneNode *node, irr::u32 timeMs);
-  ISceneNodeAnimator *createClone(irr::scene::ISceneNode *node,
-                                  irr::scene::ISceneManager *newManager = 0);
-  bool MouseMoved(const irr::SEvent &event, irr::core::position2df MousePos);
-  void setPositionOffset(irr::core::vector3df newpos);
-  void setTargetOffset(irr::core::vector3df newpos);
-
-private:
-  virtual bool isEventReceiverEnabled(void) const { return true; }
-
-  irr::core::vector3df pos_offset, target_offset;
-  bool LMouseKey;
-  irr::core::position2df RotateStart;
-  irr::core::position2df MousePos;
-  const irr::scene::ISceneNode *parent;
-  bool Rotating;
-  float RotY, RotZ;
-  float rotateSpeed;
-  float zoomSpeed;
-  float currentZoom;
-  float sat(float value);
-};
-
-} // end namespace simulator
-} // end namespace flair
-
-#endif // ANIMPOURSUITE_H
Index: /trunk/lib/FlairSimulator/src/unexported/FollowMeCamera.h
===================================================================
--- /trunk/lib/FlairSimulator/src/unexported/FollowMeCamera.h	(revision 69)
+++ /trunk/lib/FlairSimulator/src/unexported/FollowMeCamera.h	(revision 69)
@@ -0,0 +1,48 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2012/08/21
+//  filename:   FollowMeCamera.h
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    classe definissant une animation poursuite pour camera
+//
+/*********************************************************************/
+
+#ifndef FOLLOWMECAMERA_H
+#define FOLLOWMECAMERA_H
+
+#include "VisualizationCamera.h"
+
+
+namespace flair {
+namespace simulator {
+
+class FollowMeCamera : public VisualizationCamera {
+public:
+  FollowMeCamera(const irr::scene::ISceneNode *parent,
+                float rotateSpeed = -500.0f, float zoomSpeed = 4.0f);
+  ~FollowMeCamera();
+
+  void animateNode(irr::scene::ISceneNode *node, irr::u32 timeMs);
+  void setPositionOffset(irr::core::vector3df newpos);
+  void setTargetOffset(irr::core::vector3df newpos);
+
+private:
+  irr::core::vector3df pos_offset, target_offset;
+  irr::core::position2df RotateStart;
+  const irr::scene::ISceneNode *parent;
+  bool Rotating;
+  float RotY, RotZ;
+  float sat(float value);
+};
+
+} // end namespace simulator
+} // end namespace flair
+
+#endif // FOLLOWMECAMERA_H
Index: /trunk/lib/FlairSimulator/src/unexported/GenericObject.h
===================================================================
--- /trunk/lib/FlairSimulator/src/unexported/GenericObject.h	(revision 68)
+++ /trunk/lib/FlairSimulator/src/unexported/GenericObject.h	(revision 69)
@@ -29,5 +29,5 @@
 #include <IVideoDriver.h>
 #include <ICameraSceneNode.h>
-#include "AnimPoursuite.h"
+#include "FollowMeCamera.h"
 
 #include <IODevice.h>
Index: /trunk/lib/FlairSimulator/src/unexported/Gui_impl.h
===================================================================
--- /trunk/lib/FlairSimulator/src/unexported/Gui_impl.h	(revision 68)
+++ /trunk/lib/FlairSimulator/src/unexported/Gui_impl.h	(revision 69)
@@ -30,4 +30,5 @@
 class IMeshSceneNode;
 class ITriangleSelector;
+//class ICameraSceneNode;
 }
 namespace video {
@@ -48,4 +49,5 @@
 class GenericObject;
 class Gui;
+class FixedCamera;
 }
 }
@@ -83,5 +85,7 @@
   size_t dbtSize(std::vector<flair::simulator::Model *> modeles);
   char *dbtbuf;
+  flair::simulator::FixedCamera *fixedCamera;
   flair::simulator::Gui *self;
+  //irr::scene::ICameraSceneNode * camera;
 };
 
Index: /trunk/lib/FlairSimulator/src/unexported/Model_impl.h
===================================================================
--- /trunk/lib/FlairSimulator/src/unexported/Model_impl.h	(revision 68)
+++ /trunk/lib/FlairSimulator/src/unexported/Model_impl.h	(revision 69)
@@ -38,5 +38,5 @@
 namespace simulator {
 class Simulator;
-class AnimPoursuite;
+class FollowMeCamera;
 }
 }
@@ -52,5 +52,4 @@
 class IMetaTriangleSelector;
 class ISceneNodeAnimatorCollisionResponse;
-class ICameraSceneNode;
 }
 }
@@ -94,6 +93,5 @@
   irr::core::aabbox3d<irr::f32> box;
   void SynchronizationPoint();
-  irr::scene::ICameraSceneNode *camera;
-  flair::simulator::AnimPoursuite *animator;
+  flair::simulator::FollowMeCamera *camera;
   irr::scene::ITriangleSelector *selector;
 #endif
