16 #ifndef SURGSIM_GRAPHICS_OSGTRACKBALLZOOMMANIPULATOR_H
17 #define SURGSIM_GRAPHICS_OSGTRACKBALLZOOMMANIPULATOR_H
19 #include <osgGA/TrackballManipulator>
88 virtual void zoom(
double zoomPercent);
118 virtual bool handle(
const osgGA::GUIEventAdapter& eventAdapter, osgGA::GUIActionAdapter& actionAdapter);
124 virtual bool handleMouseWheel(
const osgGA::GUIEventAdapter& eventAdapter, osgGA::GUIActionAdapter& actionAdapter);
virtual bool handle(const osgGA::GUIEventAdapter &eventAdapter, osgGA::GUIActionAdapter &actionAdapter)
Handle keyboard CTRL-U events to make the view upright.
Definition: OsgTrackballZoomManipulator.cpp:149
Definition: DriveElementFromInputBehavior.cpp:27
double m_zoomFactor
Current zoom factor Larger values are zoomed out, smaller values are zoomed in.
Definition: OsgTrackballZoomManipulator.h:109
virtual void setZoomFactor(double factor)
Sets the current zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:78
double getZoomFactorScale() const
Gets the current zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:91
double m_minZoomAmount
Minimum amount to change the zoom factor in one step This minimum prevents zooming by infinitely smal...
Definition: OsgTrackballZoomManipulator.h:102
double m_maxZoomAmount
Maximum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.h:105
virtual void setMaxZoomFactor(double factor)
Sets the maximum zoom factor (zoomed out)
Definition: OsgTrackballZoomManipulator.cpp:51
virtual void makeUpright()
Removes roll of the camera, so that the top of the view is towards the Y direction.
Definition: OsgTrackballZoomManipulator.cpp:121
double getZoomFactor() const
Gets the current zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:82
double m_zoomFactorScale
Scaling factor applied to the zoom factor before it is applied to the FOV.
Definition: OsgTrackballZoomManipulator.h:112
virtual bool handleMouseWheel(const osgGA::GUIEventAdapter &eventAdapter, osgGA::GUIActionAdapter &actionAdapter)
Handle mouse wheel scrolling to zoom in or out.
Definition: OsgTrackballZoomManipulator.cpp:184
double getMinZoomFactor() const
Gets the minimum zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:46
double getMinZoomAmount() const
Gets the minimum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.cpp:64
virtual void zoom(double zoomPercent)
Zoom by a percent of the difference between the current zoom amount and minimum zoom factor...
Definition: OsgTrackballZoomManipulator.cpp:96
double getMaxZoomFactor() const
Gets the maximum zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:55
virtual void setMaxZoomAmount(double amount)
Sets the maximum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.cpp:69
double getMaxZoomAmount() const
Gets the maximum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.cpp:73
OsgTrackballZoomManipulator()
Initializes the zoom parameters to default values.
Definition: OsgTrackballZoomManipulator.cpp:31
virtual void setZoomFactorScale(double factor)
Sets the scale applied to the zoom factor before it is applied to the FOV.
Definition: OsgTrackballZoomManipulator.cpp:87
virtual void setMinZoomAmount(double amount)
Sets the minimum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.cpp:60
Trackball manipulator that uses the mouse wheel to control zoom amount.
Definition: OsgTrackballZoomManipulator.h:32
double m_maxZoomFactor
Maximum zoom factor value (zoomed out)
Definition: OsgTrackballZoomManipulator.h:98
double m_minZoomFactor
Minimum zoom factor value (zoomed in)
Definition: OsgTrackballZoomManipulator.h:96
virtual void setMinZoomFactor(double factor)
Sets the minimum zoom factor (zoomed out)
Definition: OsgTrackballZoomManipulator.cpp:42