Added aqua_speed for rite geo 50 tryker
[ryzomcore.git] / nel / tools / 3d / object_viewer / constraint_mesh_dlg.cpp
blob85a7659541f25823687f7274491769c4fb239f7c
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #include "std_afx.h"
19 #include "object_viewer.h"
20 #include "constraint_mesh_dlg.h"
22 #include "nel/3d/ps_mesh.h"
25 //============================================================================================
26 CConstraintMeshDlg::CConstraintMeshDlg(NL3D::CPSConstraintMesh *cm, CWnd* pParent /*=NULL*/)
27 : _CM(cm), CDialog(CConstraintMeshDlg::IDD, pParent)
29 nlassert(_CM);
30 //{{AFX_DATA_INIT(CConstraintMeshDlg)
31 m_ForceStage0Modulation = _CM->isStageModulationForced(0);
32 m_ForceStage1Modulation = _CM->isStageModulationForced(1);
33 m_ForceStage2Modulation = _CM->isStageModulationForced(2);
34 m_ForceStage3Modulation = _CM->isStageModulationForced(3);
35 m_ForceVertexColorLighting = _CM->isVertexColorLightingForced();
36 //}}AFX_DATA_INIT
39 //============================================================================================
40 void CConstraintMeshDlg::DoDataExchange(CDataExchange* pDX)
42 CDialog::DoDataExchange(pDX);
43 //{{AFX_DATA_MAP(CConstraintMeshDlg)
44 DDX_Check(pDX, IDC_FORCE_STAGE_0_MODULATION, m_ForceStage0Modulation);
45 DDX_Check(pDX, IDC_FORCE_STAGE_1_MODULATION, m_ForceStage1Modulation);
46 DDX_Check(pDX, IDC_FORCE_STAGE_2_MODULATION, m_ForceStage2Modulation);
47 DDX_Check(pDX, IDC_FORCE_STAGE_3_MODULATION, m_ForceStage3Modulation);
48 DDX_Check(pDX, IDC_FORCE_VERTEX_COLOR_LIGHTING, m_ForceVertexColorLighting);
49 //}}AFX_DATA_MAP
52 //============================================================================================
53 void CConstraintMeshDlg::init(sint x, sint y, CWnd *pParent)
55 Create(IDD_CONSTRAINT_MESH_DLG, pParent);
56 RECT r;
57 GetClientRect(&r);
58 MoveWindow(x, y, r.right, r.bottom);
59 ShowWindow(SW_SHOW);
62 BEGIN_MESSAGE_MAP(CConstraintMeshDlg, CDialog)
63 //{{AFX_MSG_MAP(CConstraintMeshDlg)
64 ON_BN_CLICKED(IDC_FORCE_STAGE_0_MODULATION, OnForceStage0Modulation)
65 ON_BN_CLICKED(IDC_FORCE_STAGE_1_MODULATION, OnForceStage1Modulation)
66 ON_BN_CLICKED(IDC_FORCE_STAGE_2_MODULATION, OnForceStage2Modulation)
67 ON_BN_CLICKED(IDC_FORCE_STAGE_3_MODULATION, OnForceStage3Modulation)
68 ON_BN_CLICKED(IDC_FORCE_VERTEX_COLOR_LIGHTING, OnForceVertexColorLighting)
69 //}}AFX_MSG_MAP
70 END_MESSAGE_MAP()
72 //============================================================================================
73 BOOL CConstraintMeshDlg::OnInitDialog()
75 CDialog::OnInitDialog();
77 // TODO: Add extra initialization here
79 return TRUE; // return TRUE unless you set the focus to a control
80 // EXCEPTION: OCX Property Pages should return FALSE
83 void CConstraintMeshDlg::OnForceStage0Modulation()
85 UpdateData();
86 _CM->forceStageModulationByColor(0, m_ForceStage0Modulation ? true : false /* VC WARNING */);
89 void CConstraintMeshDlg::OnForceStage1Modulation()
91 UpdateData();
92 _CM->forceStageModulationByColor(1, m_ForceStage0Modulation ? true : false /* VC WARNING */);
95 void CConstraintMeshDlg::OnForceStage2Modulation()
97 UpdateData();
98 _CM->forceStageModulationByColor(2, m_ForceStage0Modulation ? true : false /* VC WARNING */);
101 void CConstraintMeshDlg::OnForceStage3Modulation()
103 UpdateData();
104 _CM->forceStageModulationByColor(3, m_ForceStage0Modulation ? true : false /* VC WARNING */);
107 void CConstraintMeshDlg::OnForceVertexColorLighting()
109 UpdateData();
110 _CM->forceVertexColorLighting(m_ForceVertexColorLighting ? true : false /* VC WARNING */);