Add the ability to treat intensity pixels as floats.

This commit is contained in:
Pavel Krajcevski 2013-10-10 11:35:01 -04:00
parent 51cec12938
commit ad5f012a4c

View file

@ -63,9 +63,14 @@ class IPixel {
public:
IPixel() : m_Intensity(0.0f) { }
IPixel(float f) : m_Intensity(f) { }
explicit IPixel(uint32 rgba) {
Unpack(rgba);
operator float() const {
return m_Intensity;
}
IPixel operator=(const float &f) {
return m_Intensity = f;
}
// Take all of the components, transform them to their 8-bit variants,