1 #ifndef ui3dviewerbody_h 2 #define ui3dviewerbody_h 28 class PolygonSelection;
33 class DataObjectGroup;
37 namespace osgViewer {
class CompositeViewer;
class View;
class GraphicsWindow; }
38 namespace osgGeo {
class TrackballManipulator; }
41 class TrackBallManipulatorMessenger;
49 class GraphicsContext;
51 class MatrixTransform;
63 friend class TrackBallManipulatorMessenger;
69 void viewAll(
bool animate);
75 bool serializeScene(
const char*)
const;
77 void setBackgroundColor(
const Color&);
78 Color getBackgroundColor()
const;
81 float getMouseWheelZoomFactor()
const;
84 void setMouseWheelZoomFactor(
float);
86 void setReversedMouseWheelDirection(
bool);
87 bool getReversedMouseWheelDirection()
const;
89 void setHomePos(
const IOPar&);
90 void resetToHomePosition();
92 void toggleCameraType();
93 bool isCameraPerspective()
const;
94 bool isCameraOrthographic()
const;
105 void uiRotate(
float angle,
bool horizontal);
106 void uiZoom(
float rel,
const osg::Vec3f* dir=0);
107 void setCameraZoom(
float val);
108 float getCameraZoom()
const;
111 bool isViewMode()
const;
112 virtual void setViewMode(
bool viewmode,
bool trigger);
114 Coord3 getCameraPosition()
const;
124 void setAnimationEnabled(
bool);
125 bool isAnimationEnabled()
const;
126 void showRotAxis(
bool);
127 bool isAxisShown()
const;
128 void setAnnotColor(
const Color&);
129 void setAnnotationFont(
const FontData&);
136 void fillCameraPos(
IOPar&)
const;
137 bool useCameraPos(
const IOPar&);
140 void setScenesPixelDensity(
float dpi);
146 void setStereoOffset(
float);
147 float getStereoOffset()
const;
149 void setMapView(
bool yn);
157 void enableDragging(
bool yn );
163 virtual void updateActModeCursor();
167 void notifyManipulatorMovement(
168 float dh,
float dv,
float df);
174 void handleGestureEvent(QGestureEvent*);
175 static osgViewer::CompositeViewer* getCompositeViewer();
178 virtual osgViewer::GraphicsWindow& getGraphicsWindow() = 0;
179 virtual osg::GraphicsContext* getGraphicsContext() = 0;
183 void requestRedraw();
185 osg::Camera* getOsgCamera();
186 const osg::Camera* getOsgCamera()
const;
187 void setCameraPos(
const osg::Vec3f&,
188 const osg::Vec3f&,
bool);
191 void enableThumbWheelHandling(
bool yn,
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
bool isHomePosEmpty()
Definition: ui3dviewerbody.h:135
keep osg camera status and render info
Definition: viscamera.h:30
osg::Switch * offscreenrenderswitch_
Definition: ui3dviewerbody.h:204
Definition of a mouse cursor, can be either a predefined shape (from the enum, or a file...
Definition: mousecursor.h:26
ui3DViewer & handle_
Definition: ui3dviewerbody.h:194
RefMan< visBase::DataObjectGroup > hudscene_
Definition: ui3dviewerbody.h:213
virtual uiObject & uiObjHandle()
Definition: i_uiobjqtbody.h:52
RefMan< visBase::Scene > scene_
Definition: ui3dviewerbody.h:198
bool isMapView() const
Definition: ui3dviewerbody.h:150
IOPar & printpar_
Definition: ui3dviewerbody.h:195
osgViewer::View * hudview_
Definition: ui3dviewerbody.h:211
uiEventFilter eventfilter_
Definition: ui3dviewerbody.h:215
uiMouseEventBlockerByGestures & mouseeventblocker_
Definition: ui3dviewerbody.h:216
const osgViewer::View * getOsgViewerHudView() const
Definition: ui3dviewerbody.h:139
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
Baseclass for different body implementation (direct & indirect) of OSG.
Definition: ui3dviewerbody.h:61
bool mapview_
Definition: ui3dviewerbody.h:228
The base class for most UI elements.
Definition: uiobj.h:38
Class for a swap callback. This class triggers on the second render that the context is up an running...
Definition: swapbuffercallback.h:26
Definition: uiparent.h:26
Definition: visthumbwheel.h:28
Data needed to make an actual font.
Definition: fontdata.h:20
osgViewer::CompositeViewer * compositeviewer_
Definition: ui3dviewerbody.h:205
RefMan< visBase::PolygonSelection > polygonselection_
Definition: ui3dviewerbody.h:218
FixedString None()
Definition: keystrs.h:90
const osgViewer::View * getOsgViewerMainView() const
Definition: ui3dviewerbody.h:138
is a class that is able to recieve events from Qt and trigger an OD-style notification/callback.
Definition: uieventfilter.h:28
RefMan< visBase::ThumbWheel > horthumbwheel_
Definition: ui3dviewerbody.h:199
WheelMode
Definition: ui3dviewerbody.h:120
RefMan< visBase::SceneColTab > visscenecoltab_
Definition: ui3dviewerbody.h:224
RefMan< visBase::Axes > axes_
Definition: ui3dviewerbody.h:217
Definition: vispolygonselection.h:40
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
ViewModeCursor
Definition: ui3dviewerbody.h:159
IOPar homepos_
Definition: ui3dviewerbody.h:223
Definition: ui3dviewerbody.h:159
StereoType
Definition: ui3dviewerbody.h:142
Definition: ui3dviewer.h:29
RefMan< visBase::ThumbWheel > verthumbwheel_
Definition: ui3dviewerbody.h:200
RefMan< visBase::ThumbWheel > distancethumbwheel_
Definition: ui3dviewerbody.h:201
SwapCallback * swapcallback_
Definition: ui3dviewerbody.h:221
KeyBindMan & keyBindMan()
Definition: ui3dviewerbody.h:152
RefMan< visBase::Camera > camera_
Definition: ui3dviewerbody.h:197
visBase::Camera * getVisCamera()
Definition: ui3dviewerbody.h:115
const visBase::Scene * getScene() const
Definition: ui3dviewerbody.h:73
int wheeldisplaymode_
Definition: ui3dviewerbody.h:202
A cartesian coordinate in 3D space.
Definition: coord.h:72
visBase::Scene * getScene()
Definition: ui3dviewerbody.h:72
KeyBindMan & keybindman_
Definition: ui3dviewerbody.h:226
float stereooffset_
Definition: ui3dviewerbody.h:209
Definition: visannot.h:43
Definition: visscenecoltab.h:30
Scene manages all DataObjects and has some managing functions such as the selection management and va...
Definition: visscene.h:40
TrackBallManipulatorMessenger * manipmessenger_
Definition: ui3dviewerbody.h:219
Open Scene Graph.
Definition: visannot.h:29
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Definition: uimouseeventblockerbygesture.h:27
Manages keybindings.
Definition: keybindings.h:75
osg::Switch * offscreenrenderhudswitch_
Definition: ui3dviewerbody.h:212
osgViewer::View * view_
Definition: ui3dviewerbody.h:206
#define mClass(module)
Definition: commondefs.h:164
MouseCursor actmodecursor_
Definition: ui3dviewerbody.h:165
osg::Viewport * viewport_
Definition: ui3dviewerbody.h:207
StereoType stereotype_
Definition: ui3dviewerbody.h:208