OpendTect  7.0
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
 
BufferString getName () const override
 
NodeStategetNodeState (int idx)
 
virtual float getPixelDensity () const
 
VisID 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
 
const OD::Stringname () const override
 
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< VisID > * 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 (VisID newid)
 
void setName (const char *) override
 
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 SharedObject
 SharedObject (const char *nm=nullptr)
 
 SharedObject (const SharedObject &)
 
- 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 ()
 
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
 
- Public Member Functions inherited from RefCount::Referenced
void addObserver (WeakPtrBase *obs)
 Not for normal use. May become private. More...
 
int nrRefs () const
 Only for expert use. More...
 
void ref () const
 
bool refIfReffed () const
 Don't use in production, for debugging. More...
 
void removeObserver (WeakPtrBase *obs)
 Not for normal use. May become private. More...
 
bool tryRef () const
 Not for normal use. May become private. More...
 
void unRef () const
 
void unRefNoDelete () const
 

Static Public Member Functions

static osgViewer::CompositeViewer * getCommonViewer ()
 
static float getDefaultPixelDensity ()
 
static VisID 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 SharedObject
static Notifier< SharedObject > & instanceCreated ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 
- Static Public Member Functions inherited from RefCount::Referenced
static bool isSane (const Referenced *)
 

Protected Member Functions

 DataObject ()
 
virtual ~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 *=nullptr)
 
virtual void triggerSel ()
 
void updateNodemask ()
 
- Protected Member Functions inherited from SharedObject
virtual ~SharedObject ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 
- Protected Member Functions inherited from RefCount::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
virtual ~Referenced ()
 
Referencedoperator= (const Referenced &)
 

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_
 
VisID 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()

virtual visBase::DataObject::~DataObject ( )
protectedvirtual

◆ 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 VisID 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()

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

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()

VisID 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()

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

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<VisID>* 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 ( VisID  newid)

◆ setName() [1/2]

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

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 = nullptr)
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_

VisID 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-2024