#include <TFEditDialog.h>
Public Types | |
enum | { IDD = IDD_TFEDITDIALOG } |
Public Member Functions | |
TFEditDialog (CWnd *pParent=NULL) | |
virtual | ~TFEditDialog () |
afx_msg void | OnBnClickedButtonclose () |
afx_msg void | OnPaint () |
LRESULT | OnRangeChange (WPARAM wParam, LPARAM lParam) |
afx_msg void | OnLButtonDblClk (UINT nFlags, CPoint point) |
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point) |
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point) |
afx_msg void | OnMouseMove (UINT nFlags, CPoint point) |
afx_msg void | OnRButtonUp (UINT nFlags, CPoint point) |
Protected Member Functions | |
virtual void | DoDataExchange (CDataExchange *pDX) |
virtual BOOL | OnInitDialog () |
Protected Attributes | |
CStatic | m_OpacityControl |
CStatic | m_ColorControl |
CRangeSlider | c_RangeSliderHor |
CRangeSlider | c_RangeSliderVert |
double | m_Left |
double | m_Right |
double | m_Top |
double | m_Bottom |
Private Member Functions | |
void | RedrawColorAndOpacity () |
void | GetColorControlPos (CPoint point, int &xPos, double &zoomFaktorX) |
void | GetOpacityControlPos (CPoint point, int &xPos, float &yPos, double &zoomFaktorX, double &zoomFaktorY) |
Private Attributes | |
bool | m_MouseOpacity |
bool | m_MouseColor |
CPoint | m_MousePos |
int | m_MouseIndexPoint |
Static Private Attributes | |
static const int | MIN_X_ZOOM = 100 |
static const int | MIN_Y_ZOOM = 5 |
TFEditDialog::TFEditDialog | ( | CWnd * | pParent = NULL |
) |
TFEditDialog::~TFEditDialog | ( | ) | [virtual] |
void TFEditDialog::DoDataExchange | ( | CDataExchange * | pDX | ) | [protected, virtual] |
void TFEditDialog::GetColorControlPos | ( | CPoint | point, | |
int & | xPos, | |||
double & | zoomFaktorX | |||
) | [private] |
Returns the relative position of a point in the color control window. It is used to determine the position in the color control window on a mouse click, taking into account the current zoom factor and the current x offset
point | Mouse position | |
xPos | Relative x position in the color control window | |
zoomFaktorX | current zoom Factor set for color control window |
void TFEditDialog::GetOpacityControlPos | ( | CPoint | point, | |
int & | xPos, | |||
float & | yPos, | |||
double & | zoomFaktorX, | |||
double & | zoomFaktorY | |||
) | [private] |
Returns the relative position of a point in the opacity control window. It is used to determine the position in the opacity control window on a mouse click, taking into account the current zoom factor and the current x and y offset
point | Mouse position | |
xPos | Relative x position in the opacity control window | |
yPos | Relative y psoition in the opacity control window | |
zoomFaktorX | X zoom factor set for opacity control window | |
zoomFaktorY | Y zoom factor set for opacity control window |
point | Absolute position of mouse cursor | |
xPos | Density (0-4095) | |
yPos | Opacity (0-1.0) | |
zoomFaktorX | ||
zoomFaktorY |
void TFEditDialog::OnBnClickedButtonclose | ( | ) |
Close Button. Hide Dialog
BOOL TFEditDialog::OnInitDialog | ( | ) | [protected, virtual] |
void TFEditDialog::OnLButtonDblClk | ( | UINT | nFlags, | |
CPoint | point | |||
) |
Left mouse button double click. Add a point to the transfer function
void TFEditDialog::OnLButtonDown | ( | UINT | nFlags, | |
CPoint | point | |||
) |
Left mouse button click. Drag and Drop points
void TFEditDialog::OnLButtonUp | ( | UINT | nFlags, | |
CPoint | point | |||
) |
Left mouse button release. End of drag and drop
void TFEditDialog::OnMouseMove | ( | UINT | nFlags, | |
CPoint | point | |||
) |
Mouse movement. Move transfer function point when left mouse button is pressed and mouse was on a transfer function point
void TFEditDialog::OnPaint | ( | ) |
Redraw Transfer function
LRESULT TFEditDialog::OnRangeChange | ( | WPARAM | wParam, | |
LPARAM | lParam | |||
) |
Callback function for zoom sliders.
void TFEditDialog::OnRButtonUp | ( | UINT | nFlags, | |
CPoint | point | |||
) |
Right mouse button release. Remove point, when mouse is on a opacity or color transfer function point
void TFEditDialog::RedrawColorAndOpacity | ( | ) | [private] |
Update the color and opacity transfer function window on main screen and redraw 2D and 3D views. This method should be called when the transfer function has been changed
CRangeSlider TFEditDialog::c_RangeSliderHor [protected] |
CRangeSlider TFEditDialog::c_RangeSliderVert [protected] |
double TFEditDialog::m_Bottom [protected] |
CStatic TFEditDialog::m_ColorControl [protected] |
double TFEditDialog::m_Left [protected] |
bool TFEditDialog::m_MouseColor [private] |
int TFEditDialog::m_MouseIndexPoint [private] |
bool TFEditDialog::m_MouseOpacity [private] |
CPoint TFEditDialog::m_MousePos [private] |
CStatic TFEditDialog::m_OpacityControl [protected] |
double TFEditDialog::m_Right [protected] |
double TFEditDialog::m_Top [protected] |
const int TFEditDialog::MIN_X_ZOOM = 100 [static, private] |
Minimum zoom range allowed in X direction
const int TFEditDialog::MIN_Y_ZOOM = 5 [static, private] |
Minimum zoom range allowed in Y direction