OpendTect  6.3
viscamera.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: 4-11-2002
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "visdata.h"
15 #include "position.h"
16 namespace osg { class Camera; class RenderInfo; }
17 
18 namespace visBase
19 {
20 
21 class DrawCallback;
22 
28 {
29 public:
30 
31  static Camera* create()
33 
34  osg::Camera* osgCamera() const;
35  Coord3 getTranslation() const;
36  Coord3 getScale() const;
37  void getRotation(Coord3& vec,double& angle)const;
38  void getLookAtMatrix(Coord3&,Coord3&,Coord3&)const;
39 
40 
41  Notifier<Camera> preDraw;
42  Notifier<Camera> postDraw;
43 
44  const osg::RenderInfo* getRenderInfo() const { return renderinfo_; }
46 
47 private:
48  friend class DrawCallback;
49 
50  void triggerDrawCallBack(const DrawCallback*,
51  const osg::RenderInfo&);
52 
53  virtual ~Camera();
54 
55  osg::Camera* camera_;
56  const osg::RenderInfo* renderinfo_;
57  DrawCallback* predraw_;
58  DrawCallback* postdraw_;
59 
60 };
61 
62 
63 };
#define mExpClass(module)
Definition: commondefs.h:157
keep osg camera status and render info
Definition: viscamera.h:27
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:59
DrawCallback * predraw_
Definition: viscamera.h:57
static Camera * create()
Definition: viscamera.h:31
Class to help setup a callback handling.
Definition: notify.h:121
3D point or vector
Definition: commontypes.h:57
const osg::RenderInfo * renderinfo_
Definition: viscamera.h:56
osg::Camera * camera_
Definition: viscamera.h:55
DrawCallback * postdraw_
Definition: viscamera.h:58
Definition: visannot.h:40
Open Scene Graph.
Definition: visannot.h:26
#define mCreateDataObj(clss)
Definition: visdata.h:210

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