using namespace std;
-SMDS_MeshElement::SMDS_MeshElement(int ID):myID(ID)
+int SMDS_MeshCell::nbCells = 0;
+
+SMDS_MeshElement::SMDS_MeshElement(int ID):myID(ID), myMeshId(-1), myShapeId(-1)
+{
+}
+
+SMDS_MeshElement::SMDS_MeshElement(int id, UShortType meshId, ShortType shapeId):
+ myID(id), myMeshId(meshId), myShapeId(shapeId)
{
}
const SMDS_MeshNode* SMDS_MeshElement::GetNode(const int ind) const
{
- SMDS_ElemIteratorPtr it = nodesIterator();
- int i = 0, index = WrappedIndex( ind );
- while ( index != i++ )
- it->next();
- if ( it->more() )
- return static_cast<const SMDS_MeshNode*> (it->next());
+ if ( ind >= 0 ) {
+ SMDS_ElemIteratorPtr it = nodesIterator();
+ for ( int i = 0; i < ind; ++i )
+ it->next();
+ if ( it->more() )
+ return static_cast<const SMDS_MeshNode*> (it->next());
+ }
return 0;
}
return i;
return -1;
}
+
+SMDS_MeshCell::SMDS_MeshCell()
+{
+ nbCells++;
+ myVtkID = -1;
+};
+
+SMDS_MeshCell::~SMDS_MeshCell()
+{
+ nbCells--;
+}
\ No newline at end of file