Description: Set and Get the input data...
| 95 | // Description: |
| 96 | // Set and Get the input data... |
| 97 | void vtkCollisionDetectionFilter::SetInputData(int idx, vtkPolyData* input) |
| 98 | { |
| 99 | if (2 <= idx || idx < 0) |
| 100 | { |
| 101 | vtkErrorMacro(<< "Index " << idx |
| 102 | << " is out of range in SetInputData. Only two inputs allowed!"); |
| 103 | return; |
| 104 | } |
| 105 | |
| 106 | // Ask the superclass to connect the input. |
| 107 | vtkSmartPointer<vtkTrivialProducer> inputProducer = vtkSmartPointer<vtkTrivialProducer>::New(); |
| 108 | inputProducer->SetOutput(input); |
| 109 | this->SetNthInputConnection(idx, 0, input ? inputProducer->GetOutputPort() : nullptr); |
| 110 | } |
| 111 | |
| 112 | //------------------------------------------------------------------------------ |
| 113 | vtkPolyData* vtkCollisionDetectionFilter::GetInputData(int idx) |