[vtkusers] Can vtkDataObject be downcasted to vtkUnstructuredGrid?
landings
landinghere at 163.com
Wed Nov 15 23:30:43 EST 2017
Hi,
I am writing a reader that outputs an unstructured solid mesh.
I am referring to vtkSTLReader, in its RequestData() method I can see the
following code:
vtkInformation *outInfo = outputVector->GetInformationObject(0);
vtkPolyData *output =
vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
But when I do similar things:
vtkInformation* outInfo = outputVector->GetInformationObject(0);
vtkUnstructuredGrid *output =
vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
I get a nullptr for output. I am sure
outInfo->Get(vtkDataObject::DATA_OBJECT()) exists before downcasting.
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list