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_MESHSKIN_ 00025 #define _PO_MESHSKIN_ 00026 00027 #include <MeshViz/3Ddata/PoMesh3D.h> 00028 00029 class PbIndexedMesh3D; 00030 class PbTetrahedronMesh3D; 00031 class PbHexahedronMesh3D; 00032 class PbCartesianGrid3D; 00033 class PbParalCartesianGrid3D; 00034 class PbRegularCartesianGrid3D; 00035 class PoCellFilter; 00036 00061 class PoMeshSkin : public PoMesh3D { 00062 00063 SO_KIT_HEADER(PoMeshSkin) ; 00064 00065 /* Define fields for new parts */ 00066 SO_KIT_CATALOG_ENTRY_HEADER(groupSkin) ; 00067 00068 00069 public: 00070 00074 PoMeshSkin() ; 00075 00079 virtual void rebuild() ; 00080 00081 /*----------------------------------------------------------------------------*/ 00082 private: 00083 static void initClass() ; 00084 static void exitClass() ; 00085 00086 void indexedMeshSkin(PbIndexedMesh3D *mesh) ; 00087 void cartGrid3DSkin(PbCartesianGrid3D *mesh) ; 00088 void paralCartGrid3DSkin(PbParalCartesianGrid3D *mesh) ; 00089 void regularGrid3DSkin(PbRegularCartesianGrid3D *mesh) ; 00090 00091 void grid3DSkinFilter(const PbGrid3D *mesh,const PoCellFilter* cellFilter); 00092 00093 private: 00094 // Destructor 00095 virtual ~PoMeshSkin() ; 00096 virtual void setDefaultOnNonWritingFields(); 00097 virtual void addElementsAllCaches() ; 00098 virtual void preRebuild(); 00099 00100 /*----------------------------------------------------------------------------*/ 00101 private: 00102 void updateUnStSkinColors() ; 00103 void updateUnStSkinTextures(); 00104 00105 void updateUnStSkinGeometry(PbIndexedMesh3D *mesh) ; 00106 void updateUnStSkinTopology() ; 00107 void updateUnStSkinData() ; 00108 void updateUnStSkinShape() ; 00109 00110 void updateUnStSkinTopologyContouring(const PbIndexedMesh3D *mesh); 00111 void updateUnStSkinShapeContouring(const PbIndexedMesh3D *mesh); 00112 00113 void updateGridSkinGeometry(const PbGrid3D *mesh) ; 00114 void updateGridSkinFilterTopology(const PbGrid3D *mesh) ; 00115 00116 void updateGridSkinTopology(const PbGrid3D *mesh, SbBool add_normals) ; 00117 void updateGridSkinColors(PbGrid3D *mesh); 00118 void updateGridSkinTextures(PbGrid3D *mesh); 00119 00120 void updateCartGridSkinGeometry(const PbCartesianGrid3D *mesh) ; 00121 void updateCartGridSkinContouringGeo(const PbCartesianGrid3D *mesh); 00122 00123 void updateParalGridSkinGeometry(const PbParalCartesianGrid3D *mesh) ; 00124 void updateParalGridSkinContouringGeo(const PbParalCartesianGrid3D *mesh); 00125 00126 void updateRegularGridSkinGeometry(const PbRegularCartesianGrid3D *mesh) ; 00127 void updateRegularGridSkinContouringGeo(const PbRegularCartesianGrid3D *mesh); 00128 00129 void updateGridSkinContouringTopo(const PbGrid3D *mesh); 00130 00131 uint32_t m_topoStateId; // id defining the state of the last PiMeshSkin used 00132 00133 SbBool m_lastBuiltWithFilter; 00134 SbBool m_topologyRebuilt; 00135 }; 00136 00137 /*----------------------------------------------------------------------------*/ 00138 00139 #endif /* _PO_MESHSKIN_ */ 00140 00141 00142 00143