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 _PB_REGULAR_MESH1D_ 00025 #define _PB_REGULAR_MESH1D_ 00026 00027 #include <MeshViz/3Ddata/PbMesh1D.h> 00028 00043 class PbRegularMesh1D : public PbMesh1D { 00044 00045 00046 public: 00047 00051 PbRegularMesh1D() ; 00052 00056 PbRegularMesh1D(const PbRegularMesh1D &mesh); 00057 00061 PbRegularMesh1D(int numX, float xmin, float xmax) ; 00062 00066 ~PbRegularMesh1D() ; 00067 00071 PbRegularMesh1D& operator=(const PbRegularMesh1D &mesh) ; 00072 00076 friend int operator ==(const PbRegularMesh1D &m1, const PbRegularMesh1D &m2); 00077 00081 friend int operator !=(const PbRegularMesh1D &m1, const PbRegularMesh1D &m2) 00082 { return !(m1 == m2); } 00083 00087 void setGeometry(int numX, float xmin, float xmax) ; 00088 00093 void getGeometry(int &numX, float &xmin, float &xmax) const ; 00094 00098 virtual SbVec3f getNodeCoord(int nod_index) const ; 00099 00100 /*---------------------------------------------------------------------------*/ 00101 private: 00102 virtual void print(FILE *fp) const; 00103 00104 private: 00105 virtual inline float getXCoord(int nodeIndex) const ; 00106 00107 virtual void updateBoundingBox() const; 00108 00109 private: 00110 void copy(const PbRegularMesh1D &other_mesh) ; 00111 00112 float m_xMin, m_xMax, m_dx ; 00113 } ; 00114 /*---------------------------------------------------------------------------*/ 00115 00116 #endif /* _PB_REGULAR_MESH1D_ */ 00117 00118