Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
PoCurve.h
Go to the documentation of this file.
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_CURVE_
25#define _PO_CURVE_
26
28
37
38
77class PoCurve : public PoGraphMaster {
78
80
81 /* Define fields for new parts */
82 SO_KIT_CATALOG_ENTRY_HEADER(curveFillingSep) ;
83 SO_KIT_CATALOG_ENTRY_HEADER(curveFillingApp) ;
84 SO_KIT_CATALOG_ENTRY_HEADER(curveFilling) ;
85
86 SO_KIT_CATALOG_ENTRY_HEADER(curvePointSep) ;
87 SO_KIT_CATALOG_ENTRY_HEADER(curvePointApp) ;
88 SO_KIT_CATALOG_ENTRY_HEADER(curvePoint) ;
89
93
94 SO_KIT_CATALOG_ENTRY_HEADER(raisePointSep) ;
95 SO_KIT_CATALOG_ENTRY_HEADER(raisePointApp) ;
96 SO_KIT_CATALOG_ENTRY_HEADER(raisePoint) ;
97
98
99 public:
100
130
131
132
174
175
176
177
178
179 /* Fields */
180
185
190
195
200
207
213
219
225
231
242
249
255
261
267
273
279
280
281
282 /* Methods */
283
288 { init(TRUE) ; }
289
294 PoCurve(int numPoints, const SbVec2f *_point, CurveRep _curveRep = CURVE_POLYLINE)
295 { init(FALSE, numPoints, _point, _curveRep) ; }
296
300 virtual void rebuild() ;
301
302 /*----------------------------------------------------------------------------*/
303
304
305 private:
306 static void initClass() ;
307 static void exitClass() ;
308
309 private:
310 // Methods
311 // Destructor
312 virtual ~PoCurve() ;
313 virtual void setDefaultOnNonWritingFields() ;
314 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
315
316 private:
317 // Init method
318 void init(SbBool isDefault, int numPoints=0, const SbVec2f *_point=NULL,
319 CurveRep _curveRep = CURVE_POLYLINE) ;
320
321 // Build raise points
322 void drawRaisePoints(int numPoints, const SbVec3f *pointList) ;
323
324 // Build markers
325 void drawMarkers(int numPoints, const SbVec3f *pointList) ;
326
327 // Compute interpolation
328 static void calculateInterpolation(const SbVec2f &a, const SbVec2f &b, float x,
329 float &y) ;
330 static void calculateInterpolation2(const SbVec2f &a, const SbVec2f &b, float y,
331 float &x) ;
332 // Sensors
333 FieldSensorList fieldSensorList ;
334
335 // List of fields defined in this class
336 SoFieldList fieldList ;
337
338} ;
339
340/*----------------------------------------------------------------------------*/
341
342#endif /* _PO_CURVE_ */
343
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75
#define SO_KIT_CATALOG_ENTRY_HEADER(partName)
Definition SoSubKit.h:107
#define SO_KIT_HEADER(className)
Definition SoSubKit.h:91
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Builds a 2D curve.
Definition PoCurve.h:77
SoMFVec2f point
Point list of the curve.
Definition PoCurve.h:184
SoSFEnum markerFilterType
Defines the type of marker filter.
Definition PoCurve.h:206
CurveRep
Curve representation.
Definition PoCurve.h:136
@ CURVE_POLYLINE
The curve is a sequence of straight lines linking all points.
Definition PoCurve.h:144
@ CURVE_HISTO_Y
Stair curve no necessarily passing through all points.
Definition PoCurve.h:164
@ CURVE_STAIRS_X
Stair curve passing through all points.
Definition PoCurve.h:152
@ CURVE_STAIRS_Y
Stair curve passing through all points.
Definition PoCurve.h:156
@ CURVE_NONE
No curve is built.
Definition PoCurve.h:140
@ CURVE_HISTO_X
Stair curve no necessarily passing through all points.
Definition PoCurve.h:160
@ CURVE_STAIRS_2Y
Double stair curve.
Definition PoCurve.h:172
@ CURVE_SMOOTH
The curve is a smoothing passing through all points.
Definition PoCurve.h:148
@ CURVE_STAIRS_2X
Double stair curve.
Definition PoCurve.h:168
SoMFFloat markerXList
A list of points (of the computed curve points) is selected by their abscises.
Definition PoCurve.h:230
virtual void rebuild()
Forces node-kit rebuilding.
SoSFFloat raiseXPeriod
One point (of the computed curve points) in every raiseXPeriod is selected.
Definition PoCurve.h:266
FilterType
Filter type.
Definition PoCurve.h:104
@ X_PERIOD
One point of computed curve points is selected in every xPeriod.
Definition PoCurve.h:124
@ ALL_POINTS
All points of point are selected.
Definition PoCurve.h:112
@ INDEX_PERIOD
One point of point in every indexPeriod is selected.
Definition PoCurve.h:116
@ X_LIST
A list of points of computed curve points are selected by a list of abscises.
Definition PoCurve.h:128
@ INACTIVE
Filter is inactive.
Definition PoCurve.h:108
@ INDEX_LIST
A list of points of point is selected by their indices.
Definition PoCurve.h:120
SoSFFloat raiseThreshold
Raise points are vertical lines joining the curve points and the specified threshold.
Definition PoCurve.h:278
SoSFFloat fillingThreshold
Defines the threshold to fill the curve.
Definition PoCurve.h:199
PoCurve()
Default constructor.
Definition PoCurve.h:287
SoSFEnum curveRep
Defines the curve representation (polyline, smooth, stair, ...)
Definition PoCurve.h:189
SoMFInt32 raiseIndexList
A list of points (of point) is selected by their indices.
Definition PoCurve.h:260
SoSFInt32 markerIndexPeriod
One point (of point) in every consecutive markerIndexPeriod is selected.
Definition PoCurve.h:212
SoSFFloat markerXPeriod
One point (of the computed curve points) in every markerXPeriod is selected.
Definition PoCurve.h:224
SoMFInt32 markerIndexList
A list of points (of point) is selected by their indices.
Definition PoCurve.h:218
SoSFInt32 raiseIndexPeriod
One point (of point) in every consecutive raiseIndexPeriod is selected.
Definition PoCurve.h:254
PoCurve(int numPoints, const SbVec2f *_point, CurveRep _curveRep=CURVE_POLYLINE)
Constructor.
Definition PoCurve.h:294
SoSFBool isCurveFilled
Indicates if the curve is filled or not.
Definition PoCurve.h:194
SoMFFloat raiseXList
A list of points (of the computed curve points) is selected by their abscises.
Definition PoCurve.h:272
SoSFEnum raiseFilterType
Defines the type of raise filter.
Definition PoCurve.h:248
SoSFString markerString
The markers are defined by a string.
Definition PoCurve.h:241
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract base class for ...
2D vector class.
Definition SbVec.h:76
3D vector class.
Definition SbVec.h:932
Maintains a list of pointers to fields.
Definition SoFieldList.h:72
Multiple-value field containing any number of floating point values.
Definition SoMFFloat.h:90
Multiple-value field containing any number of int32_t integers.
Definition SoMFInt32.h:88
Multiple-value field containing any number of two-dimensional vectors.
Definition SoMFVec2f.h:89
Field containing a single Boolean value.
Definition SoSFBool.h:79
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
Field containing a string.
Definition SoSFString.h:117
int SbBool
Boolean type.
Definition SbBase.h:87