OpendTect  7.0
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
ui3DViewerBody Class Referenceabstract

Baseclass for different body implementation (direct & indirect) of OSG. More...

Inheritance diagram for ui3DViewerBody:
[legend]

Public Types

enum  StereoType { None , RedCyan , QuadBuffer }
 
enum  WheelMode { Never , Always , OnHover }
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

virtual ~ui3DViewerBody ()
 
void align ()
 
void fillCameraPos (IOPar &) const
 
OD::Color getBackgroundColor () const
 
Coord3 getCameraPosition () const
 
float getCameraZoom () const
 
float getMouseWheelZoomFactor () const
 
const osgViewer::View * getOsgViewerHudView () const
 
const osgViewer::View * getOsgViewerMainView () const
 
visBase::PolygonSelectiongetPolygonSelector ()
 
bool getReversedMouseWheelDirection () const
 
visBase::ScenegetScene ()
 
const visBase::ScenegetScene () const
 
visBase::SceneColTabgetSceneColTab ()
 
float getStereoOffset () const
 
StereoType getStereoType () const
 
Geom::Size2D< int > getViewportSizePixels () const
 
visBase::CameragetVisCamera ()
 
WheelMode getWheelDisplayMode () const
 
bool isAnimationEnabled () const
 
bool isAxisShown () const
 
bool isCameraOrthographic () const
 
bool isCameraPerspective () const
 
bool isHomePosEmpty ()
 
bool isMapView () const
 
bool isViewMode () const
 
KeyBindMankeyBindMan ()
 
void removeSwapCallback (CallBacker *)
 
void resetHomePos ()
 
void resetToHomePosition ()
 
virtual void reSizeEvent (CallBacker *)
 
void saveHomePos ()
 
bool serializeScene (const char *) const
 
void setAnimationEnabled (bool)
 
void setAnnotationFont (const FontData &)
 
void setAnnotColor (const OD::Color &)
 
void setBackgroundColor (const OD::Color &)
 
void setCameraPerspective (bool yn)
 
void setCameraZoom (float val)
 
void setHomePos (const IOPar &)
 
void setMapView (bool yn)
 
void setMouseWheelZoomFactor (float)
 
void setReversedMouseWheelDirection (bool)
 
void setSceneID (SceneID)
 
void setScenesPixelDensity (float dpi)
 
void setStartupView ()
 
void setStereoOffset (float)
 
bool setStereoType (StereoType)
 
virtual void setViewMode (bool viewmode, bool trigger)
 
void setWheelDisplayMode (WheelMode)
 
void showRotAxis (bool)
 
void toggleCameraType ()
 
void toggleViewMode (CallBacker *)
 
void toHomePos ()
 
void uiRotate (float angle, bool horizontal)
 
void uiZoom (float rel, const osg::Vec3f *dir=0)
 
bool useCameraPos (const IOPar &)
 
void viewAll (bool animate)
 
void viewPlaneCrl ()
 
void viewPlaneInl ()
 
void viewPlaneN ()
 
void viewPlaneX ()
 
void viewPlaneY ()
 
void viewPlaneYZ ()
 
void viewPlaneZ ()
 
- Public Member Functions inherited from uiObjectBody
virtual ~uiObjectBody ()
 
virtual uiSize actualSize (bool include_border=true) const
 
void attach (constraintType, uiObject *other=nullptr, int margin=-1, bool reciprocal=true)
 
void attach (constraintType, uiParent *other=nullptr, int margin=-1, bool reciprocal=true)
 
void display (bool yn, bool shrink=false, bool maximized=false)
 
void finalize () override
 
bool finalized () const override
 
void fontchanged () override
 
int fontHeight () const
 
int fontWidth (bool max=false) const
 
int fontWidthFor (const char *) const
 
int fontWidthFor (const uiString &) const
 
bool isDisplayed () const
 
bool isHidden ()
 
bool itemInited () const
 
const i_LayoutItemlayoutItem () const
 
virtual uiSize minimumSize () const
 
i_LayoutItemmkLayoutItem (i_LayoutMngr &)
 
virtual int nrTxtLines () const
 
float prefHeightInCharSet () const
 
int prefHNrPics () const
 
int prefVNrPics () const
 
float prefWidthInCharSet () const
 
virtual void reDraw (bool)
 
void reParent (uiParentBody *pb)
 
void setCaption (const uiString &)
 
void setHSzPol (uiObject::SzPolicy)
 
void setMaximumHeight (int)
 
void setMaximumWidth (int)
 
