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

Method RequestData

Rendering/Annotation/vtkArcPlotter.cxx:56–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56int vtkArcPlotter::RequestData(vtkInformation* vtkNotUsed(request),
57 vtkInformationVector** inputVector, vtkInformationVector* outputVector)
58{
59 // get the info objects
60 vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
61 vtkInformation* outInfo = outputVector->GetInformationObject(0);
62
63 // get the input and output
64 vtkPolyData* input = vtkPolyData::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
65 vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
66
67 vtkPointData* inPD;
68 vtkPoints* inPts;
69 vtkCellArray* inLines;
70 int j;
71 vtkIdType numPts, i;
72 double x[3], normal[3], point[3], aveNormal[3];
73 vtkIdType id;
74 const vtkIdType* pts = nullptr;
75 vtkIdType npts = 0;
76 double x1[3], x2[3], x21[3], n[3];
77 vtkFloatArray* lineNormals;
78 vtkPoints* newPts;
79 vtkCellArray* newLines;
80 double *range, offset;
81 int plotNum, compNum;
82 vtkPoints* projPts;
83
84 inPD = input->GetPointData();
85
86 // Initialize
87 //
88 vtkDebugMacro(<< "Plotting along arc");
89
90 if (!(inPts = input->GetPoints()) || (numPts = inPts->GetNumberOfPoints()) < 1 ||
91 !(inLines = input->GetLines()) || inLines->GetNumberOfCells() < 1)
92 {
93 vtkErrorMacro(<< "No input data!");
94 return 0;
95 }
96
97 // Process attribute data to determine ranges, number of components, etc.
98 if (this->ProcessComponents(numPts, inPD) <= 0)
99 {
100 return 0;
101 }
102
103 // Allocate points for projection
104 //
105 // Determine the projection plane. Project to a plane if camera is available
106 // and defulat normal is not desired.
107 if (this->Camera && !this->UseDefaultNormal)
108 {
109 double xProj[3];
110 projPts = vtkPoints::New();
111 projPts->SetNumberOfPoints(numPts);
112 this->Camera->GetViewPlaneNormal(normal);
113 this->Camera->GetFocalPoint(point);

Callers

nothing calls this directly

Calls 15

ProcessComponentsMethod · 0.95
OffsetPointMethod · 0.95
GetInformationObjectMethod · 0.80
AllocateCopyMethod · 0.80
InsertCellPointMethod · 0.80
SetLinesMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
NormalizeFunction · 0.50
CrossFunction · 0.50
GetMethod · 0.45
GetPointDataMethod · 0.45

Tested by

no test coverage detected