16 #include "visbasemod.h" 25 namespace visBase {
class DataObject;
class EventInfo; }
27 namespace osg {
class Switch;
class Node; }
31 #define mVisTrans visBase::Transformation 33 namespace osg {
class Switch;
class StateSet; }
38 class SelectionManager;
41 class DataObjectGroup;
71 virtual bool isOK()
const {
return true; }
73 int id()
const {
return id_; }
76 static int getID(
const osg::Node*);
79 virtual void setName(
const uiString&);
81 osg::Node* osgNode(
bool skipswitch=
false);
82 const osg::Node* osgNode(
bool skipswitch=
false)
const;
84 void enableTraversal(
unsigned int mask,
bool yn=
true);
85 bool isTraversalEnabled(
unsigned int mask)
const;
91 virtual bool turnOn(
bool yn);
92 virtual bool isOn()
const;
94 bool isPickable(
bool actively=
true)
const;
95 void setPickable(
bool actively,
bool passively=
true);
104 void deSelect()
const;
107 void updateSel()
const;
111 virtual bool isSelected()
const;
117 virtual void setDisplayTransformation(
const mVisTrans*);
140 virtual void setPixelDensity(
float dpi);
141 static float getDefaultPixelDensity();
142 virtual float getPixelDensity()
const;
144 virtual const char*
errMsg()
const {
return 0; }
146 bool serialize(
const char* filename,
152 { doAddNodeState(ns);
return ns; }
156 static void setVisualizationThread(
const void*);
158 static bool isVisualizationThread();
160 static void requestSingleRedraw();
162 static void setCommonViewer(osgViewer::CompositeViewer*);
163 static osgViewer::CompositeViewer* getCommonViewer();
167 virtual osg::StateSet* getStateSet();
185 setOsgNodeInternal( (osg::Node*) t );
190 void updateNodemask();
193 void setOsgNodeInternal(osg::Node*);
194 void updateOsgNodeData();
209 #define mCreateDataObj(clss) \ 215 static visBase::DataObject* createInternal() \ 216 { return new clss; } \ 217 clss& operator =(const clss&); \ 221 static void initClass(); \ 222 static const char* getStaticClassName(); \ 223 static const char* sFactoryKeyword(); \ 224 virtual const char* getClassName() const 227 #define mCreateFactoryEntry( clss ) \ 228 const char* clss::getStaticClassName() { return #clss; } \ 229 const char* clss::getClassName() const \ 230 { return clss::getStaticClassName(); } \ 231 const char* clss::sFactoryKeyword() { return #clss; } \ 232 void clss::initClass() \ 233 { visBase::DataManager::factory().addCreator( \ 234 createInternal, getStaticClassName() ); } #define mRefCountImpl(ClassName)
Macro to setup a class with destructor for reference counting.
Definition: refcount.h:163
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
void turnOn(int flag)
Overrides the envirnonment variable.
unsigned int cDraggerIntersecTraversalMask()
Definition: visdata.h:55
DataObjectGroup * parent_
Definition: visdata.h:180
osg::Switch * osgoffswitch_
Definition: visdata.h:198
void setParent(DataObjectGroup *g)
Definition: visdata.h:149
virtual bool selectable() const
Definition: visdata.h:100
virtual const char * getClassName() const
Definition: visdata.h:69
uiString name_
Definition: visdata.h:201
Definition: visdatagroup.h:27
virtual NotifierAccess * rightClicked()
Definition: visdata.h:114
bool ison_
Definition: visdata.h:200
Interface class for Notifier. See comments there.
Definition: callback.h:161
T * setOsgNode(T *t)
Must be called during construction.
Definition: visdata.h:183
virtual NotifierAccess * deSelection()
Definition: visdata.h:113
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
virtual void triggerSel()
Definition: visdata.h:172
Definition: uistring.h:89
const SoNode * getInventorNode() const
Definition: visdata.h:88
SoNode * getInventorNode()
Definition: visdata.h:87
virtual bool isOK() const
Definition: visdata.h:71
Definition: visnodestate.h:27
virtual void triggerDeSel()
Definition: visdata.h:174
virtual bool rightClickable() const
Definition: visdata.h:99
Set of pointers to objects.
Definition: commontypes.h:32
unsigned int cBBoxTraversalMask()
Definition: visdata.h:49
T * addNodeState(T *ns)
Definition: visdata.h:151
bool isOn(int flag=0xffff)
SelectionManager handles DataObject that can be selected. If an object can be selected, it has to register himself with regSelObject. At registration it has to give two objects, first of all, he gives the object that outside users will associate him with when they want to add their CB to detect his selection.
Definition: visselman.h:44
#define mVisTrans
Definition: visdata.h:31
virtual void setRightHandSystem(bool yn)
Definition: visdata.h:135
unsigned int cActiveIntersecTraversalMask()
Definition: visdata.h:51
virtual void triggerRightClick(const EventInfo *=0)
Definition: visdata.h:176
unsigned int enabledmask_
Definition: visdata.h:202
static osgViewer::CompositeViewer * commonviewer_
Definition: visdata.h:204
static const void * visualizationthread_
Definition: visdata.h:203
osg::Node * osgnode_
Definition: visdata.h:197
virtual bool isRightHandSystem() const
Definition: visdata.h:138
virtual const visBase::Transformation * getDisplayTransformation() const
Definition: visdata.h:126
virtual const TypeSet< int > * rightClickedPath() const
Definition: visdata.h:115
Definition: visannot.h:43
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
virtual const char * errMsg() const
Definition: visdata.h:144
Scene manages all DataObjects and has some managing functions such as the selection management and va...
Definition: visscene.h:40
Open Scene Graph.
Definition: visannot.h:29
ObjectSet< NodeState > nodestates_
Definition: visdata.h:196
Definition: visevent.h:44
int id() const
Definition: visdata.h:73
int id_
Definition: visdata.h:199
virtual NotifierAccess * selection()
Definition: visdata.h:112
unsigned int cPassiveIntersecTraversalMask()
Definition: visdata.h:52
unsigned int cAllTraversalMask()
Definition: visdata.h:47
unsigned int cIntersectionTraversalMask()
Definition: visdata.h:53
unsigned int cNoTraversalMask()
Definition: visdata.h:46
unsigned int cEventTraversalMask()
Definition: visdata.h:48