+SMDS_MeshNode::SMDS_MeshNode() :
+ SMDS_MeshElement(-1, -1, 0),
+ myPosition(SMDS_SpacePosition::originSpacePosition())
+{
+ nbNodes++;
+}
+
+SMDS_MeshNode::SMDS_MeshNode(int id, int meshId, int shapeId, double x, double y, double z):
+ SMDS_MeshElement(id, meshId, shapeId),
+ myPosition(SMDS_SpacePosition::originSpacePosition())
+{
+ nbNodes++;
+ init(id, meshId, shapeId, x, y ,z);
+}
+
+void SMDS_MeshNode::init(int id, int meshId, int shapeId, double x, double y, double z)
+{
+ SMDS_MeshElement::init(id, meshId, shapeId);
+ myVtkID = id -1;
+ assert(myVtkID >= 0);
+ //MESSAGE("Node " << myID << " " << myVtkID << " (" << x << ", " << y << ", " << z << ")");
+ SMDS_Mesh* mesh = SMDS_Mesh::_meshList[myMeshId];
+ SMDS_UnstructuredGrid * grid = mesh->getGrid();
+ vtkPoints *points = grid->GetPoints();
+ points->InsertPoint(myVtkID, x, y, z);
+ SMDS_CellLinks *cellLinks = dynamic_cast<SMDS_CellLinks*>(grid->GetCellLinks());
+ assert(cellLinks);
+ if (myVtkID >= cellLinks->GetLinksSize())
+ cellLinks->ResizeL(myVtkID+SMDS_Mesh::chunkSize);
+}