OpendTect  6.3
visdatagroup.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: Kris Tingdahl
8  Date: Jan 2002
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "visdata.h"
14 #include "sets.h"
15 
16 class SoGroup;
17 class SoSeparator;
18 
19 namespace osg { class Group; }
20 
21 namespace visBase
22 {
23 
25 {
26 public:
27 
30 
31  void setSeparate( bool yn=true ) { separate_=yn; }
35  virtual int size() const;
36  virtual void addObject( DataObject* );
37  void addObject( int id );
40  virtual void insertObject( int idx, DataObject* );
41 
42  virtual int getFirstIdx( int id ) const;
47  virtual int getFirstIdx( const DataObject* ) const;
53  virtual void removeObject( int idx );
54  virtual void removeAll();
55  virtual DataObject* getObject( int idx )
56  {return objects_.size()>idx ? objects_[idx] :0;}
57  const DataObject* getObject( int idx ) const
58  { return const_cast<DataObjectGroup*>(this)->
59  getObject( idx ); }
60 
61  void setDisplayTransformation(const mVisTrans*);
62  const mVisTrans* getDisplayTransformation() const;
66  void setRightHandSystem(bool);
67  bool isRightHandSystem() const;
68 
69  void setPixelDensity(float dpi);
70  float getPixelDensity() const { return pixeldensity_;}
71 
72  Notifier<DataObjectGroup> change; //triggers on add/insert/remove
73 protected:
74 
75  virtual ~DataObjectGroup();
76 
77  osg::Group* osggroup_;
78 
81 
82 protected:
83 
85  bool separate_;
86 
87 };
88 
89 } //namespace
#define mExpClass(module)
Definition: commondefs.h:157
Definition: visdatagroup.h:24
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:59
virtual DataObject * getObject(int idx)
Definition: visdatagroup.h:55
ObjectSet< DataObject > objects_
Definition: visdatagroup.h:84
Class to help setup a callback handling.
Definition: notify.h:121
Set of pointers to objects.
Definition: commontypes.h:28
void removeAll()
const DataObject * getObject(int idx) const
Definition: visdatagroup.h:57
float getPixelDensity() const
Definition: visdatagroup.h:70
#define mVisTrans
Definition: visdata.h:25
Definition: visannot.h:40
bool separate_
Definition: visdatagroup.h:85
Open Scene Graph.
Definition: visannot.h:26
#define mCreateDataObj(clss)
Definition: visdata.h:210
static DataObjectGroup * create()
Definition: visdatagroup.h:28
bool righthandsystem_
Definition: visdatagroup.h:79
osg::Group * osggroup_
Definition: visdatagroup.h:77
float pixeldensity_
Definition: visdatagroup.h:80
Notifier< DataObjectGroup > change
Definition: visdatagroup.h:72

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