X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_BallElement.hxx;h=5975f40d82c3a3a74fcc691c556439383f779e9d;hp=c62034de77527563915e41cf380e8a9dedd19474;hb=0fc0831670e27a5611b941c52dc152fd63964515;hpb=7a713be33b27d6a8c77f983460f0e97e52c6ff7c diff --git a/src/SMDS/SMDS_BallElement.hxx b/src/SMDS/SMDS_BallElement.hxx index c62034de7..5975f40d8 100644 --- a/src/SMDS/SMDS_BallElement.hxx +++ b/src/SMDS/SMDS_BallElement.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -27,34 +27,23 @@ #include "SMESH_SMDS.hxx" #include "SMDS_MeshCell.hxx" -#include - +/*! + * \brief Ball element. This type is not allocated. + * It is only used as function argument type to provide more clear semantic + * and to provide API specific to ball element + */ class SMDS_EXPORT SMDS_BallElement: public SMDS_MeshCell { + void init(const SMDS_MeshNode * node, double diameter); + + friend class SMDS_Mesh; + public: - SMDS_BallElement(); - SMDS_BallElement (const SMDS_MeshNode * node, double diameter); - SMDS_BallElement(vtkIdType nodeId, double diameter, SMDS_Mesh* mesh); - void init(vtkIdType nodeId, double diameter, SMDS_Mesh* mesh); + double GetDiameter() const; - void SetDiameter(double diameter); - bool ChangeNode (const SMDS_MeshNode * node); - - virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], - const int nbNodes) { return ChangeNode( nodes[0] ); } - virtual void Print (std::ostream & OS) const; - - virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Ball; } - virtual vtkIdType GetVtkType() const { return VTK_POLY_VERTEX; } - virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Ball; } - virtual SMDSAbs_GeometryType GetGeomType() const { return SMDSGeom_BALL; } - virtual int NbNodes() const { return 1; } - virtual int NbEdges() const { return 0; } - virtual int NbFaces() const { return 0; } - virtual const SMDS_MeshNode* GetNode (const int ind) const; - - protected: - SMDS_ElemIteratorPtr elementsIterator (SMDSAbs_ElementType type) const; + void SetDiameter(double diameter); + + static SMDSAbs_ElementType Type() { return SMDSAbs_Ball; } }; #endif