OpendTect-6_4  6.4
visnodestate.h
Go to the documentation of this file.
1 #ifndef visnodestate_h
2 #define visnodestate_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: Oct 2012
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visosg.h"
17 #include "objectset.h"
18 #include "callback.h"
19 
20 namespace osg { class StateSet; class StateAttribute; }
21 
22 namespace visBase
23 {
24 
29 public:
30 
31  void attachStateSet(osg::StateSet*);
32  void detachStateSet(osg::StateSet*);
33  virtual void setPixelDensity(float) {}
34 
35 protected:
36  NodeState();
37 
38  template <class T> T* addAttribute(T* a) { doAdd(a); return a; }
39  template <class T> void removeAttribute(T* a) {doRemove(a);}
40 
41 private:
42 
43  void doAdd(osg::StateAttribute*);
44  void doRemove(osg::StateAttribute*);
45  virtual void applyAttribute(osg::StateSet*,
46  osg::StateAttribute*);
47 
50 };
51 
52 };
53 
54 #endif
#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
ObjectSet< osg::StateAttribute > attributes_
Definition: visnodestate.h:48
void removeAttribute(T *a)
Definition: visnodestate.h:39
Definition: visnodestate.h:27
ObjectSet< osg::StateSet > statesets_
Definition: visnodestate.h:49
Definition: visannot.h:43
Open Scene Graph.
Definition: visannot.h:29
virtual void setPixelDensity(float)
Definition: visnodestate.h:33
T * addAttribute(T *a)
Definition: visnodestate.h:38

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