void setMinimumHeight (int)
 
void setMinimumWidth (int)
 
void setPrefHeight (int)
 
void setPrefHeightInChar (float)
 
void setPrefWidth (int)
 
void setPrefWidthInChar (float)
 
void setShrinkAllowed (bool yn)
 
void setStretch (int, int)
 
void setToolTip (const uiString &)
 
void setVSzPol (uiObject::SzPolicy)
 
bool shrinkAllowed ()
 
virtual int stretch (bool, bool retUndef=false) const
 
uiObject::SzPolicy szPol (bool hor=true) const
 
OD::Color uibackgroundColor () const
 
bool uiCloseOK ()
 
const uiFontuifont () const
 
bool uihasFocus () const
 
bool uisensitive () const
 
void uisetBackgroundColor (const OD::Color &)
 
void uisetBackgroundPixmap (const uiPixmap &)
 
void uisetCaption (const uiString &capt)
 
void uisetFocus ()
 
void uisetFont (const uiFont &)
 
void uisetSensitive (bool yn=true)
 
void uisetTextColor (const OD::Color &)
 
bool uivisible () const
 
- Public Member Functions inherited from uiBody
virtual ~uiBody ()
 
virtual void clear ()
 
QWidget * qwidget ()
 can return 0 More...
 
const QWidget * qwidget () const
 can return 0 More...
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
const name_typename () const override
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Protected Types

enum  ViewModeCursor { RotateCursor , PanCursor , ZoomCursor , HoverCursor }
 

Protected Member Functions

 ui3DViewerBody (ui3DViewer &, uiParent *)
 
void enableDragging (bool yn)
 
void enableThumbWheelHandling (bool yn, const visBase::ThumbWheel *tw=0)
 
osgGeo::TrackballManipulator * getCameraManipulator () const
 
virtual osg::GraphicsContext * getGraphicsContext ()=0
 
virtual osgViewer::GraphicsWindow & getGraphicsWindow ()=0
 
osg::Camera * getOsgCamera ()
 
const osg::Camera * getOsgCamera () const
 
void handleGestureEvent (QGestureEvent *)
 
void mouseCursorChg (CallBacker *)
 
void notifyManipulatorMovement (float dh, float dv, float df)
 
void qtEventCB (CallBacker *)
 
void requestRedraw ()
 
void setCameraPos (const osg::Vec3f &, const osg::Vec3f &, bool)
 
void setFocusCB (CallBacker *)
 
void setupHUD ()
 
void setupTouch ()
 
void setupView ()
 
virtual void setViewModeCursor (ViewModeCursor)
 
void thumbWheelRotationCB (CallBacker *)
 
uiObjectuiObjHandle () override
 
virtual void updateActModeCursor ()
 
void viewAllCB (CallBacker *)
 
- Protected Member Functions inherited from uiObjectBody
 uiObjectBody (uiParent *, const char *nm)
 
void doDisplay (CallBacker *)
 
virtual void finalize_ ()
 
void loitemDeleted ()
 
virtual const QWidget * managewidg_ () const
 
virtual i_LayoutItemmkLayoutItem_ (i_LayoutMngr &mngr)
 
- Protected Member Functions inherited from uiBody
 uiBody ()
 
virtual const QWidget * qwidget_ () const =0
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Static Protected Member Functions

static osgViewer::CompositeViewer * getCompositeViewer ()
 

Protected Attributes

MouseCursor actmodecursor_
 
RefMan< visBase::Axesaxes_
 
RefMan< visBase::Cameracamera_
 
osgViewer::CompositeViewer * compositeviewer_
 
RefMan< visBase::ThumbWheeldistancethumbwheel_
 
uiEventFilter eventfilter_
 
ui3DViewerhandle_
 
IOPar homepos_
 
RefMan< visBase::ThumbWheelhorthumbwheel_
 
RefMan< visBase::DataObjectGrouphudscene_
 
osgViewer::View * hudview_
 
KeyBindMankeybindman_
 
TrackBallManipulatorMessengermanipmessenger_
 
bool mapview_
 
uiMouseEventBlockerByGesturesmouseeventblocker_
 
osg::Switch * offscreenrenderhudswitch_
 
osg::Switch * offscreenrenderswitch_
 
RefMan< visBase::PolygonSelectionpolygonselection_
 
IOParprintpar_
 
RefMan< visBase::Scenescene_
 
float stereooffset_
 
StereoType stereotype_
 
SwapCallbackswapcallback_
 
RefMan< visBase::ThumbWheelverthumbwheel_
 
