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

Method BuildScaleTable

Rendering/OpenGL2/vtkOpenGLPointGaussianMapper.cxx:845–866  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

843
844//------------------------------------------------------------------------------
845void vtkOpenGLPointGaussianMapper::BuildScaleTable()
846{
847 double range[2];
848
849 // if a piecewise function was provided, use it to map the opacities
850 vtkPiecewiseFunction* pwf = this->GetScaleFunction();
851 int tableSize = this->GetScaleTableSize();
852
853 delete[] this->ScaleTable;
854 this->ScaleTable = new float[tableSize + 1];
855 if (pwf)
856 {
857 // build the interpolation table
858 pwf->GetRange(range);
859 pwf->GetTable(range[0], range[1], tableSize, this->ScaleTable);
860 // duplicate the last value for bilinear interp edge case
861 this->ScaleTable[tableSize] = this->ScaleTable[tableSize - 1];
862 this->ScaleScale = (tableSize - 1.0) / (range[1] - range[0]);
863 this->ScaleOffset = range[0];
864 }
865 this->Modified();
866}
867
868//------------------------------------------------------------------------------
869void vtkOpenGLPointGaussianMapper::BuildOpacityTable()

Callers 1

RenderMethod · 0.95

Calls 4

GetScaleFunctionMethod · 0.80
GetRangeMethod · 0.45
GetTableMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected