OpendTect-6_4  6.4
vismarchingcubessurfacedisplay.h
Go to the documentation of this file.
1 #ifndef vismarchingcubessurfacedisplay_h
2 #define vismarchingcubessurfacedisplay_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 "vissurveymod.h"
17 #include "attribsel.h"
18 #include "emposid.h"
19 #include "visobject.h"
20 #include "vissurvobj.h"
21 
22 
23 namespace Geometry { class ExplicitIndexedShape; }
24 namespace EM { class MarchingCubesSurface; class ImplicitBody; }
25 namespace visBase { class GeomIndexedShape; class MarchingCubesSurface;
26  class Transformation; };
27 
28 namespace visSurvey
29 {
30 
32  public visSurvey::SurveyObject
34 public:
38  "MarchingCubesDisplay",
39  ::toUiString(sFactoryKeyword()) );
40 
41  MultiID getMultiID() const;
42  bool isInlCrl() const { return true; }
43 
44  bool hasColor() const { return true; }
45  bool usesColor() const;
46  Color getColor() const;
47  void setColor(Color);
48  bool allowMaterialEdit() const { return true; }
49  NotifierAccess* materialChange();
50 
51  void useTexture(bool yn);
52  bool usesTexture() const;
53  bool showsTexture() const;
54  bool canShowTexture() const;
55 
56  void setDisplayTransformation(const mVisTrans*);
57  const mVisTrans* getDisplayTransformation() const;
58 
59  bool setVisSurface(visBase::MarchingCubesSurface*);
61  bool setEMID(const EM::ObjectID&,TaskRunner*);
62  EM::ObjectID getEMID() const;
63 
64  const char* errMsg() const { return errmsg_.str(); }
65 
66  SurveyObject::AttribFormat getAttributeFormat(int) const;
67  int nrAttribs() const;
68  bool canAddAttrib(int) const;
69  bool canRemoveAttrib() const;
70  bool canHandleColTabSeqTrans(int) const;
71  const ColTab::MapperSetup* getColTabMapperSetup(int,int) const;
72 
73  void setColTabMapperSetup(int,
75  const ColTab::Sequence* getColTabSequence(int) const;
76  bool canSetColTabSequence() const;
77  void setColTabSequence(int,const ColTab::Sequence&,
78  TaskRunner*);
79  void setSelSpec(int,const Attrib::SelSpec&);
80  void setSelSpecs(int attrib,
82  const Attrib::SelSpec* getSelSpec(int attrib,int version=0) const;
83  const TypeSet<Attrib::SelSpec>* getSelSpecs(int attrib) const;
84  void setDepthAsAttrib(int);
85  void setIsoPatch(int);
86  void enableAttrib(int attrib,bool yn);
87  bool isAttribEnabled(int attrib) const;
88  bool hasSingleColorFallback() const { return true; }
89 
90  void getRandomPos(DataPointSet&,TaskRunner*) const;
91  void setRandomPosData( int attrib,
92  const DataPointSet*, TaskRunner*);
93 
94  void setOnlyAtSectionsDisplay(bool yn);
95  bool displayedOnlyAtSections() const;
96 
97  bool canRemoveSelection() const { return true; }
98  void removeSelection(const Selector<Coord3>&,
99  TaskRunner*);
100  EM::MarchingCubesSurface* getMCSurface() const { return emsurface_; }
102  { return displaysurface_; }
103 
104 protected:
105 
106  virtual ~MarchingCubesDisplay();
107  bool updateVisFromEM(bool onlyshape,TaskRunner*);
108  virtual void fillPar(IOPar&) const;
109  virtual bool usePar(const IOPar&);
110  void materialChangeCB(CallBacker*);
111 
112  void getMousePosInfo(const visBase::EventInfo& ei,
113  IOPar& iop ) const;
114  void getMousePosInfo(const visBase::EventInfo&,
115  Coord3& xyzpos, BufferString& val,
116  BufferString& info) const;
117  void otherObjectsMoved(
119  int whichobj);
120  void updateIntersectionDisplay();
121  void updateSingleColor();
122 
123  static const char* sKeyEarthModelID() { return "EM ID"; }
124  static const char* sKeyAttribSelSpec() { return "Attrib SelSpec"; }
125  static const char* sKeyColTabMapper() { return "Coltab mapper"; }
126  static const char* sKeyColTabSequence() { return "Coltab sequence"; }
127  static const char* sKeyUseTexture() { return "Use texture"; }
128 
133 
137 
140 
142  {
147 
148  int planeid_;
150  float planepos_;
151 
152  bool computed_;
153  };
154 
158 
159 public:
160  void displayIntersections(bool yn)
161  { setOnlyAtSectionsDisplay(yn); }
163  { return displayedOnlyAtSections(); }
164 };
165 
166 } // namespace visSurvey
167 
168 #endif
#define mExpClass(module)
Definition: commondefs.h:160
od_int32 ObjectID
Definition: emposid.h:24
float planepos_
Definition: vismarchingcubessurfacedisplay.h:150
bool canRemoveSelection() const
Definition: vismarchingcubessurfacedisplay.h:97
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
EM::MarchingCubesSurface * emsurface_
Definition: vismarchingcubessurfacedisplay.h:130
const char * str() const
Definition: odstring.h:48
Set of data points with group selection.
Definition: datapointset.h:48
const char * errMsg() const
Definition: vismarchingcubessurfacedisplay.h:64
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Export_Basic uiString toUiString(ViewStyle)
Maps from [0,1] -> Color.
Definition: coltabsequence.h:37
bool computed_
Definition: vismarchingcubessurfacedisplay.h:152
visBase::MarchingCubesSurface * getDisplaySurface() const
Definition: vismarchingcubessurfacedisplay.h:101
Interface class for Notifier. See comments there.
Definition: callback.h:161
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Geometry::ExplicitIndexedShape * shape_
Definition: vismarchingcubessurfacedisplay.h:146
int planeid_
Definition: vismarchingcubessurfacedisplay.h:148
Definition: vismarchingcubessurfacedisplay.h:141
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
Definition: factory.h:289
Marching cubes surface.
Definition: emmarchingcubessurface.h:32
bool displayintersections_
Definition: vismarchingcubessurfacedisplay.h:139
Used for displaying a polyline, preview for a random line created throught well path.
Definition: visarrowdisplay.h:20
Definition: vismarchingcubessurfacedisplay.h:31
ObjectSet< PlaneIntersectInfo > intsinfo_
Definition: vismarchingcubessurfacedisplay.h:155
Definition: marchingcubes.h:82
Set of pointers to objects.
Definition: commontypes.h:32
Definition: visgeomindexedshape.h:40
bool hasSingleColorFallback() const
Definition: vismarchingcubessurfacedisplay.h:88
bool areIntersectionsDisplayed() const
Definition: vismarchingcubessurfacedisplay.h:162
VisualObjectImpl
Definition: visobject.h:128
Definition: vismarchingcubessurface.h:32
EM::ImplicitBody * impbody_
Definition: vismarchingcubessurfacedisplay.h:138
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Class that can execute a task.
Definition: task.h:169
void displayIntersections(bool yn)
Definition: vismarchingcubessurfacedisplay.h:160
#define mVisTrans
Definition: visdata.h:31
Attrib::SelSpec selspec_
Definition: vismarchingcubessurfacedisplay.h:131
bool hasColor() const
Definition: vismarchingcubessurfacedisplay.h:44
bool allowMaterialEdit() const
Definition: vismarchingcubessurfacedisplay.h:48
static const char * sKeyEarthModelID()
Definition: vismarchingcubessurfacedisplay.h:123
Setup class for colortable Mapper.
Definition: coltabmapper.h:35
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
A cartesian coordinate in 3D space.
Definition: coord.h:72
bool usestexture_
Definition: vismarchingcubessurfacedisplay.h:134
static const char * sKeyUseTexture()
Definition: vismarchingcubessurfacedisplay.h:127
bool isInlCrl() const
Definition: vismarchingcubessurfacedisplay.h:42
Definition: visannot.h:43
visBase::GeomIndexedShape * visshape_
Definition: vismarchingcubessurfacedisplay.h:145
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool isattribenabled_
Definition: vismarchingcubessurfacedisplay.h:136
BufferString errmsg_
Definition: horizontracker.h:119
const mVisTrans * intersectiontransform_
Definition: vismarchingcubessurfacedisplay.h:157
static const char * sKeyAttribSelSpec()
Definition: vismarchingcubessurfacedisplay.h:124
EM::MarchingCubesSurface * getMCSurface() const
Definition: vismarchingcubessurfacedisplay.h:100
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: embody.h:25
Base class for all &#39;Display&#39; objects.
Definition: vissurvobj.h:58
Definition: visevent.h:44
Implicit representation of a body.
Definition: embody.h:32
ObjectSet< DataPointSet > cache_
Definition: vismarchingcubessurfacedisplay.h:132
visBase::Transformation * model2displayspacetransform_
Definition: vismarchingcubessurfacedisplay.h:156
AttribFormat
Definition: vissurvobj.h:175
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:45
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
static const char * sKeyColTabSequence()
Definition: vismarchingcubessurfacedisplay.h:126
Definition: indexedshape.h:239
static const char * sKeyColTabMapper()
Definition: vismarchingcubessurfacedisplay.h:125
The Transformation is an object that transforms everything following the node.
Definition: vistransform.h:74
visBase::MarchingCubesSurface * displaysurface_
Definition: vismarchingcubessurfacedisplay.h:129
Definition: arraytesselator.h:21
bool validtexture_
Definition: vismarchingcubessurfacedisplay.h:135
Compound key consisting of ints.
Definition: multiid.h:25
char planeorientation_
Definition: vismarchingcubessurfacedisplay.h:149

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