00001 // Dan 7/25/2004 \DanLP115\Include\ColorVec.inl 00002 00003 #define __COLORVEC_INL 00004 00005 #ifndef __COLORVEC_H 00006 #include "ColorVec.h" 00007 #endif 00008 #ifndef __COLORBUF_H 00009 #include "ColorBuf.h" 00010 #endif 00011 #ifndef __HALFCOLORBUF_H 00012 #include "HalfColorBuf.h" 00013 #endif 00014 00015 //********************************************************************* 00016 //*** ColorVector 00017 //********************************************************************* 00018 inline ColorVector::ColorVector( const HalfColorBuf &other ) 00019 { 00020 m_red = other.Red(); 00021 m_green = other.Green(); 00022 m_blue = other.Blue(); 00023 } 00024 00025 //********************************************************************* 00026 //*** ColorVectorAlpha 00027 //********************************************************************* 00028 inline ColorVectorAlpha::ColorVectorAlpha( const HalfColorBufAlpha &other ) : 00029 m_color(other.Color()) 00030 { 00031 m_alpha = other.Alpha(); 00032 } 00033 00034 inline ColorVectorAlpha::ColorVectorAlpha( const ColorBuf &other ) 00035 { 00036 SetRed((float)other.values.red / MAXCOLOR); 00037 SetGreen((float)other.values.green / MAXCOLOR); 00038 SetBlue((float)other.values.blue / MAXCOLOR); 00039 SetAlpha((float)other.values.alpha / MAXCOLOR); 00040 }
Generated on Thu Oct 27 11:46:43 2005 with
1.4.5 written by Dimitri van Heesch,
© 1997-2001