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 #ifndef _PO_SF_MESH_ 00024 #define _PO_SF_MESH_ 00025 00026 #include <MeshViz/PbBasic.h> 00027 #include <Inventor/fields/SoSubField.h> 00028 #include <MeshViz/nodes/PoMeshProperty.h> 00029 00030 class PbMesh; 00031 00042 class PoSFMesh : public SoSField { 00043 00044 00045 public: 00046 00050 virtual SoType getTypeId() const; 00051 00055 static SoType getClassTypeId(); 00056 00066 void addValuesSet(int index, const float *val, const SbString &setName = ""); 00067 00082 void addValuesSet(int index, const float *val, 00083 PoMeshProperty::DataBinding binding, const SbString &setName = ""); 00084 00090 void addStringsSet(int index, const SbString *val, const SbString &setName = ""); 00091 00097 void addVecsSet(int index, const SbVec3f *val, const SbString &setName = ""); 00098 00099 /*----------------------------------------------------------------------------*/ 00100 private: 00101 static void initClass() ; 00102 static void exitClass() ; 00103 static void initClasses() ; 00104 static void exitClasses() ; 00105 00106 private: 00107 00111 PoSFMesh() { SO_FIELD_CHECK_INIT(PoSFMesh) }; 00112 00116 virtual ~PoSFMesh() {}; 00117 00118 virtual PbMesh* getMesh() const=0; 00119 00120 /* Reads value of field from file */ 00121 virtual SbBool readValue(SoInput *in); 00122 00123 /* Writes value of field to file */ 00124 virtual void writeValue(SoOutput *out) const; 00125 00126 private: 00127 static SoType classTypeId; 00128 } ; 00129 00130 /*----------------------------------------------------------------------------*/ 00131 00132 #endif /* _PO_SF_MESH_ */ 00133 00134