Salome HOME
23544: SMESH's performance issues
[modules/smesh.git] / src / SMDS / SMDS_BallElement.hxx
index 400b9ceeab7ebcca9e9bad2cbda861aad33d1286..4e7c6346e79b81895b00ee265d5ee665dc64c380 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  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
@@ -17,7 +17,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SMESH SMDS : implementaion of Salome mesh data structure
+//  SMESH SMDS : implementation of Salome mesh data structure
 //  File   : SMDS_BallElement.hxx
 //  Module : SMESH
 //
 #include "SMESH_SMDS.hxx"
 #include "SMDS_MeshCell.hxx"
 
-#include <iostream>
-
+/*!
+ * \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