OpendTect  6.6
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
visBase::DataObject Class Reference

DataObject is the base class off all objects that are used in Visualization and ought to be shared in visBase::DataManager. The DataManager owns all the objects and is thus the only one that is allowed to delete it. The destructors on the inherited classes should thus be protected. More...

Inheritance diagram for visBase::DataObject:
[legend]

Public Member Functions

template<class T >
T * addNodeState (T *ns)
 
void deSelect () const
 
virtual NotifierAccessdeSelection ()
 
void enableTraversal (unsigned int mask, bool yn=true)
 
virtual const char * errMsg () const
 
virtual const char * getClassName () const
 
virtual const visBase::TransformationgetDisplayTransformation () const
 
SoNode * getInventorNode ()
 
const SoNode * getInventorNode () const
 
virtual BufferString getName () const
 
NodeStategetNodeState (int idx)
 
virtual float getPixelDensity () const
 
int id () const
 
virtual bool isOK () const
 
virtual bool isOn () const
 
bool isPickable (bool actively=true) const
 
virtual bool isRightHandSystem () const
 
virtual bool isSelected () const
 
bool isTraversalEnabled (unsigned int mask) const
 
virtual const OD::Stringname () const
 
osg::Node * osgNode (bool skipswitch=false)
 
const osg::Node * osgNode (bool skipswitch=false) const
 
NodeStateremoveNodeState (NodeState *)
 
virtual bool rightClickable () const
 
virtual NotifierAccessrightClicked ()
 
virtual const TypeSet< int > * rightClickedPath () const
 
void select () const
 
virtual bool selectable () const
 
virtual NotifierAccessselection ()
 
bool serialize (const char *filename, bool binary=false)
 
virtual void setDisplayTransformation (const visBase::Transformation *)
 
void setID (int nid)
 
virtual void setName (const char *)
 
void setName (const uiString &uistr)
 
void setParent (DataObjectGroup *g)
 
void setPickable (bool actively, bool passively=true)
 
virtual void setPixelDensity (float dpi)
 
virtual void setRightHandSystem (bool yn)
 
void setUiName (const uiString &)
 
virtual bool turnOn (bool yn)
 
uiString uiName () const
 
void updateSel () const
 
- 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
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
bool getNameFromPar (const IOPar &)
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
- 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
 

Static Public Member Functions

static osgViewer::CompositeViewer * getCommonViewer ()
 
static float getDefaultPixelDensity ()
 
static int getID (const osg::Node *)
 
static bool isVisualizationThread ()
 
static void requestSingleRedraw ()
 
static void setCommonViewer (osgViewer::CompositeViewer *)
 
static void setDefaultPixelDensity (float)
 
static void setVisualizationThread (const void *)
 Call only once from initialization. More...
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

 DataObject ()
 
void doAddNodeState (NodeState *ns)
 
virtual osg::StateSet * getStateSet ()
 
template<class T >
T * setOsgNode (T *t)
 Must be called during construction. More...
 
virtual void triggerDeSel ()
 
virtual void triggerRightClick (const EventInfo *=0)
 
virtual void triggerSel ()
 
void updateNodemask ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

DataObjectGroupparent_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Member Functions

void setOsgNodeInternal (osg::Node *)
 
void updateOsgNodeData ()
 

Private Attributes

unsigned int enabledmask_
 
int id_
 
bool ison_
 
ObjectSet< NodeStatenodestates_
 
osg::Node * osgnode_
 
osg::Switch * osgoffswitch_
 
uiString uiname_
 

Static Private Attributes

static osgViewer::CompositeViewer * commonviewer_
 
static const void * visualizationthread_
 

Friends

class Scene
 
class SelectionManager
 

Additional Inherited Members

- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Detailed Description

DataObject is the base class off all objects that are used in Visualization and ought to be shared in visBase::DataManager. The DataManager owns all the objects and is thus the only one that is allowed to delete it. The destructors on the inherited classes should thus be protected.

<>

