Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
PoPolarLinAxis.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_POLAR_LIN_AXIS_
25#define _PO_POLAR_LIN_AXIS_
26
27#include <Inventor/fields/SoSFEnum.h>
28#include <Inventor/fields/SoSFFloat.h>
29
30#include <MeshViz/graph/PoPolarAxis.h>
31#include <MeshViz/graph/PiNumericFormat.h>
32#include <MeshViz/graph/PbNumericDisplayFormat.h>
33
104
105 SO_KIT_HEADER(PoPolarLinAxis) ;
106
107
108 public:
109
123
124 /* Fields */
125
131
136
141
145 PoPolarLinAxis(float offset, float startRadius, float endRadius, float theta,
146 float step = 0.0) ;
147
148
149
150 /* Methods */
151
155 virtual void rebuild() ;
156
165
171
175 float getStep() const ;
176
177 /*----------------------------------------------------------------------------*/
178 private:
179 static void initClass() ;
180 static void exitClass() ;
181
182 private:
183 struct PolarLinAxisAttr {
184 float step ;
185 float firstVal ;
186 PiNumericFormat numericFormat ;
187 } ;
188 // Polar axis attr
189
190 // Methods
191 // Destructor
192 virtual ~PoPolarLinAxis() ;
193 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
194 virtual void setDefaultOnNonWritingFields() ;
195
196 // Save all axis attributes which can be modified by MeshViz.
197 virtual void saveAxisAttr() ;
198
199 // Manage the connection with PbBase objects
200 virtual void basicObjectChange(PbBase *basicObj) ;
201
202 // Overloaded methods
203 virtual void addElementsAllCaches() ;
204 virtual void preRebuild() ;
205
206 private:
207 // Init method
208 void init(float step = 0.0) ;
209
210 // Sensors
211 FieldSensorList fieldSensorList ;
212
213 // Computed polar linear axis attributes
214 PolarLinAxisAttr polLinAxisAttr ;
215
216 // Numeric Display format
217 PbNumericDisplayFormat *m_numericDisplayFormat, m_defaultNumericDisplayFormat ;
218
219 // List of fields defined in this class
220 SoFieldList fieldList ;
221
222} ;
223
224/*----------------------------------------------------------------------------*/
225
226#endif /* _PO_POLAR_LIN_AXIS_ */
227
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for all b...
Definition PbBase.h:49
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to define a numeri...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for polar...
Definition PoPolarAxis.h:43
SoSFFloat theta
Rotation angle of the axis in radians.
Definition PoPolarAxis.h:98
SoSFFloat endRadius
Radius at the end of the axis.
Definition PoPolarAxis.h:93
SoSFFloat offset
Offset for the axis.
Definition PoPolarAxis.h:83
SoSFFloat startRadius
Radius at the start of the axis.
Definition PoPolarAxis.h:88
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to build a polar l...
const PbNumericDisplayFormat * getFormat() const
Gets a reference to a PbNumericDisplayFormat object for the numerical display format for the graduati...
SoSFEnum gradFit
This flag indicates if the first graduation is rounded or not.
virtual void rebuild()
Forces node-kit rebuilding.
float getStep() const
Returns the step (the step computed can be different from the associated field).
PoPolarLinAxis(float offset, float startRadius, float endRadius, float theta, float step=0.0)
Constructor.
GradFit
First graduation rounded or not.
@ GRAD_FIT
The first graduation is rounded.
@ GRAD_UNFIT
The first graduation is not rounded.
PoPolarLinAxis()
Default constructor.
SoSFFloat step
Defines the step for the axis.
void setFormat(PbNumericDisplayFormat *format)
Sets a reference to a PbNumericDisplayFormat object for the numerical display format for the graduati...
Maintains a list of pointers to fields.
Definition SoFieldList.h:72
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a floating-point value.
Definition SoSFFloat.h:78
int SbBool
Boolean type.
Definition SbBase.h:87