OpendTect-6_4  6.4
vistexturepanelstrip.h
Go to the documentation of this file.
1 #ifndef vistexturepanelstrip_h
2 #define vistexturepanelstrip_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Jaap Glas
9  Date: April 2013
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 
17 #include "visbasemod.h"
18 #include "visobject.h"
19 #include "vistransform.h"
20 
21 
22 namespace osgGeo { class TexturePanelStripNode; }
23 
24 namespace visBase
25 {
26 
27 class TextureChannels;
28 
35 {
36 public:
39 
40  void setTextureChannels(visBase::TextureChannels*);
41  visBase::TextureChannels* getTextureChannels();
42 
43  void freezeDisplay(bool yn=true);
44  bool isDisplayFrozen() const;
50  void setPath(const TypeSet<Coord>&);
51  const TypeSet<Coord>& getPath() const;
52 
53  void setPath2TextureMapping(
54  const TypeSet<float>& offsets);
58  const TypeSet<float>& getPath2TextureMapping() const;
59 
60  void setPathTextureShift(float shift,int startidx=0);
64  float getPathTextureShift() const;
65  float getPathTextureShiftStartIdx() const;
66 
67  void setZRange(const Interval<float>&);
68  Interval<float> getZRange() const;
69 
70  void unsetZRange2TextureMapping();
71  void setZRange2TextureMapping(
72  const Interval<float>& offsets);
74  bool isZRange2TextureMappingSet() const;
75  Interval<float> getZRange2TextureMapping() const;
76 
77  void setZTextureShift(float);
80  float getZTextureShift() const;
81 
82  void swapTextureAxes(bool yn=true);
83  bool areTextureAxesSwapped() const;
84 
85  void smoothNormals(bool yn=true);
86  bool areNormalsSmoothed() const;
87 
88  void setDisplayTransformation(const mVisTrans*);
89  const mVisTrans* getDisplayTransformation() const;
90  int getNrTextures() const;
91  const unsigned char* getTextureData() const;
92  mStruct(visBase) TextureDataInfo
93  {
94  TypeSet<Coord3> coords_;
95  TypeSet<Coord> texcoords_;
96  TypeSet<int> ps_;
97  void setEmpty() { coords_.erase(); texcoords_.erase();
98  ps_.erase(); }
99  };
100 
101  bool getTextureDataInfo(int tidx,
102  TextureDataInfo& texinfo) const;
103  bool getTextureInfo(int& width,int& height,
104  int& pixsize);
105 protected:
107  void updatePath();
108 
110  osgGeo::TexturePanelStripNode* osgpanelstrip_;
114 
115 private:
116  bool calcTextureCoordinates(int,
117  TypeSet<Coord>&)const;
118 
119  bool calcTextureCoordinates(TypeSet<Coord3>& coordin,
120  TypeSet<Coord>& coordout) const;
122  Coord getImageTextureCoord(const Coord3 dispcrd,
123  double minx,double xlen,double minz,
124  double zlen) const;
126  void getMinAndLengthInfo(double& minval,double& len,
127  bool bz=false) const;
129 };
130 
131 };
132 
133 #endif
#define mExpClass(module)
Definition: commondefs.h:160
RefMan< const visBase::Transformation > displaytrans_
Definition: vistexturepanelstrip.h:109
Definition: vistexturechannels.h:50
#define mStruct(module)
Definition: commondefs.h:165
PtrMan< TypeSet< float > > pathtexoffsets_
Definition: vistexturepanelstrip.h:113
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
RefMan< TextureChannels > channels_
Definition: vistexturepanelstrip.h:111
A TexturePanelStrip is geometrically invariant in the z-direction. Its serially connected panels are ...
Definition: vistexturepanelstrip.h:34
A cartesian coordinate in 2D space.
Definition: coord.h:25
osgGeo::TexturePanelStripNode * osgpanelstrip_
Definition: vistexturepanelstrip.h:110
Interval of values.
Definition: commontypes.h:31
Definition: ptrman.h:79
Set of (small) copyable elements.
Definition: commontypes.h:30
PtrMan< TypeSet< Coord > > pathcoords_
Definition: vistexturepanelstrip.h:112
static TexturePanelStrip * create()
Definition: vistexturepanelstrip.h:37
#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

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