------------------------------------------------------------------------------ Specify a source object at a specified table location.
| 684 | //------------------------------------------------------------------------------ |
| 685 | // Specify a source object at a specified table location. |
| 686 | void vtkGenericGlyph3DFilter::SetSourceData(int id, vtkPolyData* pd) |
| 687 | { |
| 688 | int numConnections = this->GetNumberOfInputConnections(1); |
| 689 | |
| 690 | if (id < 0 || id > numConnections) |
| 691 | { |
| 692 | vtkErrorMacro("Bad index " << id << " for source."); |
| 693 | return; |
| 694 | } |
| 695 | |
| 696 | vtkTrivialProducer* tp = nullptr; |
| 697 | if (pd) |
| 698 | { |
| 699 | tp = vtkTrivialProducer::New(); |
| 700 | tp->SetOutput(pd); |
| 701 | } |
| 702 | |
| 703 | if (id < numConnections) |
| 704 | { |
| 705 | if (tp) |
| 706 | { |
| 707 | this->SetNthInputConnection(1, id, tp->GetOutputPort()); |
| 708 | } |
| 709 | else |
| 710 | { |
| 711 | this->SetNthInputConnection(1, id, nullptr); |
| 712 | } |
| 713 | } |
| 714 | else if (id == numConnections && tp) |
| 715 | { |
| 716 | this->AddInputConnection(1, tp->GetOutputPort()); |
| 717 | } |
| 718 | |
| 719 | if (tp) |
| 720 | { |
| 721 | tp->Delete(); |
| 722 | } |
| 723 | } |
| 724 | |
| 725 | //------------------------------------------------------------------------------ |
| 726 | // Get a pointer to a source object at a specified table location. |
nothing calls this directly
no test coverage detected