When I input a vtkUnstructuredGrid data into vtkMultiBlockDataSet, it can not show the data.
Does the vtkMultiBlockDataSet only can show vtkPolyData?
vtkNew<vtkMultiBlockDataSet> root;
vtkNew<vtkSphereSource> block1;
block1->SetCenter(0, 0, 0);
block1->SetRadius(2);
block1->Update();
vtkNew<vtkSphereSource> block2;
block2->SetCenter(10, 10, 10);
block2->SetRadius(5);
block2->Update();
// Combine the two data sets
vtkSmartPointer<vtkAppendFilter> appendFilter =
vtkSmartPointer<vtkAppendFilter>::New();
appendFilter->AddInputData(block1->GetOutput());
appendFilter->AddInputData(block2->GetOutput());
appendFilter->Update();
vtkSmartPointer<vtkUnstructuredGrid> unstructuredGrid =
vtkSmartPointer<vtkUnstructuredGrid>::New();
unstructuredGrid->ShallowCopy(appendFilter->GetOutput());
root->SetBlock(0, unstructuredGrid);
// root->SetBlock(1, block2->GetOutput());
vtkNew mapper;
mapper->SetInputDataObject(root);