1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
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.
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 #if !defined(AFX_PARTICLE_SYSTEM_EDIT_H__CD8281FA_CA1A_4D87_B54F_509D490066A9__INCLUDED_)
19 #define AFX_PARTICLE_SYSTEM_EDIT_H__CD8281FA_CA1A_4D87_B54F_509D490066A9__INCLUDED_
25 #include "ps_wrapper.h"
26 #include "dialog_stack.h"
27 #include "popup_notify.h"
28 #include "editable_range.h"
29 #include "particle_workspace.h"
33 class CParticleSystem
;
38 class CParticleTreeCtrl
;
40 class CUserParamWrapper
: public IPSWrapperFloat
43 NL3D::CParticleSystem
*PS
;
45 float get(void) const;
46 void set(const float &v
);
50 class CTimeThresholdWrapper
: public IPSWrapperFloat
53 NL3D::CParticleSystem
*PS
;
54 float get(void) const;
55 void set(const float &);
58 class CMaxNbIntegrationWrapper
: public IPSWrapperUInt
61 NL3D::CParticleSystem
*PS
;
62 uint32
get(void) const;
63 void set(const uint32
&);
66 class CMaxViewDistWrapper
: public IPSWrapperFloat
69 NL3D::CParticleSystem
*PS
;
70 float get(void) const;
71 void set(const float &);
74 class CLODRatioWrapper
: public IPSWrapperFloat
77 NL3D::CParticleSystem
*PS
;
78 float get(void) const;
79 void set(const float &);
82 /////////////////////////////////////////////////////////////////////////////
83 // CParticleSystemEdit dialog
85 class CParticleSystemEdit
: public CDialog
, public CDialogStack
, public IPopupNotify
89 CParticleSystemEdit(CParticleWorkspace::CNode
*ownerNode
, CParticleTreeCtrl
*ptc
); // standard constructor
91 ~CParticleSystemEdit();
93 void init(CWnd
*pParent
);
96 //{{AFX_DATA(CParticleSystemEdit)
97 enum { IDD
= IDD_EDIT_PARTICLE_SYSTEM
};
98 CButton m_BypassMaxNumStepsCtrl
;
99 CButton m_ForceLifeTimeUpdate
;
100 CButton m_DieWhenOutOfFrustumCtrl
;
101 CButton m_DieWhenOutOfRangeCtrl
;
102 CComboBox m_AnimTypeCtrl
;
103 CComboBox m_PresetCtrl
;
104 CComboBox m_DieOnEvent
;
105 CButton m_PrecomputeBBoxCtrl
;
109 CButton m_EnableSlowDownCtrl
;
110 BOOL m_AccurateIntegration
;
111 BOOL m_EnableSlowDown
;
112 BOOL m_DieWhenOutOfRange
;
113 BOOL m_DieWhenOutOfFrustum
;
114 BOOL m_EnableLoadBalancing
;
115 BOOL m_BypassMaxNumSteps
;
116 BOOL m_ForceLighting
;
124 // ClassWizard generated virtual function overrides
125 //{{AFX_VIRTUAL(CParticleSystemEdit)
127 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
133 CParticleWorkspace::CNode
*_Node
;
134 CEditableRangeFloat
*_TimeThresholdDlg
, *_MaxViewDistDlg
, *_LODRatioDlg
;
135 CEditableRangeUInt
*_MaxIntegrationStepDlg
;
136 CDialog
*_AutoLODDlg
;
137 CDialog
*_GlobalColorDlg
;
138 CParticleTreeCtrl
*_ParticleTreeCtrl
;
140 // Generated message map functions
141 //{{AFX_MSG(CParticleSystemEdit)
142 afx_msg
void OnAccurateIntegration();
143 afx_msg
void OnEnableSlowDown();
144 afx_msg
void OnPrecomputeBbox();
145 afx_msg
void OnIncBbox();
146 afx_msg
void OnDecBbox();
147 afx_msg
void OnDieWhenOutOfRange();
148 afx_msg
void OnSelchangePsDieOnEvent();
149 afx_msg
void OnChangeApplyAfterDelay();
150 afx_msg
void OnDieWhenOutOfFrustum();
151 afx_msg
void OnSelchangeLifeMgtPresets();
152 afx_msg
void OnSelchangeAnimTypeCtrl();
153 afx_msg
void OnSharable();
154 afx_msg
void OnEditAutoLod();
155 afx_msg
void OnEnableAutoLod();
156 afx_msg
void OnForceLifeTimeUpdate();
157 afx_msg
void OnEditGlobalColor();
158 afx_msg
void OnGlobalColor();
159 afx_msg
void OnEnableLoadBalancing();
160 afx_msg
void OnGlobalUserParam1();
161 afx_msg
void OnGlobalUserParam2();
162 afx_msg
void OnGlobalUserParam3();
163 afx_msg
void OnGlobalUserParam4();
164 afx_msg
void OnBypassMaxNumSteps();
165 afx_msg
void OnForceGlobalLighitng();
166 afx_msg
void OnAutoDelay();
167 afx_msg
void OnChangeBBZ();
168 afx_msg
void OnChangeBBX();
169 afx_msg
void OnChangeBBY();
170 afx_msg
void OnAutoBbox();
171 afx_msg
void OnResetBBox();
172 afx_msg
void OnLockFrameDelay();
174 DECLARE_MESSAGE_MAP()
177 void updatePrecomputedBBoxParams();
178 void updateIntegrationParams();
179 void updateDieOnEventParams();
180 void updateLifeMgtPresets();
181 void childPopupClosed(CWnd
*child
);
182 void updateBBoxFromText();
184 static CTimeThresholdWrapper _TimeThresholdWrapper
;
185 static CMaxViewDistWrapper _MaxViewDistWrapper
;
186 static CMaxNbIntegrationWrapper _MaxNbIntegrationWrapper
;
187 static CLODRatioWrapper _LODRatioWrapper
;
188 /// wrapper to tune user parameters
189 static CUserParamWrapper _UserParamWrapper
[4];
190 void updateModifiedFlag() { if (_Node
) _Node
->setModified(true); }
193 //{{AFX_INSERT_LOCATION}}
194 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
196 #endif // !defined(AFX_PARTICLE_SYSTEM_EDIT_H__CD8281FA_CA1A_4D87_B54F_509D490066A9__INCLUDED_)