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

Method RenderOpaqueGeometry

Rendering/Annotation/vtkParallelCoordinatesActor.cxx:189–296  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

187
188//------------------------------------------------------------------------------
189int vtkParallelCoordinatesActor::RenderOpaqueGeometry(vtkViewport* viewport)
190{
191 int renderedSomething = 0;
192
193 // Initialize
194
195 vtkDebugMacro(<< "Plotting parallel coordinates");
196
197 // Make sure input is up to date, and that the data is the correct shape to
198 // plot.
199
200 if (!this->GetInput())
201 {
202 vtkErrorMacro(<< "Nothing to plot!");
203 return renderedSomething;
204 }
205
206 if (!this->TitleTextProperty)
207 {
208 vtkErrorMacro(<< "Need title text property to render plot");
209 return renderedSomething;
210 }
211
212 if (!this->LabelTextProperty)
213 {
214 vtkErrorMacro(<< "Need label text property to render plot");
215 return renderedSomething;
216 }
217
218 // Viewport change may not require rebuild
219
220 int positionsHaveChanged = 0;
221 if (viewport->GetMTime() > this->BuildTime ||
222 (viewport->GetVTKWindow() && viewport->GetVTKWindow()->GetMTime() > this->BuildTime))
223 {
224 int* lastPosition = this->PositionCoordinate->GetComputedViewportValue(viewport);
225 int* lastPosition2 = this->Position2Coordinate->GetComputedViewportValue(viewport);
226 if (lastPosition[0] != this->LastPosition[0] || lastPosition[1] != this->LastPosition[1] ||
227 lastPosition2[0] != this->LastPosition2[0] || lastPosition2[1] != this->LastPosition2[1])
228 {
229 this->LastPosition[0] = lastPosition[0];
230 this->LastPosition[1] = lastPosition[1];
231 this->LastPosition2[0] = lastPosition2[0];
232 this->LastPosition2[1] = lastPosition2[1];
233 positionsHaveChanged = 1;
234 }
235 }
236
237 // Check modified time to see whether we have to rebuild.
238
239 this->ConnectionHolder->GetInputAlgorithm()->Update();
240
241 if (positionsHaveChanged || this->GetMTime() > this->BuildTime ||
242 this->GetInput()->GetMTime() > this->BuildTime ||
243 this->LabelTextProperty->GetMTime() > this->BuildTime ||
244 this->TitleTextProperty->GetMTime() > this->BuildTime)
245 {
246 const int* size = viewport->GetSize();

Callers

nothing calls this directly

Calls 15

GetInputMethod · 0.95
PlaceAxesMethod · 0.95
GetVTKWindowMethod · 0.80
GetMTimeMethod · 0.45
UpdateMethod · 0.45
GetInputAlgorithmMethod · 0.45
GetSizeMethod · 0.45
SetInputMethod · 0.45
ShallowCopyMethod · 0.45
GetTextPropertyMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected