// AmbientLightProperties.cpp : implementation file // #include "stdafx.h" #include "mfc gos.h" #include "AmbientLightProperties.h" ///////////////////////////////////////////////////////////////////////////// // CAmbientLightProperties dialog CAmbientLightProperties::CAmbientLightProperties(CWnd* pParent /*=NULL*/) : CDialog(CAmbientLightProperties::IDD, pParent) { //{{AFX_DATA_INIT(CAmbientLightProperties) m_Alpha = 0.0f; m_Blue = 0.0f; m_Green = 0.0f; m_Intensity = 0.0f; m_Red = 0.0f; //}}AFX_DATA_INIT } void CAmbientLightProperties::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAmbientLightProperties) DDX_Text(pDX, IDC_ALPHA, m_Alpha); DDX_Text(pDX, IDC_BLUE, m_Blue); DDX_Text(pDX, IDC_GREEN, m_Green); DDX_Text(pDX, IDC_INTENSITY, m_Intensity); DDX_Text(pDX, IDC_RED, m_Red); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAmbientLightProperties, CDialog) //{{AFX_MSG_MAP(CAmbientLightProperties) // NOTE: the ClassWizard will add message map macros here //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CAmbientLightProperties message handlers void CAmbientLightProperties::SetData(MLRAmbientLight *light) { Light=*light; m_Intensity=Light.GetIntensity(); Light.GetColor(m_Red,m_Green,m_Blue); } MLRAmbientLight &CAmbientLightProperties::GetData() { Light.SetIntensity(m_Intensity); Light.SetColor(m_Red,m_Green,m_Blue); return Light; }