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_IRREGULAR_MESH1D_ 00025 #define _PB_IRREGULAR_MESH1D_ 00026 00027 #include <MeshViz/3Ddata/PbMesh1D.h> 00028 00038 class PbIrregularMesh1D : public PbMesh1D { 00039 00040 00041 public: 00042 00046 PbIrregularMesh1D() ; 00047 00051 PbIrregularMesh1D(const PbIrregularMesh1D &mesh); 00052 00056 PbIrregularMesh1D(int size, const float *x) ; 00057 00061 ~PbIrregularMesh1D() ; 00062 00066 PbIrregularMesh1D& operator=(const PbIrregularMesh1D &mesh) ; 00067 00071 friend int operator ==(const PbIrregularMesh1D &m1, const PbIrregularMesh1D &m2); 00072 00076 friend int operator !=(const PbIrregularMesh1D &m1, const PbIrregularMesh1D &m2) 00077 { return !(m1 == m2); } 00078 00082 void setGeometry(int size, const float *x) ; 00083 00089 void getGeometry(int &size, const float* &x) const ; 00090 00094 virtual SbVec3f getNodeCoord(int nod_index) const ; 00095 00096 /*---------------------------------------------------------------------------*/ 00097 private: 00098 virtual void print(FILE *fp) const; 00099 00100 private: 00101 virtual inline float getXCoord(int nodeIndex) const ; 00102 00103 virtual void updateBoundingBox() const; 00104 00105 private: 00106 void destroy() ; 00107 void copy(const PbIrregularMesh1D &other_mesh) ; 00108 00109 float *m_x ; 00110 } ; 00111 /*---------------------------------------------------------------------------*/ 00112 00113 #endif /* _PB_IRREGULAR_MESH1D_ */ 00114 00115