------------------------------------------------------------------------------
| 94 | |
| 95 | //------------------------------------------------------------------------------ |
| 96 | int vtkProjectSphereFilter::RequestData(vtkInformation* vtkNotUsed(request), |
| 97 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 98 | { |
| 99 | vtkDebugMacro("RequestData"); |
| 100 | |
| 101 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 102 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 103 | |
| 104 | vtkPointSet* input = vtkPointSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 105 | if (vtkPolyData* poly = vtkPolyData::SafeDownCast(input)) |
| 106 | { |
| 107 | if (poly->GetVerts()->GetNumberOfCells() > 0 || poly->GetLines()->GetNumberOfCells() > 0 || |
| 108 | poly->GetStrips()->GetNumberOfCells() > 0) |
| 109 | { |
| 110 | vtkErrorMacro("Can only deal with vtkPolyData polys."); |
| 111 | return 0; |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | vtkPointSet* output = vtkPointSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 116 | |
| 117 | vtkNew<vtkIdList> polePointIds; |
| 118 | this->TransformPointInformation(input, output, polePointIds.GetPointer()); |
| 119 | this->TransformCellInformation(input, output, polePointIds.GetPointer()); |
| 120 | output->GetFieldData()->ShallowCopy(input->GetFieldData()); |
| 121 | |
| 122 | vtkDebugMacro("Leaving RequestData"); |
| 123 | |
| 124 | return 1; |
| 125 | } |
| 126 | |
| 127 | //------------------------------------------------------------------------------ |
| 128 | void vtkProjectSphereFilter::TransformPointInformation( |
nothing calls this directly
no test coverage detected