MCPcopy Create free account
hub / github.com/Kitware/VTK / SetSourceData

Method SetSourceData

Rendering/Core/vtkGlyph3DMapper.cxx:265–302  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Specify a source object at a specified table location.

Source from the content-addressed store, hash-verified

263//------------------------------------------------------------------------------
264// Specify a source object at a specified table location.
265void vtkGlyph3DMapper::SetSourceData(int idx, vtkPolyData* pd)
266{
267 int numConnections = this->GetNumberOfInputConnections(1);
268
269 if (idx < 0 || idx > numConnections)
270 {
271 vtkErrorMacro("Bad index " << idx << " for source.");
272 return;
273 }
274
275 vtkTrivialProducer* tp = nullptr;
276 if (pd)
277 {
278 tp = vtkTrivialProducer::New();
279 tp->SetOutput(pd);
280 }
281
282 if (idx < numConnections)
283 {
284 if (tp)
285 {
286 this->SetNthInputConnection(1, idx, tp->GetOutputPort());
287 }
288 else
289 {
290 this->SetNthInputConnection(1, idx, nullptr);
291 }
292 }
293 else if (idx == numConnections && tp)
294 {
295 this->AddInputConnection(1, tp->GetOutputPort());
296 }
297
298 if (tp)
299 {
300 tp->Delete();
301 }
302}
303
304//------------------------------------------------------------------------------
305void vtkGlyph3DMapper::SetSourceTableTree(vtkDataObjectTree* tree)

Callers 11

RenderMethod · 0.45
SetScaledGlyphsMethod · 0.45
rendererSource.pyFile · 0.45
RenderMethod · 0.45
CreatePlotDataMethod · 0.45
RenderOpaqueGeometryMethod · 0.45
xyPlot2.pyFile · 0.45
xyPlot3.pyFile · 0.45
xyPlot.pyFile · 0.45
xyPlot4.pyFile · 0.45

Calls 7

SetNthInputConnectionMethod · 0.80
NewFunction · 0.70
DeleteMethod · 0.65
SetOutputMethod · 0.45
GetOutputPortMethod · 0.45
AddInputConnectionMethod · 0.45

Tested by

no test coverage detected