------------------------------------------------------------------------------ Specify a source object at a specified table location.
| 235 | //------------------------------------------------------------------------------ |
| 236 | // Specify a source object at a specified table location. |
| 237 | void vtkGlyph3DMapper::SetSourceConnection(int idx, vtkAlgorithmOutput* algOutput) |
| 238 | { |
| 239 | if (idx < 0) |
| 240 | { |
| 241 | vtkErrorMacro("Bad index " << idx << " for source."); |
| 242 | return; |
| 243 | } |
| 244 | |
| 245 | int numConnections = this->GetNumberOfInputConnections(1); |
| 246 | if (idx < numConnections) |
| 247 | { |
| 248 | this->SetNthInputConnection(1, idx, algOutput); |
| 249 | } |
| 250 | else if (idx == numConnections && algOutput) |
| 251 | { |
| 252 | this->AddInputConnection(1, algOutput); |
| 253 | } |
| 254 | else if (algOutput) |
| 255 | { |
| 256 | vtkWarningMacro("The source id provided is larger than the maximum " |
| 257 | "source id, using " |
| 258 | << numConnections << " instead."); |
| 259 | this->AddInputConnection(1, algOutput); |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | //------------------------------------------------------------------------------ |
| 264 | // Specify a source object at a specified table location. |