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/>.
17 #if !defined(AFX_LOCATED_TARGET_DLG_H__FA197835_AE71_4057_88A4_48F28A01E367__INCLUDED_)
18 #define AFX_LOCATED_TARGET_DLG_H__FA197835_AE71_4057_88A4_48F28A01E367__INCLUDED_
26 #include "nel/3d/ps_located.h"
27 #include "nel/3d/ps_force.h"
28 #include "dialog_stack.h"
29 #include "ps_wrapper.h"
30 #include "particle_workspace.h"
36 /////////////////////////////////////////////////////////////////////////////
37 // CLocatedTargetDlg dialog
39 class CLocatedTargetDlg
: public CDialog
, public CDialogStack
43 CLocatedTargetDlg(CParticleWorkspace::CNode
*ownerNode
, NL3D::CPSTargetLocatedBindable
*blTarget
, CParticleDlg
*particleDlg
); // standard constructor
47 // init the dialog with the given parent
48 void init(CWnd
* pParent
);
51 //{{AFX_DATA(CLocatedTargetDlg)
52 enum { IDD
= IDD_LOCATED_TARGET_DLG
};
53 CListBox m_AvailableTargets
;
59 // ClassWizard generated virtual function overrides
60 //{{AFX_VIRTUAL(CLocatedTargetDlg)
62 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
67 // the target we're focusing on
68 NL3D::CPSTargetLocatedBindable
*_LBTarget
;
69 CParticleDlg
*_ParticleDlg
;
70 CParticleWorkspace::CNode
*_Node
;
72 // Generated message map functions
73 //{{AFX_MSG(CLocatedTargetDlg)
74 afx_msg
void OnAddTarget();
75 afx_msg
void OnRemoveTarget();
76 virtual BOOL
OnInitDialog();
80 //////////////////////////////////////////////
81 // wrapper to tune the intensity of a force //
82 //////////////////////////////////////////////
83 struct CForceIntensityWrapper
: public IPSWrapperFloat
, IPSSchemeWrapperFloat
85 NL3D::CPSForceIntensity
*F
;
86 float get(void) const { return F
->getIntensity(); }
87 void set(const float &value
) {F
->setIntensity(value
); }
88 scheme_type
*getScheme(void) const { return F
->getIntensityScheme(); }
89 void setScheme(scheme_type
*s
) {F
->setIntensityScheme(s
); }
90 } _ForceIntensityWrapper
;
92 ///////////////////////////////////////////////////////
93 // wrapper to tune the radial viscosity for vortices //
94 ///////////////////////////////////////////////////////
97 struct CRadialViscosityWrapper
: public IPSWrapperFloat
99 NL3D::CPSCylindricVortex
*V
;
100 float get(void) const { return V
->getRadialViscosity(); }
101 void set(const float &value
) { V
->setRadialViscosity(value
); }
102 } _RadialViscosityWrapper
;
104 ///////////////////////////////////////////////////////
105 // wrapper to tune the tangential viscosity for vortices //
106 ///////////////////////////////////////////////////////
109 struct CTangentialViscosityWrapper
: public IPSWrapperFloat
111 NL3D::CPSCylindricVortex
*V
;
112 float get(void) const { return V
->getTangentialViscosity(); }
113 void set(const float &value
) { V
->setTangentialViscosity(value
); }
114 } _TangentialViscosityWrapper
;
116 ////////////////////////////////////
117 // wrappers to tune the direction //
118 ////////////////////////////////////
120 struct CDirectionWrapper
: public IPSWrapper
<NLMISC::CVector
>
122 NL3D::CPSDirection
*E
;
123 NLMISC::CVector
get(void) const { return E
->getDir(); }
124 void set(const NLMISC::CVector
&d
){ E
->setDir(d
); }
127 //////////////////////////////////////////////////////////////
128 // wrappers to tune the parametric factor of brownian force //
129 //////////////////////////////////////////////////////////////
131 struct CParamFactorWrapper
: public IPSWrapperFloat
133 NL3D::CPSBrownianForce
*F
;
134 float get(void) const { return F
->getParametricFactor(); }
135 void set(const float &f
){ F
->setParametricFactor(f
); }
136 } _ParamFactorWrapper
;
139 void updateModifiedFlag() { if (_Node
) _Node
->setModified(true); }
142 //{{AFX_INSERT_LOCATION}}
143 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
145 #endif // !defined(AFX_LOCATED_TARGET_DLG_H__FA197835_AE71_4057_88A4_48F28A01E367__INCLUDED_)