AnimPageWobble.cpp
资源名称:gloop.zip [点击查看]
上传用户:shxiangxiu
上传日期:2007-01-03
资源大小:1101k
文件大小:4k
源码类别:
OpenGL
开发平台:
Visual C++
- /////////////////////////////////////////////////////////////////////////////
- // AnimPageWobble.cpp : implementation file
- //
- // glOOP (OpenGL Object Oriented Programming library)
- // Copyright (c) Craig Fahrnbach 1997, 1998
- //
- // OpenGL is a registered trademark of Silicon Graphics
- //
- //
- // This program is provided for educational and personal use only and
- // is provided without guarantee or warrantee expressed or implied.
- //
- // Commercial use is strickly prohibited without written permission
- // from ImageWare Development.
- //
- // This program is -not- in the public domain.
- //
- /////////////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "glOOP.h"
- #include "AnimationDialog.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CAnimPageWobble
- IMPLEMENT_DYNCREATE(CAnimPageWobble, CPropertyPage)
- /////////////////////////////////////////////////////////////////////////////
- // CAnimPageWobble dialog construction
- CAnimPageWobble::CAnimPageWobble()
- : CPropertyPage(CAnimPageWobble::IDD)
- {
- //{{AFX_DATA_INIT(CAnimPageWobble)
- m_fWobbleX = 0.0f;
- m_fWobbleY = 0.0f;
- m_fWobbleZ = 0.0f;
- m_fLimitX = 0.0f;
- m_fLimitY = 0.0f;
- m_fLimitZ = 0.0f;
- m_dTimeX = 0.0;
- m_dTimeY = 0.0;
- m_dTimeZ = 0.0;
- //}}AFX_DATA_INIT
- }
- /////////////////////////////////////////////////////////////////////////////
- // CAnimPageWobble Destructor
- CAnimPageWobble::~CAnimPageWobble()
- {
- }
- void CAnimPageWobble::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CAnimPageWobble)
- DDX_Text(pDX, IDC_WOBBLE_X, m_fWobbleX);
- DDX_Text(pDX, IDC_WOBBLE_Y, m_fWobbleY);
- DDX_Text(pDX, IDC_WOBBLE_Z, m_fWobbleZ);
- DDX_Text(pDX, IDC_LIMIT_X, m_fLimitX);
- DDX_Text(pDX, IDC_LIMIT_Y, m_fLimitY);
- DDX_Text(pDX, IDC_LIMIT_Z, m_fLimitZ);
- DDX_Text(pDX, IDC_TIME_X, m_dTimeX);
- DDX_Text(pDX, IDC_TIME_Y, m_dTimeY);
- DDX_Text(pDX, IDC_TIME_Z, m_dTimeZ);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CAnimPageWobble, CPropertyPage)
- //{{AFX_MSG_MAP(CAnimPageWobble)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CAnimPageWobble message handlers
- BOOL CAnimPageWobble::OnInitDialog()
- {
- // Set our local values to the Objects' values
- if(m_pAnimation)
- {
- m_fWobbleX = m_pAnimation->m_fWobbleX;
- m_fWobbleY = m_pAnimation->m_fWobbleY;
- m_fWobbleZ = m_pAnimation->m_fWobbleZ;
- m_fLimitX = m_pAnimation->m_fLimitX;
- m_fLimitY = m_pAnimation->m_fLimitY;
- m_fLimitZ = m_pAnimation->m_fLimitZ;
- m_dTimeX = m_pAnimation->m_dSpeedX;
- m_dTimeY = m_pAnimation->m_dSpeedY;
- m_dTimeZ = m_pAnimation->m_dSpeedZ;
- }
- CPropertyPage::OnInitDialog(); // let the base class do the default work
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void CAnimPageWobble::OnOK()
- {
- // Dialog box is being initialized (FALSE)
- // or data is being retrieved (TRUE).
- UpdateData(TRUE);
- // Set our Objects' values to the local values
- if(m_pAnimation)
- {
- m_pAnimation->m_fWobbleX = m_fWobbleX;
- m_pAnimation->m_fWobbleY = m_fWobbleY;
- m_pAnimation->m_fWobbleZ = m_fWobbleZ;
- m_pAnimation->m_fLimitX = m_fLimitX;
- m_pAnimation->m_fLimitY = m_fLimitY;
- m_pAnimation->m_fLimitZ = m_fLimitZ;
- m_pAnimation->m_dSpeedX = m_dTimeX;
- m_pAnimation->m_dSpeedY = m_dTimeY;
- m_pAnimation->m_dSpeedZ = m_dTimeZ;
- }
- CPropertyPage::OnOK();
- }