00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _PO_MESHSKELETON_
00025 #define _PO_MESHSKELETON_
00026
00027 #include <MeshViz/3Ddata/PoMesh3D.h>
00028 #include <Inventor/SbBasic.h>
00029
00030 class PbIndexedMesh3D;
00031 class PbTetrahedronMesh3D;
00032 class PbHexahedronMesh3D;
00033 class PbCartesianGrid3D;
00034 class PbParalCartesianGrid3D;
00035 class PbRegularCartesianGrid3D;
00036
00037 class SoMFInt32;
00038 class SoMFVec3f;
00039 class SoCoordinate3;
00040 class SoMaterial;
00041
00085 class PoMeshSkeleton : public PoMesh3D {
00086
00087 SO_KIT_HEADER(PoMeshSkeleton) ;
00088
00089
00090 SO_KIT_CATALOG_ENTRY_HEADER(skeletonXContourSep) ;
00091 SO_KIT_CATALOG_ENTRY_HEADER(skeletonXContourApp) ;
00092 SO_KIT_CATALOG_ENTRY_HEADER(skeletonXContourGroup) ;
00093
00094 SO_KIT_CATALOG_ENTRY_HEADER(skeletonYContourSep) ;
00095 SO_KIT_CATALOG_ENTRY_HEADER(skeletonYContourApp) ;
00096 SO_KIT_CATALOG_ENTRY_HEADER(skeletonYContourGroup) ;
00097
00098 SO_KIT_CATALOG_ENTRY_HEADER(skeletonZContourSep) ;
00099 SO_KIT_CATALOG_ENTRY_HEADER(skeletonZContourApp) ;
00100 SO_KIT_CATALOG_ENTRY_HEADER(skeletonZContourGroup) ;
00101
00102
00103 public:
00104
00108 PoMeshSkeleton() ;
00109
00113 virtual void rebuild() ;
00114
00115
00116
00120 SoSFInt32 numXContour;
00121
00125 SoSFInt32 numYContour;
00126
00130 SoSFInt32 numZContour;
00131 private:
00132 static void initClass() ;
00133 static void exitClass() ;
00134
00135 void indexedMeshSkeleton(PbIndexedMesh3D *mesh, const float *nod_values,
00136 float *x_cont, float *y_cont,float *z_cont);
00137 void tetrahedronMeshSkeleton(PbTetrahedronMesh3D *mesh, const float *nod_values,
00138 float *x_cont, float *y_cont,float *z_cont);
00139 void hexahedronMeshSkeleton(PbHexahedronMesh3D *mesh, const float *nod_values,
00140 float *x_cont, float *y_cont,float *z_cont);
00141 void cartGrid3DSkeleton(PbCartesianGrid3D *mesh, const float *nod_values,
00142 float *x_cont, float *y_cont,float *z_cont);
00143 void paralCartGrid3DSkeleton(PbParalCartesianGrid3D *mesh, const float *nod_values,
00144 float *x_cont, float *y_cont,float *z_cont);
00145 void regularGrid3DSkeleton(PbRegularCartesianGrid3D *mesh, const float *nod_values,
00146 float *x_cont, float *y_cont,float *z_cont);
00147
00148 private:
00149
00150 SO_KIT_CATALOG_ENTRY_HEADER(skeletonMaterialBinding) ;
00151
00152
00153 virtual ~PoMeshSkeleton() ;
00154 virtual void setDefaultOnNonWritingFields();
00155 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
00156 virtual void addElementsAllCaches() ;
00157 virtual void preRebuild();
00158
00159 void makeSkeletonContours(int num_cont, float *cont_coord,
00160 float xn, float yn, float zn,
00161 const float *x, const float *y, const float *z,
00162 const float *nod_values,
00163 const SbString& partName);
00164
00165
00166 private:
00167
00168 FieldSensorList m_fieldSensorList ;
00169
00170
00171 SoFieldList m_fieldList ;
00172
00173
00174 } ;
00175
00176
00177
00178 #endif
00179
00180
00181
00182