Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
PoPolarAxis.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_POLAR_AXIS_
25#define _PO_POLAR_AXIS_
26
30
43class PoPolarAxis : public PoAxis {
44
46
47 /* Define fields for new parts */
48 SO_KIT_CATALOG_ENTRY_HEADER(multFactorSep) ;
49 SO_KIT_CATALOG_ENTRY_HEADER(multFactorApp) ;
50 SO_KIT_CATALOG_ENTRY_HEADER(multFactor) ;
51
52
53
54 public:
55
77
78 /* Fields */
79
84
89
94
99
100 /* Ten power attributes */
101
106
114
120 void getMultFactor(MultFactorPosition &position, float &distAxis) const ;
121
122 /*----------------------------------------------------------------------------*/
123 private:
124 static void initClass() ;
125 static void exitClass() ;
126
127 struct MultFactor {
128 MultFactorPosition position ;
129 float distAxis ;
130 } ;
131
132 private:
133 struct PolarAxisAttr {
134 MultFactor multFactor ;
135 } ;
136 // Polar axis attr
137
138 // Constructor
139 PoPolarAxis(float offset = 0., float startRadius = 0., float endRadius = 1.,
140 float theta = 0.) ;
141 // Destructor
142 virtual ~PoPolarAxis() ;
143
144 // Methods
145 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
146 virtual void setDefaultOnNonWritingFields() ;
147
148 // Build tick - The ticks are built under the node "group"
149 virtual void buildGridLines(const std::vector<float>& xGrad, SoGroup *group) ;
150
151 // Save all axis attributes which can be modified by MeshViz.
152 virtual void saveAxisAttr() ;
153
154 // Computed polar axis attributes
155 PolarAxisAttr polAxisAttr ;
156
157 private:
158 // Sensors
159 FieldSensorList fieldSensorList ;
160
161 // List of fields defined in this class
162 SoFieldList fieldList ;
163} ;
164
165/*----------------------------------------------------------------------------*/
166
167#endif /* _PO_POLAR_AXIS_ */
168
#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> Abstract class for axis ...
Definition PoAxis.h:58
<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
void getMultFactor(MultFactorPosition &position, float &distAxis) const
Returns the current multiplicative factor attributes (those computed can be different from the associ...
MultFactorPosition
Type of position of the multiplicative factor.
Definition PoPolarAxis.h:59
@ MULT_FACTOR_GRAD
The multiplicative factor is at the graduations of the axis.
Definition PoPolarAxis.h:75
@ MULT_FACTOR_START
The multiplicative factor is at the start of the axis.
Definition PoPolarAxis.h:63
@ MULT_FACTOR_EXTR
The multiplicative factor is at the start and at the end of the axis.
Definition PoPolarAxis.h:71
@ MULT_FACTOR_END
The multiplicative factor is at the end of the axis.
Definition PoPolarAxis.h:67
SoSFFloat offset
Offset for the axis.
Definition PoPolarAxis.h:83
SoSFFloat multFactorDistAxis
Distance from the mutiplicative factor to the axis.
SoSFEnum multFactorPosition
Position of the multiplicative factor.
SoSFFloat startRadius
Radius at the start of the axis.
Definition PoPolarAxis.h:88
Maintains a list of pointers to fields.
Definition SoFieldList.h:72
Base class for all group nodes.
Definition SoGroup.h:122
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