Changeset 70 in flair-src for trunk/lib/FlairSimulator/src/VisualizationCamera.cpp
- Timestamp:
- Sep 6, 2016, 5:49:32 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSimulator/src/VisualizationCamera.cpp
r69 r70 21 21 #include "Model_impl.h" 22 22 #include "Gui.h" 23 #include "Gui_impl.h" 23 24 #include <ICursorControl.h> 24 25 #include <ICameraSceneNode.h> … … 34 35 namespace simulator { 35 36 36 VisualizationCamera::VisualizationCamera(float inRotateSpeed,float inZoomSpeed) { 37 zoomSpeed = inZoomSpeed; 38 rotateSpeed = inRotateSpeed; 39 currentZoom = 100; 37 VisualizationCamera::VisualizationCamera(std::string inName) { 38 name=inName; 39 currentZoom = 0; 40 40 LMouseKey = false; 41 41 … … 46 46 camera->addAnimator(this); 47 47 camera->setFarValue(8000); 48 49 getGui()->pimpl_->AddVisualizationCamera(this); 48 50 } 49 51 50 52 VisualizationCamera::~VisualizationCamera() {} 53 54 std::string VisualizationCamera::getName(void) { 55 return name; 56 } 51 57 52 58 ICameraSceneNode *VisualizationCamera::getCameraSceneNode(void) { … … 66 72 67 73 case EMIE_MOUSE_WHEEL: 68 currentZoom -= event.MouseInput.Wheel * zoomSpeed; 69 if (currentZoom <= 0) 70 currentZoom = zoomSpeed; 74 currentZoom -= event.MouseInput.Wheel; 71 75 break; 72 76 case EMIE_LMOUSE_PRESSED_DOWN:
Note:
See TracChangeset
for help on using the changeset viewer.