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

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