osgViewer::View * view_
 
osg::Viewport * viewport_
 
RefMan< visBase::SceneColTabvisscenecoltab_
 
int wheeldisplaymode_
 
- Protected Attributes inherited from uiObjectBody
int hstretch_ = mUdf(int)
 
int vstretch_ = mUdf(int)
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Friends

class TrackBallManipulatorMessenger
 

Additional Inherited Members

- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Detailed Description

Baseclass for different body implementation (direct & indirect) of OSG.

<>

Member Enumeration Documentation

◆ StereoType

Enumerator
None 
RedCyan 
QuadBuffer 

◆ ViewModeCursor

Enumerator
RotateCursor 
PanCursor 
ZoomCursor 
HoverCursor 

◆ WheelMode

Enumerator
Never 
Always 
OnHover 

Constructor & Destructor Documentation

◆ ~ui3DViewerBody()

virtual ui3DViewerBody::~ui3DViewerBody ( )
virtual

◆ ui3DViewerBody()

ui3DViewerBody::ui3DViewerBody ( ui3DViewer ,
uiParent  
)
protected

Member Function Documentation

◆ align()

void ui3DViewerBody::align ( )

◆ enableDragging()

void ui3DViewerBody::enableDragging ( bool  yn)
protected

◆ enableThumbWheelHandling()

void ui3DViewerBody::enableThumbWheelHandling ( bool  yn,
const visBase::ThumbWheel tw = 0 
)
protected

◆ fillCameraPos()

void ui3DViewerBody::fillCameraPos ( IOPar ) const

◆ getBackgroundColor()

OD::Color ui3DViewerBody::getBackgroundColor ( ) const

◆ getCameraManipulator()

osgGeo::TrackballManipulator* ui3DViewerBody::getCameraManipulator ( ) const
protected

◆ getCameraPosition()

Coord3 ui3DViewerBody::getCameraPosition ( ) const

◆ getCameraZoom()

float ui3DViewerBody::getCameraZoom ( ) const

◆ getCompositeViewer()

static osgViewer::CompositeViewer* ui3DViewerBody::getCompositeViewer ( )
staticprotected

◆ getGraphicsContext()

virtual osg::GraphicsContext* ui3DViewerBody::getGraphicsContext ( )
protectedpure virtual

Implemented in ui3DIndirectViewBody.

◆ getGraphicsWindow()

virtual osgViewer::GraphicsWindow& ui3DViewerBody::getGraphicsWindow ( )
protectedpure virtual

Implemented in ui3DIndirectViewBody.

◆ getMouseWheelZoomFactor()

float ui3DViewerBody::getMouseWheelZoomFactor ( ) const

Always positive. Direction is set by setReversedMouseWheelDirection()

◆ getOsgCamera() [1/2]

osg::Camera* ui3DViewerBody::getOsgCamera ( )
protected

◆ getOsgCamera() [2/2]

const osg::Camera* ui3DViewerBody::getOsgCamera ( ) const
protected

◆ getOsgViewerHudView()

const osgViewer::View* ui3DViewerBody::getOsgViewerHudView ( ) const
inline

◆ getOsgViewerMainView()

const osgViewer::View* ui3DViewerBody::getOsgViewerMainView ( ) const
inline

◆ getPolygonSelector()

visBase::PolygonSelection* ui3DViewerBody::getPolygonSelector ( )

◆ getReversedMouseWheelDirection()

bool ui3DViewerBody::getReversedMouseWheelDirection ( ) const

◆ getScene() [1/2]

visBase::Scene* ui3DViewerBody::getScene ( )
inline

◆ getScene() [2/2]

const visBase::Scene* ui3DViewerBody::getScene ( ) const
inline

◆ getSceneColTab()

visBase::SceneColTab* ui3DViewerBody::getSceneColTab ( )

◆ getStereoOffset()

float ui3DViewerBody::getStereoOffset ( ) const

◆ getStereoType()

StereoType ui3DViewerBody::getStereoType ( ) const

◆ getViewportSizePixels()

Geom::Size2D<int> ui3DViewerBody::getViewportSizePixels ( ) const

◆ getVisCamera()

visBase::Camera* ui3DViewerBody::getVisCamera ( )
inline

◆ getWheelDisplayMode()

WheelMode ui3DViewerBody::getWheelDisplayMode ( ) const

◆ handleGestureEvent()

void ui3DViewerBody::handleGestureEvent ( QGestureEvent *  )
protected

◆ isAnimationEnabled()

