OpendTect-6_4  6.4
vistexturerect.h
Go to the documentation of this file.
1 #ifndef vistexturerect_h
2 #define vistexturerect_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 
17 #include "visbasemod.h"
18 #include "visobject.h"
19 #include "vistransform.h"
20 
21 
24 namespace osgGeo { class TexturePlaneNode; }
25 
26 namespace visBase
27 {
28 
29 class TextureChannels;
30 
36 {
37 public:
40 
41  void setTextureChannels(visBase::TextureChannels*);
42  visBase::TextureChannels* getTextureChannels();
43 
44  void freezeDisplay(bool yn=true);
45  bool isDisplayFrozen() const;
51  void setTextureShift(const Coord&);
55  Coord getTextureShift() const;
56 
57  void setTextureGrowth(const Coord&);
62  Coord getTextureGrowth() const;
63 
64  void setCenter(const Coord3& center);
65  void setWidth(const Coord3& width);
67  Coord3 getWidth() const;
68  Coord3 getCenter() const;
69 
70  void setRotation(const Coord3& spanvec0,
71  const Coord3& spanvec1);
73  void setRotationAndWidth(const Coord3& spanvec0,
74  const Coord3& spanvec1);
77  const Coord3& getSpanningVector(int idx) const;
78 
79  void swapTextureAxes(bool yn=true);
80  bool areTextureAxesSwapped() const;
81 
82  void setDisplayTransformation(const mVisTrans*);
83  const mVisTrans* getDisplayTransformation() const;
84 
85  // deprecated
86  void getTextureCoordinates(TypeSet<Coord3>&) const;
87 
88 protected:
89  ~TextureRectangle();
90 
91  RefMan<const mVisTrans> displaytrans_;
92 
93  osgGeo::TexturePlaneNode* textureplane_;
94  RefMan<TextureChannels> channels_;
95 
96  Coord3 spanvec0_;
97  Coord3 spanvec1_;
98 
99 public:
100 
101  int getNrTextures() const;
102  const unsigned char* getTextureData() const;
103 
104  mStruct(visBase) TextureDataInfo
105  {
106  TypeSet<Coord3> coords_;
107  TypeSet<Coord> texcoords_;
108  TypeSet<int> ps_;
109  void setEmpty() { coords_.erase(); texcoords_.erase();
110  ps_.erase(); }
111  };
112 
113  bool getTextureDataInfo(int tidx,
114  TextureDataInfo& texinfo) const;
115  bool getTextureInfo(int& width,int& height,
116  int& pixsize) const;
117 };
118 
119 };
120 
121 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: vistexturechannels.h:50
#define mStruct(module)
Definition: commondefs.h:165
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
A cartesian coordinate in 2D space.
Definition: coord.h:25
static TextureRectangle * create()
Definition: vistexturerect.h:38
A TextureRectangle is a Rectangle with a datatexture. The data is set via setData.
Definition: vistexturerect.h:35
Set of (small) copyable elements.
Definition: commontypes.h:30
#define mVisTrans
Definition: visdata.h:31
A cartesian coordinate in 3D space.
Definition: coord.h:72
Definition: visannot.h:43
virtual void erase()
Definition: typeset.h:339
#define mCreateDataObj(clss)
Definition: visdata.h:209
Definition: visobject.h:72
Definition: ptrman.h:168

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