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-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 #ifndef _PO_CARTESIAN_AXIS_ 00025 #define _PO_CARTESIAN_AXIS_ 00026 00027 #include <MeshViz/graph/PoAxis.h> 00028 #include <MeshViz/graph/PbDomain.h> 00029 00030 00031 #include <Inventor/fields/SoSFEnum.h> 00032 #include <Inventor/fields/SoSFFloat.h> 00033 #include <Inventor/fields/SoSFVec3f.h> 00034 00035 00036 class SoTransform ; 00037 00048 class PoCartesianAxis : public PoAxis { 00049 00050 SO_KIT_HEADER(PoCartesianAxis) ; 00051 00052 00053 public: 00054 00055 00056 00057 /* Fields */ 00058 00062 SoSFVec3f start ; 00063 00067 SoSFFloat end ; 00068 00083 SoSFFloat gradStart; 00084 00093 SoSFFloat gradEnd; 00094 00099 SoSFEnum type ; 00100 00104 enum Type { 00108 XY, 00112 XZ, 00116 YX, 00120 YZ, 00124 ZX, 00128 ZY 00129 } ; 00130 00131 00132 00133 /*----------------------------------------------------------------------------*/ 00134 00135 00136 private: 00137 static void initClass() ; 00138 static void exitClass() ; 00139 00140 private: 00141 PoCartesianAxis() ; 00142 // Constructor 00143 00144 virtual ~PoCartesianAxis() ; 00145 // Destructor 00146 00147 // Methods 00148 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ; 00149 virtual void setDefaultOnNonWritingFields() ; 00150 00151 // Compute axis tranformation 00152 void computeTransfo(const SbVec3f &refPoint, SoMatrixTransform *transfo, 00153 float &deltaX, float &deltaY) ; 00154 00155 private: 00156 // Sensors 00157 FieldSensorList fieldSensorList ; 00158 00159 // List of fields defined in this class 00160 SoFieldList fieldList ; 00161 } ; 00162 00163 /*----------------------------------------------------------------------------*/ 00164 00165 #endif /* _PO_CARTESIAN_AXIS_ */ 00166 00167