mudbox::float16Channel Class Reference

#include <image.h>

List of all members.


Detailed Description

The data type for a 16 bit float image channel.

Public Member Functions

  float16Channel (const float32Channel &d)
  float16Channel (const float16Channel &d)
  float16Channel (const uInt16Channel &d)
  float16Channel (const uInt8Channel &d)
  float16Channel (const half_ &d)
  float16Channel ()
float16Channel &  operator= (const float32Channel &d)
float16Channel &  operator= (const float16Channel &d)
float16Channel &  operator= (const uInt16Channel &d)
float16Channel &  operator= (const half_ &d)
float16Channel &  operator= (const uInt8Channel &d)
  operator float () const
  operator half_ () const
  operator uInt16 () const
  operator uInt8 () const

Constructor & Destructor Documentation

mudbox::float16Channel::float16Channel (  const float32Channel &  d  )  [inline]
 
00245 { m_data = float(d); }
mudbox::float16Channel::float16Channel (  const float16Channel &  d  )  [inline]
 
00246 { m_data = float(d); }
mudbox::float16Channel::float16Channel (  const uInt16Channel &  d  )  [inline]
 
00247 { m_data = float(d); }
mudbox::float16Channel::float16Channel (  const uInt8Channel &  d  )  [inline]
 
00248 { m_data = float(d); }
mudbox::float16Channel::float16Channel (  const half_ &  d  )  [inline]
 
00249 { m_data = (d); }
mudbox::float16Channel::float16Channel (   )  [inline]
 
00250 {}

Member Function Documentation

float16Channel& mudbox::float16Channel::operator= (  const float32Channel &  d  )  [inline]
 
00253     {
00254         *this = float16Channel(d);
00255         return *this;
00256     }
float16Channel& mudbox::float16Channel::operator= (  const float16Channel &  d  )  [inline]
 
00259     {
00260         *(uInt16 *)this = *(uInt16 *)&d;
00261         return *this;
00262     }
float16Channel& mudbox::float16Channel::operator= (  const uInt16Channel &  d  )  [inline]
 
00265     {
00266         *this = float16Channel(d);
00267         return *this;
00268     }
float16Channel& mudbox::float16Channel::operator= (  const half_ &  d  )  [inline]
 
00271     {
00272         *this = float16Channel(d);
00273         return *this;
00274     }
float16Channel& mudbox::float16Channel::operator= (  const uInt8Channel &  d  )  [inline]
 
00277     {
00278         *this = float16Channel(d);
00279         return *this;
00280     }
mudbox::float16Channel::operator float (   )  const [inline]
 
00282 { return float(m_data); }
mudbox::float16Channel::operator half_ (   )  const [inline]
 
00283 { return m_data; }
mudbox::float16Channel::operator uInt16 (   )  const [inline]
 
00286         {   float d = float(m_data);
00287             if (d < 0.0f) return 0;
00288             if (d > 1.0f) return 65535;
00289             return uInt16(d * 65535.0f);
00290         }
mudbox::float16Channel::operator uInt8 (   )  const [inline]
 
00292         {   float d = float(m_data);
00293             if (d < 0.0f) return 0;
00294             if (d > 1.0f) return 255;
00295             return uInt8(d * 255.0f);
00296         }

mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel
mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel mudbox::float16Channel