Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
PoLabel.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _PO_LABEL_
25#define _PO_LABEL_
26
27#include <MeshViz/graph/PoChart.h>
28
29#include <Inventor/fields/SoSFBitMask.h>
30#include <Inventor/fields/SoSFEnum.h>
31#include <Inventor/fields/SoMFVec3f.h>
32#include <Inventor/fields/SoSFFloat.h>
33
34class SoCoordinate3 ;
35
87class PoLabel : public PoChart {
88
89 SO_KIT_HEADER(PoLabel) ;
90
91 /* Define fields for new parts */
92 SO_KIT_CATALOG_ENTRY_HEADER(label) ;
93 SO_KIT_CATALOG_ENTRY_HEADER(labelLineSep) ;
94 SO_KIT_CATALOG_ENTRY_HEADER(labelLineApp) ;
95 SO_KIT_CATALOG_ENTRY_HEADER(labelLine) ;
96
97
98 public:
99
110
116 NAME
117 } ;
118
119
120
146
147
148
152 enum Axis {
155
157 Y
158 } ;
159
160
161
162 /* Fields */
163
170
177
190
206
211
218
226
231
232 /*----------------------------------------------------------------------------*/
233
234
235 private:
236 static void initClass() ;
237 static void exitClass() ;
238
239 private:
240 virtual ~PoLabel() ;
241 // Destructor.
242
243 // Overloaded methods
244 virtual void rebuild() ;
245 virtual void addElementsAllCaches() ;
246 virtual void preRebuild() ;
247
248 // Methods
249 virtual void setDefaultOnNonWritingFields() ;
250 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
251
252 private:
253 void drawLabelLine(const SbBox2f &labelLimit, float labelDepth, const SbVec3f &origPos,
254 SoCoordinate3 *labelLineCoords) ;
255
256 const SbString* retreiveValueName(float xValue, float yValue,
257 int size, const float *x,
258 const float *y, const SbString *valuesNames) const ;
259
260 // Sensors
261 FieldSensorList fieldSensorList ;
262
263 // List of fields defined in this class
264 SoFieldList fieldList ;
265} ;
266
267/*----------------------------------------------------------------------------*/
268
269#endif /* _PO_LABEL_ */
270
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract base class for ...
Definition PoChart.h:44
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to build a label f...
Definition PoLabel.h:87
SoSFEnum position
Defines the position of the labels.
Definition PoLabel.h:205
PoLabel()
Constructor.
Axis
values computation.
Definition PoLabel.h:152
@ X
X-Axis
Definition PoLabel.h:154
@ Y
Y-Axis.
Definition PoLabel.h:157
SoSFFloat fontSize
Font size of labels.
Definition PoLabel.h:225
SoSFInt32 stringsIndex
Defines the index of the set of strings used for the names attached to labels when valueType is equal...
Definition PoLabel.h:169
SoSFBitMask valueType
Defines the type of values displayed by the labels.
Definition PoLabel.h:189
SoSFFloat threshold
Defines the threshold used to the set position of the label.
Definition PoLabel.h:210
SoMFVec3f offset
Defines an offset applied to the label.
Definition PoLabel.h:217
Position
Position of the labels.
Definition PoLabel.h:124
@ MIDDLE_POS
The abscissas (resp ordinate) is given by the current mesh 1D geometry and the ordinate (resp.
Definition PoLabel.h:136
@ THRESHOLD_POS
The abscissas (resp ordinate) is given by the current mesh 1D geometry and the ordinate (resp.
Definition PoLabel.h:143
@ VALUE_POS
The label position is the given by the current mesh geometry.
Definition PoLabel.h:128
ValueType
Type of value displayed by the labels.
Definition PoLabel.h:103
@ VALUE
The values displayed correspond to the the ordinates (resp.
Definition PoLabel.h:109
@ NAME
The values displayed correspond to the names associated to the strings-set specified by the field str...
Definition PoLabel.h:116
SoSFEnum axis
Defines from which axis the position and type of displayed values computation is done.
Definition PoLabel.h:176
2D box class.
Definition SbBox.h:1798
Class for smart character strings.
Definition SbString.h:202
3D vector class.
Definition SbVec.h:932
Coordinate point node.
Maintains a list of pointers to fields.
Definition SoFieldList.h:72
Multiple-value field containing any number of three-dimensional vectors.
Definition SoMFVec3f.h:181
Single-value field containing a set of bit flags.
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a floating-point value.
Definition SoSFFloat.h:78
Field containing a int32_t integer.
Definition SoSFInt32.h:80
int SbBool
Boolean type.
Definition SbBase.h:87