OpendTect-6_4  6.4
visscene.h
Go to the documentation of this file.
1 #ifndef visscene_h
2 #define visscene_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kris Tingdahl
9  Date: Jan 2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "sets.h"
18 #include "visdatagroup.h"
19 
24 namespace osg { class Group; }
25 
26 namespace visBase
27 {
28  class SelectionManager;
29  class EventCatcher;
30  class PolygonOffset;
31  class Light;
32  class Camera;
33 
41 {
42 public:
43  static Scene* create()
45 
46  void addObject(DataObject*);
47 
48  void setCameraAmbientLight(float);
49  float getCameraAmbientLight() const;
50  void setCameraLightIntensity( float );
51  float getCameraLightIntensity() const;
52 
53  Light* getDirectionalLight() const;
54 
55  PolygonOffset* getPolygonOffset() { return polygonoffset_; }
56  bool saveCurrentOffsetAsDefault() const;
57 
58  bool blockMouseSelection(bool yn);
61  Camera* getCamera() { return camera_; }
62  const Camera* getCamera() const { return camera_; }
63  virtual void setCamera(Camera*);
64 
65  EventCatcher& eventCatcher();
66 
67  int getUpdateQueueID() const {return updatequeueid_;}
68  int fixedIdx() const { return fixedidx_; }
69 
70  float getPolygonOffsetFactor() const;
71  float getPolygonOffsetUnits() const;
72 
73  void setName(const uiString&);
74 
77  //Trigges when we can ask quesitons about the context
78 
79  static const char* sKeyOffset() { return "Polygon offset"; }
80  static const char* sKeyFactor() { return "Factor"; }
81  static const char* sKeyUnits() { return "Units"; }
82  static const char* sKeyLight() { return "Light"; }
83 
84 protected:
85  virtual ~Scene();
87 
88  virtual void runUpdateQueueCB(CallBacker*);
89 
90  void fillOffsetPar( IOPar& ) const;
91 
92 private:
93 
96  int fixedidx_;
97 
98  void mousePickCB(CallBacker*);
99 
102 
104  osg::Group* osgsceneroot_;
105 
107 };
108 
109 }
110 
111 #endif
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
keep osg camera status and render info
Definition: viscamera.h:30
int getUpdateQueueID() const
Definition: visscene.h:67
EventCatcher & events_
Definition: visscene.h:86
static Scene * create()
Definition: visscene.h:43
bool blockmousesel_
Definition: visscene.h:103
Definition: visdatagroup.h:27
int updatequeueid_
Definition: visscene.h:95
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
int fixedIdx() const
Definition: visscene.h:68
Definition: uistring.h:89
Camera * camera_
Definition: visscene.h:106
Definition: callback.h:254
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Notifier< Scene > nameChanged
Definition: visscene.h:75
Class for all lights. More options are available in osg, but only what we currently need is implement...
Definition: vislight.h:35
int fixedidx_
Definition: visscene.h:96
Camera * getCamera()
Definition: visscene.h:61
Notifier< Scene > contextIsUp
Definition: visscene.h:76
PolygonOffset * polygonoffset_
Definition: visscene.h:100
Definition: visannot.h:43
int mousedownid_
Definition: visscene.h:94
Scene manages all DataObjects and has some managing functions such as the selection management and va...
Definition: visscene.h:40
static const char * sKeyFactor()
Definition: visscene.h:80
static const char * sKeyLight()
Definition: visscene.h:82
Open Scene Graph.
Definition: visannot.h:29
static const char * sKeyOffset()
Definition: visscene.h:79
#define mCreateDataObj(clss)
Definition: visdata.h:209
Light * light_
Definition: visscene.h:101
const Camera * getCamera() const
Definition: visscene.h:62
Definition: vispolygonoffset.h:25
static const char * sKeyUnits()
Definition: visscene.h:81
osg::Group * osgsceneroot_
Definition: visscene.h:104
Definition: visevent.h:87

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