bool ui3DViewerBody::isAnimationEnabled ( ) const

◆ isAxisShown()

bool ui3DViewerBody::isAxisShown ( ) const

◆ isCameraOrthographic()

bool ui3DViewerBody::isCameraOrthographic ( ) const

◆ isCameraPerspective()

bool ui3DViewerBody::isCameraPerspective ( ) const

◆ isHomePosEmpty()

bool ui3DViewerBody::isHomePosEmpty ( )
inline

◆ isMapView()

bool ui3DViewerBody::isMapView ( ) const
inline

◆ isViewMode()

bool ui3DViewerBody::isViewMode ( ) const

◆ keyBindMan()

KeyBindMan& ui3DViewerBody::keyBindMan ( )
inline

◆ mouseCursorChg()

void ui3DViewerBody::mouseCursorChg ( CallBacker )
protected

◆ notifyManipulatorMovement()

void ui3DViewerBody::notifyManipulatorMovement ( float  dh,
float  dv,
float  df 
)
protected

◆ qtEventCB()

void ui3DViewerBody::qtEventCB ( CallBacker )
protected

◆ removeSwapCallback()

void ui3DViewerBody::removeSwapCallback ( CallBacker )

◆ requestRedraw()

void ui3DViewerBody::requestRedraw ( )
protected

◆ resetHomePos()

void ui3DViewerBody::resetHomePos ( )

◆ resetToHomePosition()

void ui3DViewerBody::resetToHomePosition ( )

◆ reSizeEvent()

virtual void ui3DViewerBody::reSizeEvent ( CallBacker )
virtual

◆ saveHomePos()

void ui3DViewerBody::saveHomePos ( )

◆ serializeScene()

bool ui3DViewerBody::serializeScene ( const char *  ) const

◆ setAnimationEnabled()

void ui3DViewerBody::setAnimationEnabled ( bool  )

◆ setAnnotationFont()

void ui3DViewerBody::setAnnotationFont ( const FontData )

◆ setAnnotColor()

void ui3DViewerBody::setAnnotColor ( const OD::Color )

◆ setBackgroundColor()

void ui3DViewerBody::setBackgroundColor ( const OD::Color )

◆ setCameraPerspective()

void ui3DViewerBody::setCameraPerspective ( bool  yn)

◆ setCameraPos()

void ui3DViewerBody::setCameraPos ( const osg::Vec3f &  ,
const osg::Vec3f &  ,
bool   
)
protected

◆ setCameraZoom()

void ui3DViewerBody::setCameraZoom ( float  val)

◆ setFocusCB()

void ui3DViewerBody::setFocusCB ( CallBacker )
protected

◆ setHomePos()

void ui3DViewerBody::setHomePos ( const IOPar )

◆ setMapView()

void ui3DViewerBody::setMapView ( bool  yn)

◆ setMouseWheelZoomFactor()

void ui3DViewerBody::setMouseWheelZoomFactor ( float  )

◆ setReversedMouseWheelDirection()

void ui3DViewerBody::setReversedMouseWheelDirection ( bool  )

◆ setSceneID()

void ui3DViewerBody::setSceneID ( SceneID  )

◆ setScenesPixelDensity()

void ui3DViewerBody::setScenesPixelDensity ( float  dpi)

◆ setStartupView()

void ui3DViewerBody::setStartupView ( )

◆ setStereoOffset()

void ui3DViewerBody::setStereoOffset ( float  )

◆ setStereoType()

bool ui3DViewerBody::setStereoType ( StereoType  )

◆ setupHUD()

void ui3DViewerBody::setupHUD ( )
protected

◆ setupTouch()

void ui3DViewerBody::setupTouch ( )
protected

◆ setupView()

void ui3DViewerBody::setupView ( )
protected

◆ setViewMode()

virtual void ui3DViewerBody::setViewMode ( bool  viewmode,
bool  trigger 
)
virtual

◆ setViewModeCursor()

virtual void ui3DViewerBody::setViewModeCursor ( ViewModeCursor  )
protectedvirtual

◆ setWheelDisplayMode()

void ui3DViewerBody::setWheelDisplayMode ( WheelMode  )

◆ showRotAxis()

void ui3DViewerBody::showRotAxis ( bool  )

◆ thumbWheelRotationCB()

void ui3DViewerBody::thumbWheelRotationCB ( CallBacker )
protected

◆ toggleCameraType()

void ui3DViewerBody::toggleCameraType ( )

◆ toggleViewMode()

void ui3DViewerBody::toggleViewMode ( CallBacker )

