00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 #ifndef _PO_POLAR_LIN_AXIS_ 00025 #define _PO_POLAR_LIN_AXIS_ 00026 00027 #include <Inventor/fields/SoSFEnum.h> 00028 #include <Inventor/fields/SoSFFloat.h> 00029 00030 #include <MeshViz/graph/PoPolarAxis.h> 00031 #include <MeshViz/graph/PiNumericFormat.h> 00032 #include <MeshViz/graph/PbNumericDisplayFormat.h> 00033 00103 class PoPolarLinAxis : public PoPolarAxis { 00104 00105 SO_KIT_HEADER(PoPolarLinAxis) ; 00106 00107 00108 public: 00109 00113 enum GradFit { 00117 GRAD_FIT, 00121 GRAD_UNFIT 00122 } ; 00123 00124 /* Fields */ 00125 00130 SoSFFloat step ; 00131 00135 SoSFEnum gradFit ; 00136 00140 PoPolarLinAxis() ; 00141 00145 PoPolarLinAxis(float offset, float startRadius, float endRadius, float theta, 00146 float step = 0.0) ; 00147 00148 00149 00150 /* Methods */ 00151 00155 virtual void rebuild() ; 00156 00164 void setFormat(PbNumericDisplayFormat *format) ; 00165 00170 const PbNumericDisplayFormat *getFormat() const ; 00171 00175 float getStep() const ; 00176 00177 /*----------------------------------------------------------------------------*/ 00178 private: 00179 static void initClass() ; 00180 static void exitClass() ; 00181 00182 private: 00183 struct PolarLinAxisAttr { 00184 float step ; 00185 float firstVal ; 00186 PiNumericFormat numericFormat ; 00187 } ; 00188 // Polar axis attr 00189 00190 // Methods 00191 // Destructor 00192 virtual ~PoPolarLinAxis() ; 00193 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ; 00194 virtual void setDefaultOnNonWritingFields() ; 00195 00196 // Save all axis attributes which can be modified by MeshViz. 00197 virtual void saveAxisAttr() ; 00198 00199 // Manage the connection with PbBase objects 00200 virtual void basicObjectChange(PbBase *basicObj) ; 00201 00202 // Overloaded methods 00203 virtual void addElementsAllCaches() ; 00204 virtual void preRebuild() ; 00205 00206 private: 00207 // Init method 00208 void init(float step = 0.0) ; 00209 00210 // Sensors 00211 FieldSensorList fieldSensorList ; 00212 00213 // Computed polar linear axis attributes 00214 PolarLinAxisAttr polLinAxisAttr ; 00215 00216 // Numeric Display format 00217 PbNumericDisplayFormat *m_numericDisplayFormat, m_defaultNumericDisplayFormat ; 00218 00219 // List of fields defined in this class 00220 SoFieldList fieldList ; 00221 00222 } ; 00223 00224 /*----------------------------------------------------------------------------*/ 00225 00226 #endif /* _PO_POLAR_LIN_AXIS_ */ 00227 00228