| 1 |
// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE |
| 2 |
// |
| 3 |
// This library is free software; you can redistribute it and/or |
| 4 |
// modify it under the terms of the GNU Lesser General Public |
| 5 |
// License as published by the Free Software Foundation; either |
| 6 |
// version 2.1 of the License, or (at your option) any later version. |
| 7 |
// |
| 8 |
// This library is distributed in the hope that it will be useful, |
| 9 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 |
// Lesser General Public License for more details. |
| 12 |
// |
| 13 |
// You should have received a copy of the GNU Lesser General Public |
| 14 |
// License along with this library; if not, write to the Free Software |
| 15 |
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 16 |
// |
| 17 |
// See http://www.salome-platform.org/ or email : [email protected] |
| 18 |
// |
| 19 |
|
| 20 |
// SMESH SMDS : implementation of Salome mesh data structure |
| 21 |
// File : SMDS_BallElement.hxx |
| 22 |
// Module : SMESH |
| 23 |
// |
| 24 |
#ifndef _SMDS_BallElement_HeaderFile |
| 25 |
#define _SMDS_BallElement_HeaderFile |
| 26 |
|
| 27 |
#include "SMESH_SMDS.hxx" |
| 28 |
#include "SMDS_MeshCell.hxx" |
| 29 |
|
| 30 |
#include <iostream> |
| 31 |
|
| 32 |
class SMDS_EXPORT SMDS_BallElement: public SMDS_MeshCell |
| 33 |
{ |
| 34 |
public: |
| 35 |
SMDS_BallElement(); |
| 36 |
SMDS_BallElement (const SMDS_MeshNode * node, double diameter); |
| 37 |
SMDS_BallElement(vtkIdType nodeId, double diameter, SMDS_Mesh* mesh); |
| 38 |
void init(vtkIdType nodeId, double diameter, SMDS_Mesh* mesh); |
| 39 |
double GetDiameter() const; |
| 40 |
void SetDiameter(double diameter); |
| 41 |
bool ChangeNode (const SMDS_MeshNode * node); |
| 42 |
|
| 43 |
virtual bool ChangeNodes(const SMDS_MeshNode* nodes[], |
| 44 |
const int /*nbNodes*/) { return ChangeNode( nodes[0] ); } |
| 45 |
virtual void Print (std::ostream & OS) const; |
| 46 |
|
| 47 |
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Ball; } |
| 48 |
virtual vtkIdType GetVtkType() const { return VTK_POLY_VERTEX; } |
| 49 |
virtual SMDSAbs_EntityType GetEntityType() const { return SMDSEntity_Ball; } |
| 50 |
virtual SMDSAbs_GeometryType GetGeomType() const { return SMDSGeom_BALL; } |
| 51 |
virtual int NbNodes() const { return 1; } |
| 52 |
virtual int NbEdges() const { return 0; } |
| 53 |
virtual int NbFaces() const { return 0; } |
| 54 |
virtual const SMDS_MeshNode* GetNode (const int ind) const; |
| 55 |
|
| 56 |
protected: |
| 57 |
SMDS_ElemIteratorPtr elementsIterator (SMDSAbs_ElementType type) const; |
| 58 |
}; |
| 59 |
|
| 60 |
#endif |