OpendTect-6_4  6.4
vistexturecoords.h
Go to the documentation of this file.
1 #ifndef vistexturecoords_h
2 #define vistexturecoords_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "visdata.h"
18 #include "positionlist.h"
19 #include "threadlock.h"
20 #include "viscoord.h"
21 
22 
23 
24 namespace visBase
25 {
26 
27 
29 {
30 public:
33  void copyFrom(const TextureCoords&);
34  int size(bool includedeleted=false) const;
35  void setCoord(int idx,const Coord3&);
36  void setCoord(int idx,const Coord&);
37  int addCoord(const Coord3&);
38  int addCoord(const Coord&);
39  Coord3 getCoord(int) const;
40  void setPositions(const Coord*,int sz,int start);
41  void clear();
42  int nextID(int previd) const;
43  void removeCoord(int);
44  bool isEmpty() const { return size()==0; }
45 
46  osg::Array* osgArray() { return osgcoords_; }
47  const osg::Array* osgArray() const { return osgcoords_; }
48 
49 protected:
50  ~TextureCoords();
51 
52  int searchFreeIdx();
53  void setPosWithoutLock(int,const Coord&);
58 
59  osg::Array* osgcoords_;
61 };
62 
63 
65 {
66 public:
68 
69  int nextID(int previd) const;
70  Coord3 get(int id) const;
71  bool isDefined(int id) const;
72  void set(int id,const Coord3&);
73  int add(const Coord3&);
74  void remove(int id);
75  int size() const { return texturecoords_.size(); }
76  void addValue(int,const Coord3&);
77  void remove(const TypeSet<int>&);
78  TextureCoords* getTextureCoords() { return &texturecoords_; }
79 
80 protected:
82 
84 };
85 
86 }; //namespace
87 
88 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: vistexturecoords.h:28
Interface for a list of Coord3 with automatically maintained IDs.
Definition: positionlist.h:72
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
int nrfreecoords_
Definition: vistexturecoords.h:57
static TextureCoords * create()
Definition: vistexturecoords.h:31
osg::Array * osgcoords_
Definition: vistexturecoords.h:59
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
void clear(std::ios &)
A cartesian coordinate in 2D space.
Definition: coord.h:25
TextureCoords * getTextureCoords()
Definition: vistexturecoords.h:78
Threads::Lock lock_
Definition: vistexturecoords.h:60
int size() const
Definition: vistexturecoords.h:75
int lastsearchedidx_
Definition: vistexturecoords.h:56
A cartesian coordinate in 3D space.
Definition: coord.h:72
osg::Array * osgArray()
Definition: vistexturecoords.h:46
Definition: visannot.h:43
TextureCoords & texturecoords_
Definition: vistexturecoords.h:83
#define mCreateDataObj(clss)
Definition: visdata.h:209
const osg::Array * osgArray() const
Definition: vistexturecoords.h:47
bool isEmpty(const NLAModel *mdl)
Definition: vistexturecoords.h:64

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