#include <VolumeDialog.h>
Public Methods | |
CVolumeDialog (CWnd *pParent=NULL) | |
Protected Methods | |
virtual void | DoDataExchange (CDataExchange *pDX) |
afx_msg void | OnShowWindow (BOOL bShow, UINT nStatus) |
afx_msg void | OnRadioFirsthit () |
afx_msg void | OnRadioStandard () |
afx_msg void | OnRadioMip () |
afx_msg void | OnRadioVolXy () |
afx_msg void | OnRadioVolXz () |
afx_msg void | OnRadioVolYz () |
afx_msg void | OnChangeEditFhThreshold () |
afx_msg void | OnChangeEditZoom () |
afx_msg void | OnChangeEditHeight () |
afx_msg void | OnChangeEditWidth () |
afx_msg void | OnChangeEditAmbient () |
afx_msg void | OnChangeEditDiffuse () |
afx_msg void | OnButtonBgcolor () |
afx_msg void | OnPaint () |
afx_msg void | OnChangeEditX () |
afx_msg void | OnChangeEditY () |
afx_msg void | OnChangeEditZ () |
afx_msg void | OnCheckLight () |
afx_msg void | OnChangeEditLightposX () |
afx_msg void | OnChangeEditLightposY () |
afx_msg void | OnChangeEditLightposZ () |
afx_msg void | OnChangeEditHighlight () |
afx_msg void | OnChangeEditSpecular () |
afx_msg void | OnRadioXray () |
Private Types | |
enum | { IDD = IDD_VOLUME_DIALOG } |
Private Attributes | |
int | m_dRotateTo |
int | m_dRenderMode |
int | m_dRenderPlane |
bool | m_bfirst |
COLORREF | m_BGColor |
int | m_dFHTreshold |
float | m_fAmbient |
float | m_fDiffuse |
int | m_dHeight |
int | m_dWidth |
float | m_fZoom |
int | m_dX |
int | m_dY |
int | m_dZ |
int | m_dHighlight |
int | m_dLX |
int | m_dLY |
int | m_dLZ |
float | m_fSpecular |
BOOL | m_bLight |
|
Definition at line 32 of file VolumeDialog.h.
00032 { IDD = IDD_VOLUME_DIALOG }; |
|
Definition at line 39 of file VolumeDialog.cpp. References FH, m_bfirst, m_BGColor, m_bLight, m_dFHTreshold, m_dHeight, m_dHighlight, m_dLX, m_dLY, m_dLZ, m_dRenderMode, m_dRenderPlane, m_dRotateTo, m_dWidth, m_dX, m_dY, m_dZ, m_fAmbient, m_fDiffuse, m_fSpecular, m_fZoom, NONE, and XZ.
00040 : CDialog(CVolumeDialog::IDD, pParent) { 00041 //{{AFX_DATA_INIT(CVolumeDialog) 00042 m_dFHTreshold = 1500; 00043 m_fAmbient = 0.2f; 00044 m_fDiffuse = 0.2f; 00045 m_dHeight = 0; 00046 m_dWidth = 0; 00047 m_fZoom = 1.1f; 00048 m_dHighlight = 8.0f; 00049 m_dLX = 300; 00050 m_dLY = 300; 00051 m_dLZ = 300; 00052 m_fSpecular = 0.2f; 00053 m_bLight = FALSE; 00054 //}}AFX_DATA_INIT 00055 00056 00057 m_dRotateTo = NONE; 00058 m_dRenderPlane = XZ; 00059 m_dRenderMode = FH; 00060 00061 //black 00062 m_BGColor = 0x00000000; 00063 m_dX = 92; 00064 m_dY = -300; 00065 m_dZ = 85; 00066 00067 m_bfirst = true; 00068 } |
|
Definition at line 71 of file VolumeDialog.cpp.
00071 { 00072 CDialog::DoDataExchange(pDX); 00073 //{{AFX_DATA_MAP(CVolumeDialog) 00074 DDX_Text(pDX, IDC_EDIT_FH_THRESHOLD, m_dFHTreshold); 00075 DDV_MinMaxInt(pDX, m_dFHTreshold, 0, 4095); 00076 DDX_Text(pDX, IDC_EDIT_AMBIENT, m_fAmbient); 00077 DDV_MinMaxFloat(pDX, m_fAmbient, 0.f, 1.f); 00078 DDX_Text(pDX, IDC_EDIT_DIFFUSE, m_fDiffuse); 00079 DDV_MinMaxFloat(pDX, m_fDiffuse, 0.f, 1.f); 00080 DDX_Text(pDX, IDC_EDIT_HEIGHT, m_dHeight); 00081 DDV_MinMaxInt(pDX, m_dHeight, 0, 1600); 00082 DDX_Text(pDX, IDC_EDIT_WIDTH, m_dWidth); 00083 DDV_MinMaxInt(pDX, m_dWidth, 0, 1800); 00084 DDX_Text(pDX, IDC_EDIT_ZOOM, m_fZoom); 00085 DDV_MinMaxFloat(pDX, m_fZoom, 0.1f, 10.f); 00086 DDX_Text(pDX, IDC_EDIT_X, m_dX); 00087 DDV_MinMaxInt(pDX, m_dX, -1000, 1000); 00088 DDX_Text(pDX, IDC_EDIT_Y, m_dY); 00089 DDV_MinMaxInt(pDX, m_dY, -1000, 1000); 00090 DDX_Text(pDX, IDC_EDIT_Z, m_dZ); 00091 DDV_MinMaxInt(pDX, m_dZ, -1000, 1000); 00092 DDX_Text(pDX, IDC_EDIT_HIGHLIGHT, m_dHighlight); 00093 DDX_Text(pDX, IDC_EDIT_LIGHTPOS_X, m_dLX); 00094 DDX_Text(pDX, IDC_EDIT_LIGHTPOS_Y, m_dLY); 00095 DDX_Text(pDX, IDC_EDIT_LIGHTPOS_Z, m_dLZ); 00096 DDX_Text(pDX, IDC_EDIT_SPECULAR, m_fSpecular); 00097 DDX_Check(pDX, IDC_CHECK_LIGHT, m_bLight); 00098 //}}AFX_DATA_MAP 00099 } |
|
Definition at line 295 of file VolumeDialog.cpp. References m_BGColor, raycaster, and Raycaster::SetBackgroundColor().
00295 { 00296 CColorDialog colDiag; 00297 if (colDiag.DoModal() != IDOK) 00298 return; 00299 00300 m_BGColor = colDiag.GetColor(); 00301 00302 CDC *cdc = (CDC *)this->GetDC(); 00303 cdc->FillSolidRect(117, 380, 30, 22, m_BGColor); 00304 00305 unsigned char col[3] = { m_BGColor & 0x000000FF, 00306 (m_BGColor & 0x0000FF00) >> 8, 00307 (m_BGColor & 0x00FF0000) >> 16 }; 00308 00309 raycaster->SetBackgroundColor(col[0], col[1], col[2]); 00310 } |
|
Definition at line 285 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetAmbient().
00285 { 00286 UpdateData(TRUE); 00287 raycaster->SetAmbient(m_fAmbient); 00288 } |
|
Definition at line 290 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetDiffuse().
00290 { 00291 UpdateData(TRUE); 00292 raycaster->SetDiffuse(m_fDiffuse); 00293 } |
|
Definition at line 265 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetTreshold().
00265 { 00266 UpdateData(TRUE); 00267 raycaster->SetTreshold(m_dFHTreshold); 00268 } |
|
Definition at line 275 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetHeight().
|
|
Definition at line 359 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetHighlight().
00359 { 00360 UpdateData(TRUE); 00361 raycaster->SetHighlight(m_dHighlight); 00362 } |
|
Definition at line 344 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetLightpos().
00344 { 00345 UpdateData(TRUE); 00346 raycaster->SetLightpos(VECTOR(m_dLX, m_dLY, m_dLZ)); 00347 } |
|
Definition at line 349 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetLightpos().
00349 { 00350 UpdateData(TRUE); 00351 raycaster->SetLightpos(VECTOR(m_dLX, m_dLY, m_dLZ)); 00352 } |
|
Definition at line 354 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetLightpos().
00354 { 00355 UpdateData(TRUE); 00356 raycaster->SetLightpos(VECTOR(m_dLX, m_dLY, m_dLZ)); 00357 } |
|
Definition at line 364 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetSpecular().
00364 { 00365 UpdateData(TRUE); 00366 raycaster->SetSpecular(m_fSpecular); 00367 } |
|
Definition at line 280 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetWidth().
|
|
Definition at line 318 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetViewingPlanePos().
00318 { 00319 UpdateData(TRUE); 00320 raycaster->SetViewingPlanePos(m_dX, m_dY, m_dZ); 00321 } |
|
Definition at line 323 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetViewingPlanePos().
00323 { 00324 UpdateData(TRUE); 00325 raycaster->SetViewingPlanePos(m_dX, m_dY, m_dZ); 00326 } |
|
Definition at line 328 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetViewingPlanePos().
00328 { 00329 UpdateData(TRUE); 00330 raycaster->SetViewingPlanePos(m_dX, m_dY, m_dZ); 00331 } |
|
Definition at line 270 of file VolumeDialog.cpp. References raycaster, and Raycaster::Zoom().
|
|
Definition at line 336 of file VolumeDialog.cpp. References raycaster, and Raycaster::SetLight().
|
|
Definition at line 312 of file VolumeDialog.cpp.
00312 { 00313 CPaintDC dc(this); // device context for painting 00314 00315 dc.FillSolidRect(117, 380, 30, 22, m_BGColor); 00316 } |
|
Definition at line 192 of file VolumeDialog.cpp. References FH, m_dRenderMode, raycaster, and Raycaster::SetRendermode().
00192 { 00193 raycaster->SetRendermode(FH); 00194 m_dRenderMode = FH; 00195 } |
|
Definition at line 203 of file VolumeDialog.cpp. References m_dRenderMode, MI, raycaster, and Raycaster::SetRendermode().
00203 { 00204 raycaster->SetRendermode(MI); 00205 m_dRenderMode = MI; 00206 } |
|
Definition at line 197 of file VolumeDialog.cpp. References m_dRenderMode, raycaster, Raycaster::SetRendermode(), and STANDARD.
00197 { 00198 raycaster->SetRendermode(STANDARD); 00199 m_dRenderMode = STANDARD; 00200 } |
|
Definition at line 215 of file VolumeDialog.cpp. References m_bfirst, m_dRotateTo, m_dX, m_dY, m_dZ, NONE, raycaster, Raycaster::SetViewingPlanePos(), and XY. Referenced by OnShowWindow().
00215 { 00216 if (!raycaster) 00217 return; 00218 00219 if (m_bfirst) { 00220 m_bfirst = false; 00221 return; 00222 } 00223 00224 m_dRotateTo = XY; 00225 m_dRotateTo = NONE; 00226 raycaster->SetViewingPlanePos(92, 128, -300); 00227 00228 m_dX = 92; 00229 m_dY = 128; 00230 m_dZ = -300; 00231 00232 UpdateData(FALSE); 00233 } |
|
Definition at line 235 of file VolumeDialog.cpp. References m_dRotateTo, m_dX, m_dY, m_dZ, NONE, raycaster, Raycaster::SetViewingPlanePos(), and XZ. Referenced by OnShowWindow().
00235 { 00236 if (!raycaster) 00237 return; 00238 00239 m_dRotateTo = XZ; 00240 m_dRotateTo = NONE; 00241 raycaster->SetViewingPlanePos(92, -300, 85); 00242 00243 m_dX = 92; 00244 m_dY = -300; 00245 m_dZ = 85; 00246 00247 UpdateData(FALSE); 00248 } |
|
Definition at line 250 of file VolumeDialog.cpp. References m_dRotateTo, m_dX, m_dY, m_dZ, NONE, raycaster, Raycaster::SetViewingPlanePos(), and YZ. Referenced by OnShowWindow().
00250 { 00251 if (!raycaster) 00252 return; 00253 00254 m_dRotateTo = YZ; 00255 m_dRotateTo = NONE; 00256 raycaster->SetViewingPlanePos(300, 128, 85); 00257 00258 m_dX = 300; 00259 m_dY = 128; 00260 m_dZ = 85; 00261 00262 UpdateData(FALSE); 00263 } |
|
Definition at line 209 of file VolumeDialog.cpp. References m_dRenderMode, raycaster, Raycaster::SetRendermode(), and XRAY.
00209 { 00210 raycaster->SetRendermode(XRAY); 00211 m_dRenderMode = XRAY; 00212 } |
|
Definition at line 135 of file VolumeDialog.cpp. References FH, Raycaster::GetScreenShotImage(), IDC_RADIO_FIRSTHIT, IDC_RADIO_STANDARD, IDC_RADIO_VOL_XY, IDC_RADIO_VOL_XZ, IDC_RADIO_VOL_YZ, OnRadioVolXy(), OnRadioVolXz(), OnRadioVolYz(), raycaster, STANDARD, XY, XZ, and YZ.
00135 { 00136 CDialog::OnShowWindow(bShow, nStatus); 00137 // TODO: Add your message handler code here 00138 if (!bShow || !raycaster) 00139 return; 00140 00141 00142 int button; 00143 switch (m_dRenderPlane) { 00144 case XY: 00145 OnRadioVolXy(); 00146 button = IDC_RADIO_VOL_XY; 00147 break; 00148 case XZ: 00149 OnRadioVolXz(); 00150 button = IDC_RADIO_VOL_XZ; 00151 break; 00152 case YZ: 00153 OnRadioVolYz(); 00154 button = IDC_RADIO_VOL_YZ; 00155 break; 00156 default: 00157 button = -1; 00158 break; 00159 } 00160 00161 if (button != -1) 00162 ((CButton *)GetDlgItem(button))->SetCheck(1); 00163 00164 00165 switch (m_dRenderMode) { 00166 case FH: 00167 button = IDC_RADIO_FIRSTHIT; 00168 break; 00169 case STANDARD: 00170 button = IDC_RADIO_STANDARD; 00171 break; 00172 default: 00173 button = -1; 00174 break; 00175 } 00176 00177 if (button != -1) 00178 ((CButton *)GetDlgItem(button))->SetCheck(1); 00179 00180 00181 00182 CDC *cdc = (CDC *)this->GetDC(); 00183 cdc->FillSolidRect(117, 380, 30, 22, m_BGColor); 00184 00185 00186 raycaster->GetScreenShotImage(m_dWidth, m_dHeight); 00187 00188 UpdateData(FALSE); 00189 } |
|
Definition at line 24 of file VolumeDialog.h. Referenced by CVolumeDialog(), and OnRadioVolXy(). |
|
Definition at line 26 of file VolumeDialog.h. Referenced by CVolumeDialog(), and OnButtonBgcolor(). |
|
Definition at line 47 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 33 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 36 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 42 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 43 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 44 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 45 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 22 of file VolumeDialog.h. Referenced by CVolumeDialog(), OnRadioFirsthit(), OnRadioMip(), OnRadioStandard(), and OnRadioXray(). |
|
Definition at line 23 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 21 of file VolumeDialog.h. Referenced by CVolumeDialog(), OnRadioVolXy(), OnRadioVolXz(), and OnRadioVolYz(). |
|
Definition at line 37 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 39 of file VolumeDialog.h. Referenced by CVolumeDialog(), OnRadioVolXy(), OnRadioVolXz(), and OnRadioVolYz(). |
|
Definition at line 40 of file VolumeDialog.h. Referenced by CVolumeDialog(), OnRadioVolXy(), OnRadioVolXz(), and OnRadioVolYz(). |
|
Definition at line 41 of file VolumeDialog.h. Referenced by CVolumeDialog(), OnRadioVolXy(), OnRadioVolXz(), and OnRadioVolYz(). |
|
Definition at line 34 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 35 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 46 of file VolumeDialog.h. Referenced by CVolumeDialog(). |
|
Definition at line 38 of file VolumeDialog.h. Referenced by CVolumeDialog(). |