------------------------------------------------------------------------------
| 44 | |
| 45 | //------------------------------------------------------------------------------ |
| 46 | int vtkRotationFilter::RequestData(vtkInformation* vtkNotUsed(request), |
| 47 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 48 | { |
| 49 | // get the info objects |
| 50 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 51 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 52 | |
| 53 | // get the input and output |
| 54 | vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 55 | vtkUnstructuredGrid* output = |
| 56 | vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 57 | |
| 58 | vtkPointData* inPD = input->GetPointData(); |
| 59 | vtkPointData* outPD = output->GetPointData(); |
| 60 | vtkCellData* inCD = input->GetCellData(); |
| 61 | vtkCellData* outCD = output->GetCellData(); |
| 62 | |
| 63 | if (!this->GetNumberOfCopies()) |
| 64 | { |
| 65 | vtkErrorMacro("No number of copy set!"); |
| 66 | return 1; |
| 67 | } |
| 68 | |
| 69 | double tuple[3]; |
| 70 | vtkPoints* outPoints; |
| 71 | double point[3], center[3], negativCenter[3]; |
| 72 | vtkIdType ptId, cellId; |
| 73 | vtkGenericCell* cell = vtkGenericCell::New(); |
| 74 | vtkIdList* ptIds = vtkIdList::New(); |
| 75 | |
| 76 | outPoints = vtkPoints::New(); |
| 77 | |
| 78 | vtkIdType numPts = input->GetNumberOfPoints(); |
| 79 | vtkIdType numCells = input->GetNumberOfCells(); |
| 80 | |
| 81 | if (this->CopyInput) |
| 82 | { |
| 83 | outPoints->Allocate((this->CopyInput + this->GetNumberOfCopies()) * numPts); |
| 84 | output->Allocate((this->CopyInput + this->GetNumberOfCopies()) * numPts); |
| 85 | } |
| 86 | else |
| 87 | { |
| 88 | outPoints->Allocate(this->GetNumberOfCopies() * numPts); |
| 89 | output->Allocate(this->GetNumberOfCopies() * numPts); |
| 90 | } |
| 91 | |
| 92 | outPD->CopyAllocate(inPD); |
| 93 | outCD->CopyAllocate(inCD); |
| 94 | |
| 95 | vtkDataArray *inPtVectors, *outPtVectors; |
| 96 | vtkDataArray *inCellVectors, *outCellVectors; |
| 97 | |
| 98 | inPtVectors = inPD->GetVectors(); |
| 99 | outPtVectors = outPD->GetVectors(); |
| 100 | inCellVectors = inCD->GetVectors(); |
| 101 | outCellVectors = outCD->GetVectors(); |
| 102 | |
| 103 | // Copy first points. |
nothing calls this directly
no test coverage detected