◆ toHomePos()

void ui3DViewerBody::toHomePos ( )

◆ uiObjHandle()

uiObject& ui3DViewerBody::uiObjHandle ( )
overrideprotectedvirtual

Implements uiObjectBody.

◆ uiRotate()

void ui3DViewerBody::uiRotate ( float  angle,
bool  horizontal 
)

◆ uiZoom()

void ui3DViewerBody::uiZoom ( float  rel,
const osg::Vec3f *  dir = 0 
)

◆ updateActModeCursor()

virtual void ui3DViewerBody::updateActModeCursor ( )
protectedvirtual

◆ useCameraPos()

bool ui3DViewerBody::useCameraPos ( const IOPar )

◆ viewAll()

void ui3DViewerBody::viewAll ( bool  animate)

◆ viewAllCB()

void ui3DViewerBody::viewAllCB ( CallBacker )
protected

◆ viewPlaneCrl()

void ui3DViewerBody::viewPlaneCrl ( )

◆ viewPlaneInl()

void ui3DViewerBody::viewPlaneInl ( )

◆ viewPlaneN()

void ui3DViewerBody::viewPlaneN ( )

◆ viewPlaneX()

void ui3DViewerBody::viewPlaneX ( )

◆ viewPlaneY()

void ui3DViewerBody::viewPlaneY ( )

◆ viewPlaneYZ()

void ui3DViewerBody::viewPlaneYZ ( )

◆ viewPlaneZ()

void ui3DViewerBody::viewPlaneZ ( )

Friends And Related Function Documentation

◆ TrackBallManipulatorMessenger

friend class TrackBallManipulatorMessenger
friend

Member Data Documentation

◆ actmodecursor_

MouseCursor ui3DViewerBody::actmodecursor_
protected

◆ axes_

RefMan<visBase::Axes> ui3DViewerBody::axes_
protected

◆ camera_

RefMan<visBase::Camera> ui3DViewerBody::camera_
protected

◆ compositeviewer_

osgViewer::CompositeViewer* ui3DViewerBody::compositeviewer_
protected

◆ distancethumbwheel_

RefMan<visBase::ThumbWheel> ui3DViewerBody::distancethumbwheel_
protected

◆ eventfilter_

uiEventFilter ui3DViewerBody::eventfilter_
protected

◆ handle_

ui3DViewer& ui3DViewerBody::handle_
protected

◆ homepos_

IOPar ui3DViewerBody::homepos_
protected

◆ horthumbwheel_

RefMan<visBase::ThumbWheel> ui3DViewerBody::horthumbwheel_
protected

◆ hudscene_

RefMan<visBase::DataObjectGroup> ui3DViewerBody::hudscene_
protected

◆ hudview_

osgViewer::View* ui3DViewerBody::hudview_
protected

◆ keybindman_

KeyBindMan& ui3DViewerBody::keybindman_
protected

◆ manipmessenger_

TrackBallManipulatorMessenger* ui3DViewerBody::manipmessenger_
protected

◆ mapview_

bool ui3DViewerBody::mapview_
protected

◆ mouseeventblocker_

uiMouseEventBlockerByGestures& ui3DViewerBody::mouseeventblocker_
protected

◆ offscreenrenderhudswitch_

osg::Switch* ui3DViewerBody::offscreenrenderhudswitch_
protected

◆ offscreenrenderswitch_

osg::Switch* ui3DViewerBody::offscreenrenderswitch_
protected

◆ polygonselection_

RefMan<visBase::PolygonSelection> ui3DViewerBody::polygonselection_
protected

◆ printpar_

IOPar& ui3DViewerBody::printpar_
protected

◆ scene_

RefMan<visBase::Scene> ui3DViewerBody::scene_
protected

◆ stereooffset_

float ui3DViewerBody::stereooffset_
protected

◆ stereotype_

StereoType ui3DViewerBody::stereotype_
protected

◆ swapcallback_

SwapCallback* ui3DViewerBody::swapcallback_
protected

◆ verthumbwheel_

RefMan<visBase::ThumbWheel> ui3DViewerBody::verthumbwheel_
protected

◆ view_

osgViewer::View* ui3DViewerBody::view_
protected

◆ viewport_

osg::Viewport* ui3DViewerBody::viewport_
protected

◆ visscenecoltab_

RefMan<visBase::SceneColTab> ui3DViewerBody::visscenecoltab_
protected

◆ wheeldisplaymode_

int ui3DViewerBody::wheeldisplaymode_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024