------------------------------------------------------------------------------
| 843 | |
| 844 | //------------------------------------------------------------------------------ |
| 845 | void 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 | //------------------------------------------------------------------------------ |
| 869 | void vtkOpenGLPointGaussianMapper::BuildOpacityTable() |
no test coverage detected