#include "stdafx.h"
#include "PGL/PGLColor.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
IMPLEMENT_SERIAL(CPGLColor, CObject,1);
void CPGLColor::Serialize(CArchive &archive)
{
CObject::Serialize( archive );
if( archive.IsStoring() )
archive << m_c[0] << m_c[1] << m_c[2] << m_c[3] ;
else
archive >> m_c[0] >> m_c[1] >> m_c[2] >> m_c[3];
}
#ifdef _DEBUG
void CPGLColor::Dump( CDumpContext& dc ) const
{
CObject::Dump( dc );
dc << "color : "<< m_c[0] <<
" " << m_c[1] <<
" " << m_c[2] <<
" " << m_c[3] << endl;
}
void CPGLColor::AssertValid() const
{
CObject::AssertValid();
ASSERT( m_c[0]>=0 && m_c[0]<=1);
ASSERT( m_c[1]>=0 && m_c[1]<=1);
ASSERT( m_c[2]>=0 && m_c[2]<=1);
ASSERT( m_c[3]>=0 && m_c[3]<=1);
}
#endif