]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/tools/radiant/LightDlg.h
Various Mac OS X tweaks to get this to build. Probably breaking things.
[icculus/iodoom3.git] / neo / tools / radiant / LightDlg.h
1 /*
2 ===========================================================================
3
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. 
6
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).  
8
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code.  If not, see <http://www.gnu.org/licenses/>.
21
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code.  If not, please request a copy in writing from id Software at the address below.
23
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25
26 ===========================================================================
27 */
28 #if !defined(AFX_LIGHTDLG_H__9DF57520_ED11_4BD8_968A_F6A7E34167D2__INCLUDED_)
29 #define AFX_LIGHTDLG_H__9DF57520_ED11_4BD8_968A_F6A7E34167D2__INCLUDED_
30
31 #if _MSC_VER > 1000
32 #pragma once
33 #endif // _MSC_VER > 1000
34
35 #include "GLWidget.h"
36
37 class CLightInfo {
38 public:
39                                 CLightInfo();
40
41         bool            pointLight;
42         float           fallOff;
43         CString         strTexture;
44         bool            equalRadius;
45         bool            explicitStartEnd;
46         idVec3          lightStart;
47         idVec3          lightEnd;
48         idVec3          lightUp;
49         idVec3          lightRight;
50         idVec3          lightTarget;
51         idVec3          lightCenter;
52         idVec3          color;
53         bool            fog;
54         idVec4          fogDensity;
55
56         bool            strobe;
57         float           strobeSpeed;
58         bool            rotate;
59         float           rotateSpeed;
60         
61         idVec3          lightRadius;
62         bool            castShadows;
63         bool            castSpecular;
64         bool            castDiffuse;
65         bool            hasCenter;
66         bool            isParallel;
67
68         void            Defaults();
69         void            DefaultProjected();
70         void            DefaultPoint();
71         void            FromDict( const idDict *e );
72         void            ToDict( idDict *e );
73     void                ToDictFromDifferences( idDict *e, const idDict *differences );
74     void                ToDictWriteAllInfo( idDict *e );
75 };
76
77 /////////////////////////////////////////////////////////////////////////////
78 // CLightDlg dialog
79
80 class CLightDlg : public CDialog {
81 public:
82                                         CLightDlg(CWnd* pParent = NULL);   // standard constructor
83                                         ~CLightDlg();
84
85         void                    UpdateDialogFromLightInfo( void );
86         void                    UpdateDialog( bool updateChecks );
87         void                    UpdateLightInfoFromDialog( void );
88         void                    UpdateColor( float r, float g, float b, float a );
89         void                    SetSpecifics();
90         void                    EnableControls();
91         void                    LoadLightTextures();
92         void                    ColorButtons();
93         void                    SaveLightInfo( const idDict *differences );
94
95 // Dialog Data
96         //{{AFX_DATA(CLightDlg)
97         enum { IDD = IDD_DIALOG_LIGHT };
98         idGLWidget m_wndPreview;
99         CComboBox       m_wndLights;
100         CSliderCtrl     m_wndFalloff;
101         BOOL    m_bEqualRadius;
102         BOOL    m_bExplicitFalloff;
103         BOOL    m_bPointLight;
104         BOOL    m_bCheckProjected;
105         float   m_fFallloff;
106         int             m_nFalloff;
107         BOOL    m_bRotate;
108         BOOL    m_bShadows;
109         BOOL    m_bSpecular;
110         BOOL    m_bDiffuse;
111         float   m_fEndX;
112         float   m_fEndY;
113         float   m_fEndZ;
114         float   m_fRadiusX;
115         float   m_fRadiusY;
116         float   m_fRadiusZ;
117         float   m_fRightX;
118         float   m_fRightY;
119         float   m_fRightZ;
120         float   m_fRotate;
121         float   m_fStartX;
122         float   m_fStartY;
123         float   m_fStartZ;
124         float   m_fTargetX;
125         float   m_fTargetY;
126         float   m_fTargetZ;
127         float   m_fUpX;
128         float   m_fUpY;
129         float   m_fUpZ;
130         BOOL    m_hasCenter;
131         float   m_centerX;
132         float   m_centerY;
133         float   m_centerZ;
134     BOOL    m_bIsParallel;
135         //}}AFX_DATA
136
137
138 // Overrides
139         // ClassWizard generated virtual function overrides
140         //{{AFX_VIRTUAL(CLightDlg)
141         public:
142         virtual BOOL DestroyWindow();
143         protected:
144         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
145         //}}AFX_VIRTUAL
146
147 // Implementation
148 protected:
149
150         // Generated message map functions
151         //{{AFX_MSG(CLightDlg)
152         virtual BOOL OnInitDialog();
153         afx_msg void OnDestroy();
154         afx_msg void OnBtnTexture();
155         afx_msg void OnCheckEqualradius();
156         afx_msg void OnCheckExplicitfalloff();
157         afx_msg void OnCheckPoint();
158         afx_msg void OnCheckProjected();
159         afx_msg void OnRadioFalloff();
160         virtual void OnOK();
161         afx_msg void OnApply();
162         afx_msg void OnBtnColor();
163         afx_msg void OnBtnFog();
164         afx_msg void OnCheckFog();
165         afx_msg void OnCheckRotate();
166         afx_msg void OnCheckStrobe();
167         virtual void OnCancel();
168         afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
169         afx_msg void OnSelchangeComboTexture();
170         afx_msg void OnCheckCenter();
171         afx_msg void OnCheckParallel();
172     afx_msg void OnApplyDifferences();
173         //}}AFX_MSG
174         DECLARE_MESSAGE_MAP()
175
176 private:
177         CBitmap                                 colorBitmap;
178         CBitmap                                 fogBitmap;
179         CLightInfo                              lightInfo;
180     CLightInfo                          lightInfoOriginal;
181         idVec3                                  color;
182         idGLDrawableMaterial *  m_drawMaterial;
183 };
184
185 //{{AFX_INSERT_LOCATION}}
186 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
187
188 #endif // !defined(AFX_LIGHTDLG_H__9DF57520_ED11_4BD8_968A_F6A7E34167D2__INCLUDED_)