Go to the documentation of this file.
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);
125 osgGA::GUIActionAdapter& actionAdapter);
virtual void makeUpright()
Removes roll of the camera, so that the top of the view is towards the Y direction.
Definition: OsgTrackballZoomManipulator.cpp:121
virtual void setMinZoomFactor(double factor)
Sets the minimum zoom factor (zoomed out)
Definition: OsgTrackballZoomManipulator.cpp:42
void updateCamera(osg::Camera &camera) override
Definition: OsgTrackballZoomManipulator.cpp:213
double getZoomFactor() const
Gets the current zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:82
virtual void setMaxZoomAmount(double amount)
Sets the maximum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.cpp:69
virtual bool handle(const osgGA::GUIEventAdapter &eventAdapter, osgGA::GUIActionAdapter &actionAdapter)
Handle keyboard CTRL-U events to make the view upright.
Definition: OsgTrackballZoomManipulator.cpp:149
double getMinZoomAmount() const
Gets the minimum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.cpp:64
Trackball manipulator that uses the mouse wheel to control zoom amount.
Definition: OsgTrackballZoomManipulator.h:32
Definition: CompoundShapeToGraphics.cpp:29
virtual bool handleMouseWheel(const osgGA::GUIEventAdapter &eventAdapter, osgGA::GUIActionAdapter &actionAdapter)
Handle mouse wheel scrolling to zoom in or out.
Definition: OsgTrackballZoomManipulator.cpp:184
double m_maxZoomAmount
Maximum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.h:105
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 zoom(double zoomPercent)
Zoom by a percent of the difference between the current zoom amount and minimum zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:96
double m_zoomFactorScale
Scaling factor applied to the zoom factor before it is applied to the FOV.
Definition: OsgTrackballZoomManipulator.h:112
virtual void setMaxZoomFactor(double factor)
Sets the maximum zoom factor (zoomed out)
Definition: OsgTrackballZoomManipulator.cpp:51
double getZoomFactorScale() const
Gets the current zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:91
double m_maxZoomFactor
Maximum zoom factor value (zoomed out)
Definition: OsgTrackballZoomManipulator.h:98
double m_minZoomAmount
Minimum amount to change the zoom factor in one step This minimum prevents zooming by infinitely smal...
Definition: OsgTrackballZoomManipulator.h:102
OsgTrackballZoomManipulator()
Initializes the zoom parameters to default values.
Definition: OsgTrackballZoomManipulator.cpp:31
double getMinZoomFactor() const
Gets the minimum zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:46
virtual void setZoomFactor(double factor)
Sets the current zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:78
double getMaxZoomFactor() const
Gets the maximum zoom factor.
Definition: OsgTrackballZoomManipulator.cpp:55
double m_zoomFactor
Current zoom factor Larger values are zoomed out, smaller values are zoomed in.
Definition: OsgTrackballZoomManipulator.h:109
double getMaxZoomAmount() const
Gets the maximum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.cpp:73
virtual void setMinZoomAmount(double amount)
Sets the minimum amount to change the zoom factor in one step.
Definition: OsgTrackballZoomManipulator.cpp:60
double m_minZoomFactor
Minimum zoom factor value (zoomed in)
Definition: OsgTrackballZoomManipulator.h:96