OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 
16 #include "visbasemod.h"
17 #include "visobject.h"
18 #include "vistransform.h"
19 
20 
21 namespace osgGeo { class TexturePanelStripNode; }
22 
23 namespace visBase
24 {
25 
26 class TextureChannels;
27 
34 {
35 public:
38 
39  void setTextureChannels(visBase::TextureChannels*);
40  visBase::TextureChannels* getTextureChannels();
41 
42  void freezeDisplay(bool yn=true);
43  bool isDisplayFrozen() const;
49  void setPath(const TypeSet<Coord>&);
50  const TypeSet<Coord>& getPath() const;
51 
52  void setPath2TextureMapping(
53  const TypeSet<float>& offsets);
57  const TypeSet<float>& getPath2TextureMapping() const;
58 
59  void setPathTextureShift(float shift,int startidx=0);
63  float getPathTextureShift() const;
64  float getPathTextureShiftStartIdx() const;
65 
66  void setZRange(const Interval<float>&);
67  Interval<float> getZRange() const;
68 
69  void unsetZRange2TextureMapping();
70  void setZRange2TextureMapping(
71  const Interval<float>& offsets);
73  bool isZRange2TextureMappingSet() const;
74  Interval<float> getZRange2TextureMapping() const;
75 
76  void setZTextureShift(float);
79  float getZTextureShift() const;
80 
81  void swapTextureAxes(bool yn=true);
82  bool areTextureAxesSwapped() const;
83 
84  void smoothNormals(bool yn=true);
85  bool areNormalsSmoothed() const;
86 
87  void setDisplayTransformation(const mVisTrans*);
88  const mVisTrans* getDisplayTransformation() const;
89  int getNrTextures() const;
90  const unsigned char* getTextureData() const;
91  mStruct(visBase) TextureDataInfo
92  {
93  TypeSet<Coord3> coords_;
94  TypeSet<Coord> texcoords_;
95  TypeSet<int> ps_;
96  void setEmpty() { coords_.erase(); texcoords_.erase();
97  ps_.erase(); }
98  };
99 
100  bool getTextureDataInfo(int tidx,
101  TextureDataInfo& texinfo) const;
102  bool getTextureInfo(int& width,int& height,
103  int& pixsize);
104 protected:
106  void updatePath();
107 
109  osgGeo::TexturePanelStripNode* osgpanelstrip_;
113 
114 private:
116  TypeSet<Coord>&)const;
117 
119  TypeSet<Coord>& coordout) const;
122  double minx,double xlen,double minz,
123  double zlen) const;
125  void getMinAndLengthInfo(double& minval,double& len,
126  bool bz=false) const;
128 };
129 
130 };
131 
ConstRefMan< mVisTrans >
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
visBase::TexturePanelStrip::getTextureInfo
bool getTextureInfo(int &width, int &height, int &pixsize)
visBase::TexturePanelStrip::create
static TexturePanelStrip * create()
Definition: vistexturepanelstrip.h:36
visBase
Definition: visannot.h:43
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
visBase::TexturePanelStrip::getTextureDataInfo
bool getTextureDataInfo(int tidx, TextureDataInfo &texinfo) const
visobject.h
visBase::TexturePanelStrip::pathtexoffsets_
PtrMan< TypeSet< float > > pathtexoffsets_
Definition: vistexturepanelstrip.h:112
visBase::TexturePanelStrip::displaytrans_
ConstRefMan< visBase::Transformation > displaytrans_
Definition: vistexturepanelstrip.h:108
visBase::TexturePanelStrip::getImageTextureCoord
Coord getImageTextureCoord(const Coord3 dispcrd, double minx, double xlen, double minz, double zlen) const
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
visBase::TextureChannels
Definition: vistexturechannels.h:50
visBase::TexturePanelStrip::osgpanelstrip_
osgGeo::TexturePanelStripNode * osgpanelstrip_
Definition: vistexturepanelstrip.h:109
visBase::TexturePanelStrip::~TexturePanelStrip
~TexturePanelStrip()
mStruct
#define mStruct(module)
Definition: commondefs.h:182
visBase::TexturePanelStrip::updatePath
void updatePath()
PtrMan
Definition: ptrman.h:121
mVisTrans
#define mVisTrans
Definition: visdata.h:28
visBase::VisualObjectImpl
Definition: visobject.h:72
visBase::TexturePanelStrip::channels_
RefMan< TextureChannels > channels_
Definition: vistexturepanelstrip.h:110
visBase::TexturePanelStrip::calcTextureCoordinates
bool calcTextureCoordinates(int, TypeSet< Coord > &) const
osgGeo
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
mCreateDataObj
#define mCreateDataObj(clss)
Definition: visdata.h:214
visBase::TexturePanelStrip::pathcoords_
PtrMan< TypeSet< Coord > > pathcoords_
Definition: vistexturepanelstrip.h:111
visBase::TexturePanelStrip::getMinAndLengthInfo
void getMinAndLengthInfo(double &minval, double &len, bool bz=false) const
visBase::TexturePanelStrip::calcTextureCoordinates
bool calcTextureCoordinates(TypeSet< Coord3 > &coordin, TypeSet< Coord > &coordout) const
Interval
Interval of values.
Definition: commontypes.h:30
visBase::TexturePanelStrip
A TexturePanelStrip is geometrically invariant in the z-direction. Its serially connected panels are ...
Definition: vistexturepanelstrip.h:34
TypeSet
Sets of (small) copyable elements.
Definition: commontypes.h:29
RefMan
Definition: ptrman.h:206
vistransform.h

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