Constructor & Destructor Documentation

◆ DataObject()

visBase::DataObject::DataObject ( )
protected

Member Function Documentation

◆ addNodeState()

template<class T >
T* visBase::DataObject::addNodeState ( T *  ns)
inline

◆ deSelect()

void visBase::DataObject::deSelect ( ) const

◆ deSelection()

virtual NotifierAccess* visBase::DataObject::deSelection ( )
inlinevirtual

Reimplemented in visBase::VisualObject.

◆ doAddNodeState()

void visBase::DataObject::doAddNodeState ( NodeState ns)
protected

◆ enableTraversal()

void visBase::DataObject::enableTraversal ( unsigned int  mask,
bool  yn = true 
)

◆ errMsg()

virtual const char* visBase::DataObject::errMsg ( ) const
inlinevirtual

◆ getClassName()

virtual const char* visBase::DataObject::getClassName ( ) const
inlinevirtual

◆ getCommonViewer()

static osgViewer::CompositeViewer* visBase::DataObject::getCommonViewer ( )
static

◆ getDefaultPixelDensity()

static float visBase::DataObject::getDefaultPixelDensity ( )
static

◆ getDisplayTransformation()

virtual const visBase::Transformation* visBase::DataObject::getDisplayTransformation ( ) const
inlinevirtual

◆ getID()

static int visBase::DataObject::getID ( const osg::Node *  )
static

◆ getInventorNode() [1/2]

SoNode* visBase::DataObject::getInventorNode ( )
inline

◆ getInventorNode() [2/2]

const SoNode* visBase::DataObject::getInventorNode ( ) const
inline

◆ getName()

virtual BufferString visBase::DataObject::getName ( ) const
virtual

Reimplemented from NamedObject.

◆ getNodeState()

NodeState* visBase::DataObject::getNodeState ( int  idx)

◆ getPixelDensity()

virtual float visBase::DataObject::getPixelDensity ( ) const
virtual

◆ getStateSet()

virtual osg::StateSet* visBase::DataObject::getStateSet ( )
protectedvirtual

◆ id()

int visBase::DataObject::id ( ) const
inline

◆ isOK()

virtual bool visBase::DataObject::isOK ( ) const
inlinevirtual

◆ isOn()

virtual bool visBase::DataObject::isOn ( ) const
virtual

◆ isPickable()

bool visBase::DataObject::isPickable ( bool  actively = true) const

◆ isRightHandSystem()

virtual bool visBase::DataObject::isRightHandSystem ( ) const
inlinevirtual

◆ isSelected()

virtual bool visBase::DataObject::isSelected ( ) const
virtual

◆ isTraversalEnabled()

bool visBase::DataObject::isTraversalEnabled ( unsigned int  mask) const

◆ isVisualizationThread()

static bool visBase::DataObject::isVisualizationThread ( )
static

◆ name()

virtual const OD::String& visBase::DataObject::name ( ) const
virtual

Reimplemented from NamedObject.

◆ osgNode() [1/2]

osg::Node* visBase::DataObject::osgNode ( bool  skipswitch = false)

◆ osgNode() [2/2]

const osg::Node* visBase::DataObject::osgNode ( bool  skipswitch = false) const

◆ removeNodeState()

NodeState* visBase::DataObject::removeNodeState ( NodeState )

◆ requestSingleRedraw()

static void visBase::DataObject::requestSingleRedraw ( )
static

◆ rightClickable()

virtual bool visBase::DataObject::rightClickable ( ) const
inlinevirtual

◆ rightClicked()

virtual NotifierAccess* visBase::DataObject::rightClicked ( )
inlinevirtual

◆ rightClickedPath()

virtual const TypeSet<int>* visBase::DataObject::rightClickedPath ( ) const
inlinevirtual

◆ select()

void visBase::DataObject::select ( ) const

◆ selectable()

virtual bool visBase::DataObject::selectable ( ) const
inlinevirtual

◆ selection()

virtual NotifierAccess* visBase::DataObject::selection ( )
inlinevirtual

