⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parampanel.cpp

📁 PDE simulator on GPU.
💻 CPP
字号:
// ParamPanel.cpp : implementation file
//

#include "stdafx.h"
#include "ParamPanel.h"
#include "Shadow.h"
#include "MainFrm.h"
#include "ShadowView.h"

#include <gl/gl.h>
#include <gl/glu.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CParamPanel

IMPLEMENT_DYNCREATE(CParamPanel, CFormView)

CParamPanel::CParamPanel()
	: CFormView(CParamPanel::IDD)
{
	//{{AFX_DATA_INIT(CParamPanel)

	//}}AFX_DATA_INIT
}

CParamPanel::~CParamPanel()
{
}

void CParamPanel::DoDataExchange(CDataExchange* pDX)
{
	CFormView::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CParamPanel)
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CParamPanel, CFormView)
	//{{AFX_MSG_MAP(CParamPanel)
	ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
	ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
	ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CParamPanel diagnostics

#ifdef _DEBUG
void CParamPanel::AssertValid() const
{
	CFormView::AssertValid();
}

void CParamPanel::Dump(CDumpContext& dc) const
{
	CFormView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CParamPanel message handlers
CView* CParamPanel::GetShadowView() 
{
	CShadowApp *pApp = (CShadowApp*)AfxGetApp();
	CMainFrame *pFrame = (CMainFrame*)pApp->m_pMainWnd;
	CView *pView = (CView *)pFrame->m_wndSplitter.GetPane(0,1);
	return pView;
}	

void CParamPanel::OnRadio1() 
{
	CShadowView *tmp=(CShadowView*)this->GetShadowView();
	glPolygonMode(GL_FRONT_AND_BACK,GL_POINT);
	tmp->InvalidateRect(NULL,FALSE); 	
}

void CParamPanel::OnRadio2() 
{
	CShadowView *tmp=(CShadowView*)this->GetShadowView();
	glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
	tmp->InvalidateRect(NULL,FALSE); 	
}

void CParamPanel::OnRadio3() 
{
	CShadowView *tmp=(CShadowView*)this->GetShadowView();
	glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
	tmp->InvalidateRect(NULL,FALSE); 	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -