------------------------------------------------------------------------------
| 867 | |
| 868 | //------------------------------------------------------------------------------ |
| 869 | void vtkOpenGLPointGaussianMapper::BuildOpacityTable() |
| 870 | { |
| 871 | double range[2]; |
| 872 | |
| 873 | // if a piecewise function was provided, use it to map the opacities |
| 874 | vtkPiecewiseFunction* pwf = this->GetScalarOpacityFunction(); |
| 875 | int tableSize = this->GetOpacityTableSize(); |
| 876 | |
| 877 | delete[] this->OpacityTable; |
| 878 | this->OpacityTable = new float[tableSize + 1]; |
| 879 | if (pwf) |
| 880 | { |
| 881 | // build the interpolation table |
| 882 | pwf->GetRange(range); |
| 883 | pwf->GetTable(range[0], range[1], tableSize, this->OpacityTable); |
| 884 | // duplicate the last value for bilinear interp edge case |
| 885 | this->OpacityTable[tableSize] = this->OpacityTable[tableSize - 1]; |
| 886 | this->OpacityScale = (tableSize - 1.0) / (range[1] - range[0]); |
| 887 | this->OpacityOffset = range[0]; |
| 888 | } |
| 889 | this->Modified(); |
| 890 | } |
| 891 | |
| 892 | //------------------------------------------------------------------------------ |
| 893 | int vtkOpenGLPointGaussianMapper::FillInputPortInformation( |
no test coverage detected