Reimplemented in visBase::VisualObject.

◆ serialize()

bool visBase::DataObject::serialize ( const char *  filename,
bool  binary = false 
)

◆ setCommonViewer()

static void visBase::DataObject::setCommonViewer ( osgViewer::CompositeViewer *  )
static

◆ setDefaultPixelDensity()

static void visBase::DataObject::setDefaultPixelDensity ( float  )
static

◆ setDisplayTransformation()

virtual void visBase::DataObject::setDisplayTransformation ( const visBase::Transformation )
virtual

◆ setID()

void visBase::DataObject::setID ( int  nid)

◆ setName() [1/2]

virtual void visBase::DataObject::setName ( const char *  )
virtual

Reimplemented from NamedObject.

Reimplemented in visBase::Scene.

◆ setName() [2/2]

void visBase::DataObject::setName ( const uiString uistr)
inline

◆ setOsgNode()

template<class T >
T* visBase::DataObject::setOsgNode ( T *  t)
inlineprotected

Must be called during construction.

◆ setOsgNodeInternal()

void visBase::DataObject::setOsgNodeInternal ( osg::Node *  )
private

◆ setParent()

void visBase::DataObject::setParent ( DataObjectGroup g)
inline

◆ setPickable()

void visBase::DataObject::setPickable ( bool  actively,
bool  passively = true 
)

actively: mouse click/drag, key press, etc. passively: hovering (e.g. status info)

◆ setPixelDensity()

virtual void visBase::DataObject::setPixelDensity ( float  dpi)
virtual

◆ setRightHandSystem()

virtual void visBase::DataObject::setRightHandSystem ( bool  yn)
inlinevirtual

◆ setUiName()

void visBase::DataObject::setUiName ( const uiString )

◆ setVisualizationThread()

static void visBase::DataObject::setVisualizationThread ( const void *  )
static

Call only once from initialization.

◆ triggerDeSel()

virtual void visBase::DataObject::triggerDeSel ( )
inlineprotectedvirtual

Is called everytime object is deselected.

Reimplemented in visSurvey::MPEDisplay, visSurvey::LocationDisplay, and visBase::VisualObject.

◆ triggerRightClick()

virtual void visBase::DataObject::triggerRightClick ( const EventInfo = 0)
inlineprotectedvirtual

◆ triggerSel()

virtual void visBase::DataObject::triggerSel ( )
inlineprotectedvirtual

Is called everytime object is selected.

Reimplemented in visSurvey::MPEDisplay, and visBase::VisualObject.

◆ turnOn()

virtual bool visBase::DataObject::turnOn ( bool  yn)
virtual

◆ uiName()

uiString visBase::DataObject::uiName ( ) const

◆ updateNodemask()

void visBase::DataObject::updateNodemask ( )
protected

◆ updateOsgNodeData()

void visBase::DataObject::updateOsgNodeData ( )
private

◆ updateSel()

void visBase::DataObject::updateSel ( ) const

Friends And Related Function Documentation

◆ Scene

friend class Scene
friend

◆ SelectionManager

friend class SelectionManager
friend

Member Data Documentation

◆ commonviewer_

osgViewer::CompositeViewer* visBase::DataObject::commonviewer_
staticprivate

◆ enabledmask_

unsigned int visBase::DataObject::enabledmask_
private

◆ id_

int visBase::DataObject::id_
private

◆ ison_

bool visBase::DataObject::ison_
private

◆ nodestates_

ObjectSet<NodeState> visBase::DataObject::nodestates_
private

◆ osgnode_

osg::Node* visBase::DataObject::osgnode_
private

◆ osgoffswitch_

osg::Switch* visBase::DataObject::osgoffswitch_
private

◆ parent_

DataObjectGroup* visBase::DataObject::parent_
protected

◆ uiname_

uiString visBase::DataObject::uiname_
private

◆ visualizationthread_

const void* visBase::DataObject::visualizationthread_
staticprivate

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