OpendTect  6.3
vistexturerect.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 
14 
15 #include "visobject.h"
16 #include "vistransform.h"
17 
18 
21 namespace osgGeo { class TexturePlaneNode; }
22 
23 namespace visBase
24 {
25 
26 class TextureChannels;
27 
33 {
34 public:
37 
38  void setTextureChannels(visBase::TextureChannels*);
39  visBase::TextureChannels* getTextureChannels();
40 
41  void freezeDisplay(bool yn=true);
42  bool isDisplayFrozen() const;
48  void setTextureShift(const Coord&);
52  Coord getTextureShift() const;
53 
54  void setTextureGrowth(const Coord&);
59  Coord getTextureGrowth() const;
60 
61  void setCenter(const Coord3& center);
62  void setWidth(const Coord3& width);
64  Coord3 getWidth() const;
65  Coord3 getCenter() const;
66 
67  void setRotation(const Coord3& spanvec0,
68  const Coord3& spanvec1);
70  void setRotationAndWidth(const Coord3& spanvec0,
71  const Coord3& spanvec1);
74  const Coord3& getSpanningVector(int idx) const;
75 
76  void swapTextureAxes(bool yn=true);
77  bool areTextureAxesSwapped() const;
78 
79  void setDisplayTransformation(const mVisTrans*);
80  const mVisTrans* getDisplayTransformation() const;
81 
82  int getNrTextures() const;
83  const unsigned char* getTextureData() const;
84 
85  mStruct(visBase) TextureDataInfo
86  {
87  TypeSet<Coord3> coords_;
88  TypeSet<Coord> texcoords_;
89  TypeSet<int> ps_;
90  void setEmpty() { coords_.erase(); texcoords_.erase();
91  ps_.erase(); }
92  };
93 
94  bool getTextureDataInfo(int tidx,
95  TextureDataInfo& texinfo) const;
96  bool getTextureInfo(int& width,int& height,
97  int& pixsize) const;
98 
99 protected:
100  ~TextureRectangle();
101 
103 
104  osgGeo::TexturePlaneNode* textureplane_;
106 
109 };
110 
111 };
#define mExpClass(module)
Definition: commondefs.h:157
Coord3 spanvec0_
Definition: vistexturerect.h:107
Coord3 spanvec1_
Definition: vistexturerect.h:108
osgGeo::TexturePlaneNode * textureplane_
Definition: vistexturerect.h:104
Definition: vistexturechannels.h:46
#define mStruct(module)
Definition: commondefs.h:162
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:35
static TextureRectangle * create()
Definition: vistexturerect.h:35
A TextureRectangle is a Rectangle with a datatexture. The data is set via setData.
Definition: vistexturerect.h:32
3D point or vector
Definition: commontypes.h:57
Set of (small) copyable elements.
Definition: commontypes.h:26
#define mVisTrans
Definition: visdata.h:25
ConstRefMan< visBase::Transformation > displaytrans_
Definition: vistexturerect.h:102
Definition: visannot.h:40
RefMan< TextureChannels > channels_
Definition: vistexturerect.h:105
virtual void erase()
#define mCreateDataObj(clss)
Definition: visdata.h:210
Definition: visobject.h:67
2D point or vector class.
Definition: commontypes.h:58
Definition: ptrman.h:200

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