------------------------------------------------------------------------------ Returns the RGBA color evaluated at the specified location
| 711 | //------------------------------------------------------------------------------ |
| 712 | // Returns the RGBA color evaluated at the specified location |
| 713 | const unsigned char* vtkColorTransferFunction::MapValue(double x) |
| 714 | { |
| 715 | double rgb[3]; |
| 716 | this->GetColor(x, rgb); |
| 717 | |
| 718 | this->UnsignedCharRGBAValue[0] = static_cast<unsigned char>(255.0 * rgb[0] + 0.5); |
| 719 | this->UnsignedCharRGBAValue[1] = static_cast<unsigned char>(255.0 * rgb[1] + 0.5); |
| 720 | this->UnsignedCharRGBAValue[2] = static_cast<unsigned char>(255.0 * rgb[2] + 0.5); |
| 721 | this->UnsignedCharRGBAValue[3] = 255; |
| 722 | return this->UnsignedCharRGBAValue; |
| 723 | } |
| 724 | |
| 725 | //------------------------------------------------------------------------------ |
| 726 | // Returns the RGB color evaluated at the specified location |