OpendTect-6_4  6.4
visdatagroup.h
Go to the documentation of this file.
1 #ifndef visdatagroup_h
2 #define visdatagroup_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 #include "visbasemod.h"
16 #include "sets.h"
17 #include "visdata.h"
18 
19 class SoGroup;
20 class SoSeparator;
21 
22 namespace osg { class Group; }
23 
24 namespace visBase
25 {
26 
28 {
29 public:
30 
33 
34  void setSeparate( bool yn=true ) { separate_=yn; }
38  virtual int size() const;
39  virtual void addObject( DataObject* );
40  void addObject( int id );
43  virtual void insertObject( int idx, DataObject* );
44 
45  virtual int getFirstIdx( int id ) const;
50  virtual int getFirstIdx( const DataObject* ) const;
56  virtual void removeObject( int idx );
57  virtual void removeAll();
58  virtual DataObject* getObject( int idx )
59  {return objects_.size()>idx ? objects_[idx] :0;}
60  const DataObject* getObject( int idx ) const
61  { return const_cast<DataObjectGroup*>(this)->
62  getObject( idx ); }
63 
64  void setDisplayTransformation(const mVisTrans*);
65  const mVisTrans* getDisplayTransformation() const;
69  void setRightHandSystem(bool);
70  bool isRightHandSystem() const;
71 
72  void setPixelDensity(float dpi);
73  float getPixelDensity() const { return pixeldensity_;}
74 
75  Notifier<DataObjectGroup> change; //triggers on add/insert/remove
76 protected:
77 
78  virtual ~DataObjectGroup();
79 
80  osg::Group* osggroup_;
81 
84 
85 protected:
86 
88  bool separate_;
89 
90 };
91 
92 } //namespace
93 
94 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: visdatagroup.h:27
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
virtual DataObject * getObject(int idx)
Definition: visdatagroup.h:58
ObjectSet< DataObject > objects_
Definition: visdatagroup.h:87
Definition: callback.h:254
Set of pointers to objects.
Definition: commontypes.h:32
void removeAll()
const DataObject * getObject(int idx) const
Definition: visdatagroup.h:60
float getPixelDensity() const
Definition: visdatagroup.h:73
#define mVisTrans
Definition: visdata.h:31
Definition: visannot.h:43
bool separate_
Definition: visdatagroup.h:88
Open Scene Graph.
Definition: visannot.h:29
#define mCreateDataObj(clss)
Definition: visdata.h:209
static DataObjectGroup * create()
Definition: visdatagroup.h:31
bool righthandsystem_
Definition: visdatagroup.h:82
osg::Group * osggroup_
Definition: visdatagroup.h:80
float pixeldensity_
Definition: visdatagroup.h:83
Notifier< DataObjectGroup > change
Definition: visdatagroup.h:75

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