SoConversionConvertFloatToRGBA Method (SoBufferObject, SoBufferObject, UInt64, Single, Single) |
Convert FLOAT data stored in a buffer to (grayscale) RGBA data.
Namespace: OIV.Inventor.Algorithms
public int ConvertFloatToRGBA( SoBufferObject sourceBufferObject, SoBufferObject targetBufferObject, ulong size, float dataMin, float dataMax )
The source buffer object containing the FLOAT data.
The target buffer object.
The number of FLOAT values to convert.
The minimum value for the greyscale conversion.
The maximum value for the greyscale conversion.
Returns 0 if there were no errors during the process. Returns 1 if one or more buffers don't have the correct size.
The source and the target buffers can be the same.
The algorithm maps float values between dataMin and dataMax to the range 0..255.
The resulting values are clamped to 0..255.