OpendTect  6.3
vistexturepanelstrip.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: Jaap Glas
8  Date: April 2013
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 
15 #include "visobject.h"
16 #include "vistransform.h"
17 
18 
19 namespace osgGeo { class TexturePanelStripNode; }
20 
21 namespace visBase
22 {
23 
24 class TextureChannels;
25 
32 {
33 public:
36 
37  void setTextureChannels(visBase::TextureChannels*);
38  visBase::TextureChannels* getTextureChannels();
39 
40  void freezeDisplay(bool yn=true);
41  bool isDisplayFrozen() const;
47  void setPath(const TypeSet<Coord>&);
48  const TypeSet<Coord>& getPath() const;
49 
50  void setPath2TextureMapping(
51  const TypeSet<float>& offsets);
55  const TypeSet<float>& getPath2TextureMapping() const;
56 
57  void setPathTextureShift(float shift,int startidx=0);
61  float getPathTextureShift() const;
62  float getPathTextureShiftStartIdx() const;
63 
64  void setZRange(const Interval<float>&);
65  Interval<float> getZRange() const;
66 
67  void unsetZRange2TextureMapping();
68  void setZRange2TextureMapping(
69  const Interval<float>& offsets);
71  bool isZRange2TextureMappingSet() const;
72  Interval<float> getZRange2TextureMapping() const;
73 
74  void setZTextureShift(float);
77  float getZTextureShift() const;
78 
79  void swapTextureAxes(bool yn=true);
80  bool areTextureAxesSwapped() const;
81 
82  void smoothNormals(bool yn=true);
83  bool areNormalsSmoothed() const;
84 
85  void setDisplayTransformation(const mVisTrans*);
86  const mVisTrans* getDisplayTransformation() const;
87  int getNrTextures() const;
88  const unsigned char* getTextureData() const;
89  mStruct(visBase) TextureDataInfo
90  {
91  TypeSet<Coord3> coords_;
92  TypeSet<Coord> texcoords_;
93  TypeSet<int> ps_;
94  void setEmpty() { coords_.erase(); texcoords_.erase();
95  ps_.erase(); }
96  };
97 
98  bool getTextureDataInfo(int tidx,
99  TextureDataInfo& texinfo) const;
100  bool getTextureInfo(int& width,int& height,
101  int& pixsize);
102 protected:
104  void updatePath();
105 
107  osgGeo::TexturePanelStripNode* osgpanelstrip_;
111 private:
112  bool calcTextureCoordinates(int,
113  TypeSet<Coord>&)const;
114 };
115 
116 };
#define mExpClass(module)
Definition: commondefs.h:157
Definition: vistexturechannels.h:46
#define mStruct(module)
Definition: commondefs.h:162
PtrMan< TypeSet< float > > pathtexoffsets_
Definition: vistexturepanelstrip.h:110
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:35
RefMan< TextureChannels > channels_
Definition: vistexturepanelstrip.h:108
A TexturePanelStrip is geometrically invariant in the z-direction. Its serially connected panels are ...
Definition: vistexturepanelstrip.h:31
osgGeo::TexturePanelStripNode * osgpanelstrip_
Definition: vistexturepanelstrip.h:107
Interval of values.
Definition: commontypes.h:27
Definition: ptrman.h:115
Set of (small) copyable elements.
Definition: commontypes.h:26
PtrMan< TypeSet< Coord > > pathcoords_
Definition: vistexturepanelstrip.h:109
static TexturePanelStrip * create()
Definition: vistexturepanelstrip.h:34
#define mVisTrans
Definition: visdata.h:25
Definition: visannot.h:40
ConstRefMan< visBase::Transformation > displaytrans_
Definition: vistexturepanelstrip.h:106
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