Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SmWellLogKit.h
Go to the documentation of this file.
1 #ifndef SMALLCHANGE_SMWELLLOGKIT_H
2 #define SMALLCHANGE_SMWELLLOGKIT_H
3 
4 /**************************************************************************\
5  * Copyright (c) Kongsberg Oil & Gas Technologies AS
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are
10  * met:
11  *
12  * Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  *
19  * Neither the name of the copyright holder nor the names of its
20  * contributors may be used to endorse or promote products derived from
21  * this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 \**************************************************************************/
35 
36 #include <Inventor/nodekits/SoSubKit.h>
37 #include <Inventor/nodekits/SoBaseKit.h>
38 #include <Inventor/fields/SoSFBool.h>
39 #include <Inventor/fields/SoSFTime.h>
40 #include <Inventor/fields/SoSFString.h>
41 #include <Inventor/fields/SoSFColor.h>
42 #include <Inventor/fields/SoMFColor.h>
43 #include <Inventor/fields/SoMFString.h>
44 #include <Inventor/fields/SoSFFloat.h>
45 #include <Inventor/fields/SoSFInt32.h>
46 #include <Inventor/fields/SoMFString.h>
47 #include <Inventor/fields/SoMFFloat.h>
48 #include <Inventor/fields/SoMFVec3d.h>
49 #include <SmallChange/basic.h>
50 
51 class SmWellLogKitP;
52 class SoSensor;
53 class SbString;
54 class SmTooltipKit;
55 
56 class SMALLCHANGE_DLL_API SmWellLogKit : public SoBaseKit {
57  typedef SoBaseKit inherited;
58 
59  SO_KIT_HEADER(SmWellLogKit);
60 
61  SO_KIT_CATALOG_ENTRY_HEADER(topSeparator);
62  SO_KIT_CATALOG_ENTRY_HEADER(tooltip);
63  SO_KIT_CATALOG_ENTRY_HEADER(utm);
64  SO_KIT_CATALOG_ENTRY_HEADER(transform);
65  SO_KIT_CATALOG_ENTRY_HEADER(topLod);
66  SO_KIT_CATALOG_ENTRY_HEADER(topLodGroup);
67  SO_KIT_CATALOG_ENTRY_HEADER(shapeHints);
68  SO_KIT_CATALOG_ENTRY_HEADER(wellBaseColor);
69  SO_KIT_CATALOG_ENTRY_HEADER(wellDrawStyle);
70  SO_KIT_CATALOG_ENTRY_HEADER(well);
71  SO_KIT_CATALOG_ENTRY_HEADER(wellNameSep);
72  SO_KIT_CATALOG_ENTRY_HEADER(wellNameColor);
73  SO_KIT_CATALOG_ENTRY_HEADER(wellName);
74  SO_KIT_CATALOG_ENTRY_HEADER(lightModel);
75  SO_KIT_CATALOG_ENTRY_HEADER(lod);
76  SO_KIT_CATALOG_ENTRY_HEADER(lodSeparator);
77  SO_KIT_CATALOG_ENTRY_HEADER(callbackNode);
78  SO_KIT_CATALOG_ENTRY_HEADER(coord);
79  SO_KIT_CATALOG_ENTRY_HEADER(materialBinding);
80  SO_KIT_CATALOG_ENTRY_HEADER(faceSetColor);
81  SO_KIT_CATALOG_ENTRY_HEADER(pickStyle);
82  SO_KIT_CATALOG_ENTRY_HEADER(drawStyleSwitch);
83  SO_KIT_CATALOG_ENTRY_HEADER(lineSet);
84  SO_KIT_CATALOG_ENTRY_HEADER(faceSet);
85  SO_KIT_CATALOG_ENTRY_HEADER(info);
86  SO_KIT_CATALOG_ENTRY_HEADER(topsSep);
87  SO_KIT_CATALOG_ENTRY_HEADER(topsFontStyle);
88  SO_KIT_CATALOG_ENTRY_HEADER(topsBaseColor);
89  SO_KIT_CATALOG_ENTRY_HEADER(topsList);
90  SO_KIT_CATALOG_ENTRY_HEADER(topInfo);
91 
92 public:
93  SmWellLogKit(void);
94  static void initClass(void);
95 
99 
106 
109 
112 
115 
120 
125 
128 
131 
132  virtual void GLRender(SoGLRenderAction * action);
133  virtual void getBoundingBox(SoGetBoundingBoxAction * action);
134  virtual void handleEvent(SoHandleEventAction * action);
135 
136  virtual void callback(SoCallbackAction * action);
137  virtual void getMatrix(SoGetMatrixAction * action);
138  virtual void rayPick(SoRayPickAction * action);
139  virtual void search(SoSearchAction * action);
140  virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
141 
142  void addTooltipInfo(const char * name,
143  const int curveidx,
144  const int numvalues,
145  const float * data,
146  const char ** datatext);
147 
148 protected:
149  virtual SbBool readInstance(SoInput * in, unsigned short flags);
150  virtual void notify(SoNotList * l);
151  virtual ~SmWellLogKit();
152  virtual void setDefaultOnNonWritingFields(void);
153 
154 public:
155 
156 private:
157 
158  int findPickIdx(const SbVec3f & p) const;
159  SbBool setTooltipInfo(const int idx, SmTooltipKit * tooltip);
160  void connectNodes(void);
161  int getNumCurves(void) const;
162  int getNumCurveValues(void) const;
163  float getDepth(const int idx) const;
164  float getLeftCurveData(const int idx) const;
165  float getRightCurveData(const int idx) const;
166 
167  friend class SmWellLogKitP;
168  SmWellLogKitP * pimpl;
169 };
170 
171 #endif // SMALLCHANGE_SMWELLLOGKIT_H
virtual void search(SoSearchAction *action)
SoMFString curveNames
Definition: SmWellLogKit.h:100
virtual void notify(SoNotList *l)
SoSFFloat rightCurveMax
Definition: SmWellLogKit.h:130
SoMFFloat topsDepths
Definition: SmWellLogKit.h:121
SoSFFloat leftCurveMin
Definition: SmWellLogKit.h:126
SoSFFloat rightSize
Definition: SmWellLogKit.h:105
SoSFBool leftUseLog
Definition: SmWellLogKit.h:113
virtual void handleEvent(SoHandleEventAction *action)
virtual void setDefaultOnNonWritingFields(void)
SoSFString name
Definition: SmWellLogKit.h:97
SoMFString curveUnits
Definition: SmWellLogKit.h:102
virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action)
SoMFString curveDescription
Definition: SmWellLogKit.h:101
SoSFFloat wellRadius
Definition: SmWellLogKit.h:118
SoSFColor topsColor
Definition: SmWellLogKit.h:123
virtual void getMatrix(SoGetMatrixAction *action)
SoSFFloat lodDistance1
Definition: SmWellLogKit.h:116
virtual void GLRender(SoGLRenderAction *action)
SoSFFloat lodDistance2
Definition: SmWellLogKit.h:117
virtual SbBool readInstance(SoInput *in, unsigned short flags)
SoMFVec3d wellCoord
Definition: SmWellLogKit.h:98
SoSFFloat rightCurveMin
Definition: SmWellLogKit.h:129
static void initClass(void)
Definition: SmWellLogKit.h:56
SoMFFloat curveData
Definition: SmWellLogKit.h:103
SoMFColor wellColor
Definition: SmWellLogKit.h:119
SoSFFloat undefVal
Definition: SmWellLogKit.h:96
SoSFFloat leftSize
Definition: SmWellLogKit.h:104
SoSFBool rightUseLog
Definition: SmWellLogKit.h:114
SoSFColor rightColor
Definition: SmWellLogKit.h:111
SoSFFloat leftCurveMax
Definition: SmWellLogKit.h:127
virtual void callback(SoCallbackAction *action)
The SmTooltipKit class...FIXME: doc.
Definition: SmTooltipKit.h:51
SoMFString topsNames
Definition: SmWellLogKit.h:122
virtual void getBoundingBox(SoGetBoundingBoxAction *action)
SoSFColor leftColor
Definition: SmWellLogKit.h:110
SoSFInt32 rightCurveIndex
Definition: SmWellLogKit.h:108
virtual void rayPick(SoRayPickAction *action)
SoSFInt32 leftCurveIndex
Definition: SmWellLogKit.h:107
SoSFFloat topsSize
Definition: SmWellLogKit.h:124