VTKViewer_DelaunayTriangulator
::InitPoints()
{
+ myPoints->Reset();
myUnstructuredGrid->Initialize();
myUnstructuredGrid->Allocate();
myUnstructuredGrid->SetPoints(myPoints);
vtkIdType aNumPts;
myInput->GetCellPoints(myCellId,aNumPts,myPointIds);
+
+ if ( aNumPts < myPoints->GetNumberOfPoints() )
+ myPoints->Reset();
+
{
vtkFloatingPointType aPntCoord[3];
myPoints->SetNumberOfPoints(aNumPts);
}
}
- return myPoints;
-}
+ myPoints->Modified();
+ myUnstructuredGrid->Modified();
-void
-VTKViewer_DelaunayTriangulator
-::UpdatePolyData()
-{
myGeometryFilter->Update();
myPolyData = myGeometryFilter->GetOutput();
+
+ return myPoints;
}
vtkIdType
VTKViewer_DelaunayTriangulator
::GetCellLength()
{
- if(!myPolyData) this->UpdatePolyData();
return myPolyData->GetLength();
}
VTKViewer_DelaunayTriangulator
::GetNumFaces()
{
- if(!myPolyData) this->UpdatePolyData();
return myPolyData->GetNumberOfCells();
}
VTKViewer_DelaunayTriangulator
::GetFace(vtkIdType theFaceId)
{
- if(!myPolyData) this->UpdatePolyData();
return myPolyData->GetCell(theFaceId);
}