// Point3DPanel.cpp : implementation file
//

#include "stdafx.h"
#include "pixelwhippro.h"
#include "Point3DPanel.h"



/////////////////////////////////////////////////////////////////////////////
// CPoint3DPanel dialog


CPoint3DPanel::CPoint3DPanel(CWnd* pParent /*=NULL*/)
	: CDynaPanel(CPoint3DPanel::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPoint3DPanel)
	m_xp = 0.0f;
	m_yp = 0.0f;
	m_zp = 0.0f;
	//}}AFX_DATA_INIT
}


void CPoint3DPanel::DoDataExchange(CDataExchange* pDX)
{
	CDynaPanel::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPoint3DPanel)
	DDX_Text(pDX, IDC_XNUM, m_xp);
	DDX_Text(pDX, IDC_YNUM, m_yp);
	DDX_Text(pDX, IDC_ZNUM, m_zp);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPoint3DPanel, CDynaPanel)
	//{{AFX_MSG_MAP(CPoint3DPanel)
	ON_EN_CHANGE(IDC_XNUM, OnChangeXnum)
	ON_EN_CHANGE(IDC_YNUM, OnChangeYnum)
	ON_EN_CHANGE(IDC_ZNUM, OnChangeZnum)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPoint3DPanel message handlers

void CPoint3DPanel::UpdateControl()
{
m_xp=Pnt->x;
m_yp=Pnt->y;
m_zp=Pnt->z;

UpdateData(FALSE);
}

void CPoint3DPanel::Set(void *pt)
{
	Pnt=(Stuff::Point3D *)pt;
}






void CPoint3DPanel::OnChangeXnum() 
{
UpdateData(TRUE);
Pnt->x=m_xp;
}

void CPoint3DPanel::OnChangeYnum() 
{
UpdateData(TRUE);
Pnt->y=m_yp;
	
}

void CPoint3DPanel::OnChangeZnum() 
{
UpdateData(TRUE);
Pnt->z=m_zp;

}
