Ignore:
Timestamp:
09/06/16 17:49:32 (5 years ago)
Author:
Sanahuja Guillaume
Message:

simu cameras

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSimulator/src/VisualizationCamera.cpp

    r69 r70  
    2121#include "Model_impl.h"
    2222#include "Gui.h"
     23#include "Gui_impl.h"
    2324#include <ICursorControl.h>
    2425#include <ICameraSceneNode.h>
     
    3435namespace simulator {
    3536
    36 VisualizationCamera::VisualizationCamera(float inRotateSpeed,float inZoomSpeed) {
    37   zoomSpeed = inZoomSpeed;
    38   rotateSpeed = inRotateSpeed;
    39   currentZoom = 100;
     37VisualizationCamera::VisualizationCamera(std::string inName) {
     38  name=inName;
     39  currentZoom = 0;
    4040  LMouseKey = false;
    4141
     
    4646  camera->addAnimator(this);
    4747  camera->setFarValue(8000);
     48
     49  getGui()->pimpl_->AddVisualizationCamera(this);
    4850}
    4951
    5052VisualizationCamera::~VisualizationCamera() {}
     53
     54std::string VisualizationCamera::getName(void) {
     55  return name;
     56}
    5157
    5258ICameraSceneNode *VisualizationCamera::getCameraSceneNode(void) {
     
    6672
    6773  case EMIE_MOUSE_WHEEL:
    68     currentZoom -= event.MouseInput.Wheel * zoomSpeed;
    69     if (currentZoom <= 0)
    70       currentZoom = zoomSpeed;
     74    currentZoom -= event.MouseInput.Wheel;
    7175    break;
    7276  case EMIE_LMOUSE_PRESSED_DOWN:
Note: See TracChangeset for help on using the changeset viewer.