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

Method CalculatePlotTransform

Charts/Core/vtkChartParallelCoordinates.cxx:517–536  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

515
516//------------------------------------------------------------------------------
517void vtkChartParallelCoordinates::CalculatePlotTransform()
518{
519 // In the case of parallel coordinates everything is plotted in a normalized
520 // system, where the range is from 0.0 to 1.0 in the y axis, and in screen
521 // coordinates along the x axis.
522 if (this->Storage->Axes.empty())
523 {
524 return;
525 }
526
527 vtkAxis* axis = this->Storage->Axes[0];
528 float* min = axis->GetPoint1();
529 float* max = axis->GetPoint2();
530 float yScale = 1.0f / (max[1] - min[1]);
531
532 this->Storage->Transform->Identity();
533 this->Storage->Transform->Translate(0, axis->GetPoint1()[1]);
534 // Get the scale for the plot area from the x and y axes
535 this->Storage->Transform->Scale(1.0, 1.0 / yScale);
536}
537
538//------------------------------------------------------------------------------
539void vtkChartParallelCoordinates::RecalculateBounds() {}

Callers 1

UpdateGeometryMethod · 0.95

Calls 6

emptyMethod · 0.45
GetPoint1Method · 0.45
GetPoint2Method · 0.45
IdentityMethod · 0.45
TranslateMethod · 0.45
ScaleMethod · 0.45

Tested by

no test coverage detected