OpendTect  6.3
vistexturecoords.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: Kristofer Tingdahl
8  Date: 4-11-2002
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "visdata.h"
15 #include "positionlist.h"
16 #include "threadlock.h"
17 #include "viscoord.h"
18 
19 
20 
21 namespace visBase
22 {
23 
24 
26 {
27 public:
30  void copyFrom(const TextureCoords&);
31  int size(bool includedeleted=false) const;
32  void setCoord(int idx,const Coord3f&);
33  void setCoord(int idx,const Coord2f&);
34  int addCoord(const Coord3f&);
35  int addCoord(const Coord2f&);
36  Coord3f getCoord(int) const;
37  void setPositions(const Coord2f*,int sz,int start);
38  void clear();
39  int nextID(int previd) const;
40  void removeCoord(int);
41  bool isEmpty() const { return size()==0; }
42 
43  osg::Array* osgArray() { return osgcoords_; }
44  const osg::Array* osgArray() const { return osgcoords_; }
45 
46 protected:
47  ~TextureCoords();
48 
49  int searchFreeIdx();
50  void setPosWithoutLock(int,const Coord2f&);
55 
56  osg::Array* osgcoords_;
58 };
59 
60 
62 {
63 public:
65 
66  int nextID(int previd) const;
67  Coord3 get(int id) const;
68  bool isDefined(int id) const;
69  void set(int id,const Coord3&);
70  int add(const Coord3&);
71  void remove(int id);
72  int size() const { return texturecoords_.size(); }
73  void addValue(int,const Coord3&);
74  void remove(const TypeSet<int>&);
75  TextureCoords* getTextureCoords() { return &texturecoords_; }
76 
77 protected:
79 
81 };
82 
83 }; //namespace
#define mExpClass(module)
Definition: commondefs.h:157
Definition: vistexturecoords.h:25
Interface for a list of Coord3 with automatically maintained IDs.
Definition: positionlist.h:70
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:51
int nrfreecoords_
Definition: vistexturecoords.h:54
static TextureCoords * create()
Definition: vistexturecoords.h:28
osg::Array * osgcoords_
Definition: vistexturecoords.h:56
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:59
void clear(std::ios &)
3D point or vector
Definition: commontypes.h:57
TextureCoords * getTextureCoords()
Definition: vistexturecoords.h:75
Threads::Lock lock_
Definition: vistexturecoords.h:57
int size() const
Definition: vistexturecoords.h:72
int lastsearchedidx_
Definition: vistexturecoords.h:53
osg::Array * osgArray()
Definition: vistexturecoords.h:43
Definition: visannot.h:40
TextureCoords & texturecoords_
Definition: vistexturecoords.h:80
bool isEmpty(const char *)
#define mCreateDataObj(clss)
Definition: visdata.h:210
const osg::Array * osgArray() const
Definition: vistexturecoords.h:44
Definition: vistexturecoords.h:61

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