Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _SMDS_MeshNode_HeaderFile
00028 #define _SMDS_MeshNode_HeaderFile
00029
00030 #include "SMESH_SMDS.hxx"
00031
00032 #include "SMDS_MeshElement.hxx"
00033 #include "SMDS_Position.hxx"
00034 #include "ObjectPool.hxx"
00035
00036 class SMDS_EXPORT SMDS_MeshNode:public SMDS_MeshElement
00037 {
00038 public:
00039 friend class SMESHDS_Mesh;
00040 friend class SMDS_Mesh;
00041 friend class ObjectPool<SMDS_MeshNode>;
00042 friend class SMDS_VtkFace;
00043
00044 void Print(std::ostream & OS) const;
00045 double X() const;
00046 double Y() const;
00047 double Z() const;
00048 SMDS_ElemIteratorPtr GetInverseElementIterator(SMDSAbs_ElementType type=SMDSAbs_All) const;
00049 int NbInverseElements(SMDSAbs_ElementType type=SMDSAbs_All) const;
00050 const SMDS_PositionPtr& GetPosition() const;
00051 SMDSAbs_ElementType GetType() const;
00052 virtual vtkIdType GetVtkType() const;
00053 SMDSAbs_EntityType GetEntityType() const {return SMDSEntity_Node;}
00054 int NbNodes() const;
00055
00056 friend bool operator<(const SMDS_MeshNode& e1, const SMDS_MeshNode& e2);
00057
00058 void SetPosition(const SMDS_PositionPtr& aPos);
00059 void setXYZ(double x, double y, double z);
00060
00061 static int nbNodes;
00062
00063 protected:
00064 SMDS_MeshNode();
00065 SMDS_MeshNode(int id, int meshId, int shapeId = -1, double x=0, double y=0, double z=0);
00066 virtual ~SMDS_MeshNode();
00067 void init(int id, int meshId, int shapeId = -1, double x=0, double y=0, double z=0);
00068 inline void setVtkId(int vtkId) { myVtkID = vtkId; };
00069 double* getCoord() const;
00070 void AddInverseElement(const SMDS_MeshElement * ME);
00071 void RemoveInverseElement(const SMDS_MeshElement * parent);
00072 void ClearInverseElements();
00073 bool emptyInverseElements();
00074
00075 SMDS_ElemIteratorPtr
00076 elementsIterator(SMDSAbs_ElementType type) const;
00077
00078 private:
00079 SMDS_PositionPtr myPosition;
00080 };
00081
00082 #endif