OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 
16 #include "visbasemod.h"
17 #include "visobject.h"
18 #include "vistransform.h"
19 
20 
23 namespace osgGeo { class TexturePlaneNode; }
24 
25 namespace visBase
26 {
27 
28 class TextureChannels;
29 
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 setTextureShift(const Coord&);
54  Coord getTextureShift() const;
55 
56  void setTextureGrowth(const Coord&);
61  Coord getTextureGrowth() const;
62 
63  void setCenter(const Coord3& center);
64  void setWidth(const Coord3& width);
66  Coord3 getWidth() const;
67  Coord3 getCenter() const;
68 
69  void setRotation(const Coord3& spanvec0,
70  const Coord3& spanvec1);
72  void setRotationAndWidth(const Coord3& spanvec0,
73  const Coord3& spanvec1);
76  const Coord3& getSpanningVector(int idx) const;
77 
78  void swapTextureAxes(bool yn=true);
79  bool areTextureAxesSwapped() const;
80 
81  void setDisplayTransformation(const mVisTrans*);
82  const mVisTrans* getDisplayTransformation() const;
83 
84  // deprecated
85  void getTextureCoordinates(TypeSet<Coord3>&) const;
86 
87 protected:
89 
90  ConstRefMan<mVisTrans> displaytrans_;
91 
92  osgGeo::TexturePlaneNode* textureplane_;
93  RefMan<TextureChannels> channels_;
94 
95  Coord3 spanvec0_;
96  Coord3 spanvec1_;
97 
98 public:
99 
100  int getNrTextures() const;
101  const unsigned char* getTextureData() const;
102 
103  mStruct(visBase) TextureDataInfo
104  {
105  TypeSet<Coord3> coords_;
106  TypeSet<Coord> texcoords_;
107  TypeSet<int> ps_;
108  void setEmpty() { coords_.erase(); texcoords_.erase();
109  ps_.erase(); }
110  };
111 
112  bool getTextureDataInfo(int tidx,
113  TextureDataInfo& texinfo) const;
114  bool getTextureInfo(int& width,int& height,
115  int& pixsize) const;
116 };
117 
118 };
119 
ConstRefMan
Definition: ptrman.h:233
Coord3
A cartesian coordinate in 3D space.
Definition: coord.h:72
visBase
Definition: visannot.h:43
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
visBase::TextureRectangle::getTextureDataInfo
bool getTextureDataInfo(int tidx, TextureDataInfo &texinfo) const
visBase::TextureRectangle
A TextureRectangle is a Rectangle with a datatexture. The data is set via setData.
Definition: vistexturerect.h:35
visobject.h
Coord
A cartesian coordinate in 2D space.
Definition: coord.h:25
visBase::TextureChannels
Definition: vistexturechannels.h:50
mStruct
#define mStruct(module)
Definition: commondefs.h:182
mVisTrans
#define mVisTrans
Definition: visdata.h:28
visBase::VisualObjectImpl
Definition: visobject.h:72
osgGeo
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
mCreateDataObj
#define mCreateDataObj(clss)
Definition: visdata.h:214
visBase::TextureRectangle::create
static TextureRectangle * create()
Definition: vistexturerect.h:37
visBase::TextureRectangle::getTextureInfo
bool getTextureInfo(int &width, int &height, int &pixsize) const
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