[vtk-developers] MakeObject Deprecated
John Biddiscombe
jbiddiscombe at skippingmouse.co.uk
Thu Dec 5 11:20:39 EST 2002
It appears that MakeObject is being deprecated
Where once one did
vtkPoints *newPts = (vtkPoints*)(input->GetPoints()->MakeObject());
Does one now do
char *name = input->GetPoints()->GetClassName();
vtkPoints *newPts =
dynamic_cast<vtkPoints*>(ObjectFactory::CreateInstance(name));
if (newPts) newPts->SetDataType(input->GetPoints()->GetDataType());
else vtkErrorMacro(<<"It used to be so much easier");
Or is there a less tedious way?
JB
More information about the vtk-developers
mailing list