0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / samples / mfc / standard / 04_Viewer3d / src / ShadingModelDlg.cpp
CommitLineData
7fd59977 1// ShadingModelDlg.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "Viewer3dApp.h"
6#include "ShadingModelDlg.h"
7
8#ifdef _DEBUG
9#define new DEBUG_NEW
10#undef THIS_FILE
11static char THIS_FILE[] = __FILE__;
12#endif
13
14/////////////////////////////////////////////////////////////////////////////
15// CShadingModelDlg dialog
16
17
92efcf78 18CShadingModelDlg::CShadingModelDlg(Handle(V3d_View) Current_V3d_View, CWnd* pParent /*=NULL*/)
7fd59977 19 : CDialog(CShadingModelDlg::IDD, pParent)
20{
21 //{{AFX_DATA_INIT(CShadingModelDlg)
22 myCurrent_V3d_View=Current_V3d_View;
23 //}}AFX_DATA_INIT
24}
25
26
27void CShadingModelDlg::DoDataExchange(CDataExchange* pDX)
28{
29 CDialog::DoDataExchange(pDX);
30 //{{AFX_DATA_MAP(CShadingModelDlg)
31 // NOTE: the ClassWizard will add DDX and DDV calls here
32 //}}AFX_DATA_MAP
33}
34
35
36BEGIN_MESSAGE_MAP(CShadingModelDlg, CDialog)
37 //{{AFX_MSG_MAP(CShadingModelDlg)
8625ef7e 38 ON_BN_CLICKED(IDC_SHADINGMODEL_COLOR, OnShadingmodelColor)
39 ON_BN_CLICKED(IDC_SHADINGMODEL_FLAT, OnShadingmodelFlat)
7fd59977 40 ON_BN_CLICKED(IDC_SHADINGMODEL_GOURAUD, OnShadingmodelGouraud)
8625ef7e 41 ON_BN_CLICKED(IDC_SHADINGMODEL_PHONG, OnShadingmodelPhong)
7fd59977 42 //}}AFX_MSG_MAP
43END_MESSAGE_MAP()
44
45/////////////////////////////////////////////////////////////////////////////
46// CShadingModelDlg message handlers
47
48void CShadingModelDlg::OnShadingmodelColor()
49{
50 myCurrent_V3d_View->SetShadingModel(V3d_COLOR);
51 myCurrent_V3d_View->Update();
52}
53
54void CShadingModelDlg::OnShadingmodelFlat()
55{
56 myCurrent_V3d_View->SetShadingModel(V3d_FLAT);
57 myCurrent_V3d_View->Update();
58}
59
60void CShadingModelDlg::OnShadingmodelGouraud()
61{
62 myCurrent_V3d_View->SetShadingModel(V3d_GOURAUD);
63 myCurrent_V3d_View->Update();
64}
65
8625ef7e 66void CShadingModelDlg::OnShadingmodelPhong()
67{
68 myCurrent_V3d_View->SetShadingModel(V3d_PHONG);
69 myCurrent_V3d_View->Update();
70}