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_QUADRANGLEMESH2D_
00025 #define  _PO_QUADRANGLEMESH2D_
00026 
00027 #include <MeshViz/nodes/PoMeshProperty.h>
00028 #include <MeshViz/fields/PoSFQuadrangleMesh2D.h>
00029 
00030 class PbMesh;
00031 
00040 class  PoQuadrangleMesh2D : public PoMeshProperty {
00041 
00042   SO_NODE_HEADER(PoQuadrangleMesh2D) ;
00043   
00044 
00045  public:
00046 
00047 
00048 
00052   PoQuadrangleMesh2D() ;
00053 
00057   PoSFQuadrangleMesh2D mesh;
00058 
00062   const PbMesh* getMesh() const { return (const PbMesh*)&mesh.getValue();};
00063 
00068   void setGeometry(int num_nodes, const float *xn, const float *yn,  
00069                    int num_cells, const int *cell_index);
00070 
00075   void setGeometry(int num_nodes, const float *xn, const float *yn,  const float *zn,
00076                    int num_cells, const int *cell_index);
00077 
00078   
00079  private:
00080   virtual void  doAction(SoAction *action) ;
00081 
00082  private:
00083   static void initClass() ;
00084     static void exitClass() ;
00085   
00086  private:
00087   const PoSFMesh* getSFieldMesh() const { return &mesh; }
00088   virtual ~PoQuadrangleMesh2D() ;
00089 
00090 } ; 
00091 
00092 
00093 
00094 
00095 inline void 
00096 PoQuadrangleMesh2D::setGeometry(int num_nodes, const float *xn, const float *yn,
00097                                 int num_cells, const int *cell_index)
00098 {
00099   mesh.setGeometry(num_nodes, xn,yn, num_cells, cell_index);
00100 }
00101 
00102 
00103 inline void 
00104 PoQuadrangleMesh2D::setGeometry(int num_nodes, const float *xn, const float *yn,  const float *zn,
00105                                 int num_cells, const int *cell_index)
00106 {
00107   mesh.setGeometry(num_nodes, xn,yn,zn, num_cells, cell_index);
00108 }
00109 
00110 #endif 
00111 
00112