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_EDIT_PS_LIGHT_H__6F00004D_F2A5_452E_9FC2_8188F9164613__INCLUDED_)
18 #define AFX_EDIT_PS_LIGHT_H__6F00004D_F2A5_452E_9FC2_8188F9164613__INCLUDED_
22 #endif // _MSC_VER > 1000
23 // edit_ps_light.h : header file
25 #include "nel/3d/ps_light.h"
27 #include "ps_wrapper.h"
28 #include "particle_workspace.h"
32 class CAttribDlgFloat
;
36 /* Edition of dynamic lights attributes in a particle system
38 * \author Nicolas Vizerie
39 * \author Nevrax France
42 class CEditPSLight
: public CDialog
46 CEditPSLight(CParticleWorkspace::CNode
*ownerNode
, NL3D::CPSLight
*light
); // standard constructor
49 void init(CWnd
* pParent
= NULL
);
51 //{{AFX_DATA(CEditPSLight)
52 enum { IDD
= IDD_PS_LIGHT
};
53 // NOTE: the ClassWizard will add data members here
58 // ClassWizard generated virtual function overrides
59 //{{AFX_VIRTUAL(CEditPSLight)
61 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
66 CParticleWorkspace::CNode
*_Node
;
67 NL3D::CPSLight
*_Light
;
68 CAttribDlgRGBA
*_ColorDlg
;
69 CAttribDlgFloat
*_AttenStartDlg
;
70 CAttribDlgFloat
*_AttenEndDlg
;
71 // Generated message map functions
72 //{{AFX_MSG(CEditPSLight)
73 // NOTE: the ClassWizard will add member functions here
76 ///////////////////////////////////////
77 // wrapper to set the color of light //
78 ///////////////////////////////////////
79 struct CColorWrapper
: public IPSWrapperRGBA
, IPSSchemeWrapperRGBA
82 NLMISC::CRGBA
get(void) const { return L
->getColor(); }
83 void set(const NLMISC::CRGBA
&v
) { L
->setColor(v
); }
84 scheme_type
*getScheme(void) const { return L
->getColorScheme(); }
85 void setScheme(scheme_type
*s
) { L
->setColorScheme(s
); }
87 ///////////////////////////////////////
88 // wrapper to set start atten radius //
89 ///////////////////////////////////////
90 struct CAttenStartWrapper
: public IPSWrapperFloat
, IPSSchemeWrapperFloat
93 float get(void) const { return L
->getAttenStart(); }
94 void set(const float &v
) { L
->setAttenStart(v
); }
95 scheme_type
*getScheme(void) const { return L
->getAttenStartScheme(); }
96 void setScheme(scheme_type
*s
) { L
->setAttenStartScheme(s
); }
98 ///////////////////////////////////////
99 // wrapper to set end atten radius //
100 ///////////////////////////////////////
101 struct CAttenEndWrapper
: public IPSWrapperFloat
, IPSSchemeWrapperFloat
104 float get(void) const { return L
->getAttenEnd(); }
105 void set(const float &v
) { L
->setAttenEnd(v
); }
106 scheme_type
*getScheme(void) const { return L
->getAttenEndScheme(); }
107 void setScheme(scheme_type
*s
) { L
->setAttenEndScheme(s
); }
111 //{{AFX_INSERT_LOCATION}}
112 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
114 #endif // !defined(AFX_EDIT_PS_LIGHT_H__6F00004D_F2A5_452E_9FC2_8188F9164613__INCLUDED_)