mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0027750: Visualization, V3d_View - remove unused functionality ZClipping and ZCueing
Methods V3d_View::SetZClippingType(), ::SetZClippingDepth(), ::SetZClippingWidth(), ::SetZCueingDepth(), ::SetZCueingWidth(), ::SetZCueingOn(), ::SetZCueingOff() have been removed.
This commit is contained in:
@@ -8,8 +8,6 @@
|
||||
#include "OCC_MainFrame.h"
|
||||
#include "Viewer3dApp.h"
|
||||
#include "Viewer3dDoc.h"
|
||||
#include "ZClippingDlg.h"
|
||||
#include "ZCueingDlg.h"
|
||||
#include "ScaleDlg.h"
|
||||
#include "ShadingModelDlg.h"
|
||||
#include "ModelClippingDlg.h"
|
||||
@@ -86,9 +84,7 @@ BEGIN_MESSAGE_MAP(CViewer3dView, CView)
|
||||
ON_COMMAND(ID_SPOT_LIGHT, OnSpotLight)
|
||||
ON_COMMAND(ID_POSITIONAL_LIGHT, OnPositionalLight)
|
||||
ON_COMMAND(ID_AMBIENT_LIGHT, OnAmbientLight)
|
||||
ON_COMMAND(ID_ZCUEING, OnZcueing)
|
||||
ON_COMMAND(ID_SCALE, OnScale)
|
||||
ON_COMMAND(ID_ZCLIPPING, OnZclipping)
|
||||
ON_COMMAND(ID_SHADINGMODEL, OnShadingmodel)
|
||||
ON_COMMAND(ID_ANTIALIASINGONOFF, OnAntialiasingonoff)
|
||||
ON_COMMAND(ID_CLEAR_LIGHTS, OnClearLights)
|
||||
@@ -1001,20 +997,6 @@ void CViewer3dView::OnScale()
|
||||
myView->Redraw();
|
||||
}
|
||||
|
||||
void CViewer3dView::OnZcueing()
|
||||
{
|
||||
ZCueingDlg Dlg(myView, GetDocument());
|
||||
Dlg.DoModal();
|
||||
myView->Redraw();
|
||||
}
|
||||
|
||||
void CViewer3dView::OnZclipping()
|
||||
{
|
||||
ZClippingDlg Dlg(myView, GetDocument());
|
||||
Dlg.DoModal();
|
||||
myView->Redraw();
|
||||
}
|
||||
|
||||
//V3d_View.hxx
|
||||
|
||||
void CViewer3dView::OnShadingmodel()
|
||||
|
@@ -116,9 +116,7 @@ protected:
|
||||
afx_msg void OnSpotLight();
|
||||
afx_msg void OnPositionalLight();
|
||||
afx_msg void OnAmbientLight();
|
||||
afx_msg void OnZcueing();
|
||||
afx_msg void OnScale();
|
||||
afx_msg void OnZclipping();
|
||||
afx_msg void OnShadingmodel();
|
||||
afx_msg void OnAntialiasingonoff();
|
||||
afx_msg void OnClearLights();
|
||||
|
@@ -1,195 +0,0 @@
|
||||
// ZClippingDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Viewer3dApp.h"
|
||||
#include "Viewer3dDoc.h"
|
||||
#include "ZClippingDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ZClippingDlg dialog
|
||||
|
||||
ZClippingDlg::ZClippingDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/)
|
||||
: CDialog(ZClippingDlg::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(ZClippingDlg)
|
||||
m_ZClippingDepth = 0.0;
|
||||
m_ZClippingWidth = 0.0;
|
||||
myDoc=pDoc;
|
||||
myCurrent_V3d_View = Current_V3d_View;
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void ZClippingDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(ZClippingDlg)
|
||||
DDX_Control(pDX, IDC_SLIDER_ZCLIPPINGWIDTH, m_ZClippingWidthSlidCtrl);
|
||||
DDX_Control(pDX, IDC_SLIDER_ZCLIPPINGDEPTH, m_ZClippingDepthSlidCtrl);
|
||||
DDX_Control(pDX, IDC_COMBO_ZCLIPPINGTYPE, m_ZClippingTypeList);
|
||||
DDX_Text(pDX, IDC_EDIT_ZCLIPPINGDEPTH, m_ZClippingDepth);
|
||||
DDV_MinMaxDouble(pDX, m_ZClippingDepth, -1500., 1500.);
|
||||
DDX_Text(pDX, IDC_EDIT_ZCLIPPINGWIDTH, m_ZClippingWidth);
|
||||
DDV_MinMaxDouble(pDX, m_ZClippingWidth, 0., 1500.);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BOOL ZClippingDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// Initializing the ComboBox
|
||||
m_ZClippingTypeList.InsertString(-1, L"OFF");
|
||||
m_ZClippingTypeList.InsertString(-1, L"BACK");
|
||||
m_ZClippingTypeList.InsertString(-1, L"FRONT");
|
||||
m_ZClippingTypeList.InsertString(-1, L"SLICE");
|
||||
|
||||
// Getting the type of ZClipping and select it in the ComboBox
|
||||
Quantity_Length Depth, Width;
|
||||
V3d_TypeOfZclipping myTypeOfZclipping=myCurrent_V3d_View->ZClipping(Depth, Width);
|
||||
if(myTypeOfZclipping==V3d_OFF)
|
||||
m_ZClippingTypeList.SetCurSel(0);
|
||||
else if(myTypeOfZclipping==V3d_BACK)
|
||||
m_ZClippingTypeList.SetCurSel(1);
|
||||
else if(myTypeOfZclipping==V3d_FRONT)
|
||||
m_ZClippingTypeList.SetCurSel(2);
|
||||
else if(myTypeOfZclipping==V3d_SLICE)
|
||||
m_ZClippingTypeList.SetCurSel(3);
|
||||
|
||||
// Setting the m_ZClippingWidth value at ZClipping width
|
||||
m_ZClippingWidth=Width;
|
||||
// Setting the m_ZClippingWidthSlidCtrl position at floor(Width) value (because slider position is an integer)
|
||||
m_ZClippingWidthSlidCtrl.SetRange(0, 1500, TRUE);
|
||||
m_ZClippingWidthSlidCtrl.SetPos( (int) floor(Width));
|
||||
|
||||
// Setting the m_ZClippingDepth value at ZClipping depth
|
||||
m_ZClippingDepth=Depth;
|
||||
// Setting the m_ZClippingDepthSlidCtrl position at floor(Depth) value (because slider position is an integer)
|
||||
m_ZClippingDepthSlidCtrl.SetRange(-1500, 1500, TRUE);
|
||||
m_ZClippingDepthSlidCtrl.SetPos( (int) floor(Depth));
|
||||
|
||||
UpdateData(FALSE);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(ZClippingDlg, CDialog)
|
||||
//{{AFX_MSG_MAP(ZClippingDlg)
|
||||
ON_EN_CHANGE(IDC_EDIT_ZCLIPPINGDEPTH, OnChangeEditZclippingdepth)
|
||||
ON_EN_CHANGE(IDC_EDIT_ZCLIPPINGWIDTH, OnChangeEditZclippingwidth)
|
||||
ON_CBN_SELCHANGE(IDC_COMBO_ZCLIPPINGTYPE, OnSelchangeComboZclippingtype)
|
||||
ON_WM_HSCROLL()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ZClippingDlg message handlers
|
||||
|
||||
void ZClippingDlg::OnChangeEditZclippingdepth()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
|
||||
// Setting the m_ZClippingDepthSlidCtrl position at floor(m_ZClippingDepth) value (because slider position is an integer)
|
||||
m_ZClippingDepthSlidCtrl.SetPos( (int) floor(m_ZClippingDepth));
|
||||
// Setting the ZClipping depth at m_ZClippingDepth value
|
||||
myCurrent_V3d_View->SetZClippingDepth( (const Quantity_Length) m_ZClippingDepth);
|
||||
|
||||
myCurrent_V3d_View->Update();
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
myCurrent_V3d_View->SetZClippingDepth( (const Quantity_Length) m_ZClippingDepth);\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->Update();\n\
|
||||
");
|
||||
|
||||
// Update The Result Message Dialog
|
||||
myDoc->UpdateResultMessageDlg("SetZClippingDepth",Message);
|
||||
}
|
||||
|
||||
void ZClippingDlg::OnChangeEditZclippingwidth()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
|
||||
// ZClipping width must be >0
|
||||
if(m_ZClippingWidth<=0)
|
||||
{
|
||||
m_ZClippingWidth=1;
|
||||
UpdateData(FALSE);
|
||||
}
|
||||
|
||||
// Setting the m_ZClippingWidthSlidCtrl position at floor(m_ZClippingWidth) value (because slider position is an integer)
|
||||
m_ZClippingWidthSlidCtrl.SetPos( (int) floor(m_ZClippingWidth));
|
||||
// Setting the ZClipping width at m_ZClippingWidth value
|
||||
myCurrent_V3d_View->SetZClippingWidth( (const Quantity_Length) m_ZClippingWidth);
|
||||
|
||||
myCurrent_V3d_View->Update();
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
myCurrent_V3d_View->SetZClippingWidth( (const Quantity_Length) m_ZClippingWidth);\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->Update();\n\
|
||||
");
|
||||
|
||||
// Update The Result Message Dialog
|
||||
myDoc->UpdateResultMessageDlg("SetZClippingDepth",Message);
|
||||
}
|
||||
|
||||
void ZClippingDlg::OnSelchangeComboZclippingtype()
|
||||
{
|
||||
// Setting the ZClipping type as selected in the ComboBox
|
||||
myCurrent_V3d_View->SetZClippingType(V3d_TypeOfZclipping(m_ZClippingTypeList.GetCurSel()));
|
||||
myCurrent_V3d_View->Update();
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
myCurrent_V3d_View->SetZClippingType(V3d_TypeOfZclipping myTypeOfZclipping);\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->Update();\n\
|
||||
");
|
||||
|
||||
// Update The Result Message Dialog
|
||||
myDoc->UpdateResultMessageDlg("SetZClippingType",Message);
|
||||
}
|
||||
|
||||
void ZClippingDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
|
||||
{
|
||||
// Setting the m_ZClippingDepth value at m_ZClippingDepthSlidCtrl position
|
||||
m_ZClippingDepth = m_ZClippingDepthSlidCtrl.GetPos();
|
||||
// Setting the m_ZClippingWidth value at m_ZClippingWidthSlidCtrl position
|
||||
m_ZClippingWidth = m_ZClippingWidthSlidCtrl.GetPos();
|
||||
|
||||
if(m_ZClippingWidth<=0)
|
||||
{
|
||||
m_ZClippingWidth=1;
|
||||
m_ZClippingWidthSlidCtrl.SetPos( 1 );
|
||||
}
|
||||
|
||||
UpdateData(FALSE);
|
||||
|
||||
// Setting the ZClipping depth at m_ZClippingDepth value
|
||||
myCurrent_V3d_View->SetZClippingDepth( (const Quantity_Length) m_ZClippingDepth);
|
||||
// Setting the ZClipping width at m_ZClippingWidth value
|
||||
myCurrent_V3d_View->SetZClippingWidth( (const Quantity_Length) m_ZClippingWidth);
|
||||
myCurrent_V3d_View->Update();
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
myCurrent_V3d_View->SetZClippingWidth( (const Quantity_Length) m_ZClippingWidth);\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->SetZClippingDepth( (const Quantity_Length) m_ZClippingDepth);\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->Update();\n\
|
||||
");
|
||||
|
||||
// Update The Result Message Dialog
|
||||
myDoc->UpdateResultMessageDlg("SetZClippingDepth/SetZClippingWidth",Message);
|
||||
|
||||
CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
|
||||
}
|
||||
|
@@ -1,60 +0,0 @@
|
||||
#if !defined(AFX_ZCLIPPINGDLG_H__B8439A01_61FB_11D3_8D0A_00AA00D10994__INCLUDED_)
|
||||
#define AFX_ZCLIPPINGDLG_H__B8439A01_61FB_11D3_8D0A_00AA00D10994__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// ZClippingDlg.h : header file
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ZClippingDlg dialog
|
||||
|
||||
class ZClippingDlg : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
ZClippingDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(ZClippingDlg)
|
||||
enum { IDD = IDD_ZCLIPPING };
|
||||
CSliderCtrl m_ZClippingWidthSlidCtrl;
|
||||
CSliderCtrl m_ZClippingDepthSlidCtrl;
|
||||
CComboBox m_ZClippingTypeList;
|
||||
double m_ZClippingDepth;
|
||||
double m_ZClippingWidth;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(ZClippingDlg)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(ZClippingDlg)
|
||||
afx_msg void OnChangeEditZclippingdepth();
|
||||
afx_msg void OnChangeEditZclippingwidth();
|
||||
afx_msg void OnSelchangeComboZclippingtype();
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
|
||||
Handle(V3d_View) myCurrent_V3d_View;
|
||||
CViewer3dDoc* myDoc;
|
||||
};
|
||||
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_ZCLIPPINGDLG_H__B8439A01_61FB_11D3_8D0A_00AA00D10994__INCLUDED_)
|
@@ -1,204 +0,0 @@
|
||||
// ZCueingDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Viewer3dApp.h"
|
||||
#include "Viewer3dDoc.h"
|
||||
#include "ZCueingDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ZCueingDlg dialog
|
||||
|
||||
|
||||
ZCueingDlg::ZCueingDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent /*=NULL*/)
|
||||
: CDialog(ZCueingDlg::IDD, pParent)
|
||||
{
|
||||
//{{AFX_DATA_INIT(ZCueingDlg)
|
||||
myCurrent_V3d_View = Current_V3d_View;
|
||||
myDoc=pDoc;
|
||||
m_Cueing = FALSE;
|
||||
m_ZCueingDepth = 0.0;
|
||||
m_ZCueingWidth = 0.0;
|
||||
//}}AFX_DATA_INIT
|
||||
}
|
||||
|
||||
|
||||
void ZCueingDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(ZCueingDlg)
|
||||
DDX_Control(pDX, IDC_SLIDER_ZCUEINGWIDTH, m_ZCueingWidthSlidCtrl);
|
||||
DDX_Control(pDX, IDC_SLIDER_ZCUEINGDEPTH, m_ZCueingDepthSlidCtrl);
|
||||
DDX_Check(pDX, IDC_CHECK_CUEINGONOFF, m_Cueing);
|
||||
DDX_Text(pDX, IDC_EDIT_ZCUEINGDEPTH, m_ZCueingDepth);
|
||||
DDV_MinMaxDouble(pDX, m_ZCueingDepth, -1500., 1500.);
|
||||
DDX_Text(pDX, IDC_EDIT_ZCUEINGWIDTH, m_ZCueingWidth);
|
||||
DDV_MinMaxDouble(pDX, m_ZCueingWidth, 0., 1500.);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
BOOL ZCueingDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
Quantity_Length Depth, Width;
|
||||
|
||||
// Getting the ZCueing state (ON or OFF) and check (or not) the check button
|
||||
if(myCurrent_V3d_View->ZCueing(Depth, Width))
|
||||
m_Cueing=TRUE;
|
||||
else
|
||||
m_Cueing=FALSE;
|
||||
|
||||
// Setting the m_ZCueingWidth value at ZCueing Width
|
||||
m_ZCueingWidth=Width;
|
||||
m_ZCueingWidthSlidCtrl.SetRange(0, 1500, TRUE);
|
||||
// Setting the m_ZCueingWidthSlidCtrl position at floor(Width) value (because slider position is an integer)
|
||||
m_ZCueingWidthSlidCtrl.SetPos( (int) floor(Width));
|
||||
|
||||
// Setting the m_ZCueingWidth value at ZCueing Width
|
||||
m_ZCueingDepth=Depth;
|
||||
m_ZCueingDepthSlidCtrl.SetRange(-1500, 1500, TRUE);
|
||||
// Setting the m_ZCueingDepthSlidCtrl position at floor(Depth) value (because slider position is an integer)
|
||||
m_ZCueingDepthSlidCtrl.SetPos( (int) floor(Depth));
|
||||
|
||||
UpdateData(FALSE);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(ZCueingDlg, CDialog)
|
||||
//{{AFX_MSG_MAP(ZCueingDlg)
|
||||
ON_BN_CLICKED(IDC_CHECK_CUEINGONOFF, OnCheckCueingonoff)
|
||||
ON_EN_CHANGE(IDC_EDIT_ZCUEINGDEPTH, OnChangeEditZcueingdepth)
|
||||
ON_EN_CHANGE(IDC_EDIT_ZCUEINGWIDTH, OnChangeEditZcueingwidth)
|
||||
ON_WM_HSCROLL()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ZCueingDlg message handlers
|
||||
|
||||
void ZCueingDlg::OnCheckCueingonoff()
|
||||
{
|
||||
Quantity_Length Depth, Width;
|
||||
UpdateData(TRUE);
|
||||
|
||||
if(m_Cueing)
|
||||
{
|
||||
if(!myCurrent_V3d_View->ZCueing(Depth, Width))
|
||||
// Setting the ZCueing on if it's not yet
|
||||
myCurrent_V3d_View->SetZCueingOn();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(myCurrent_V3d_View->ZCueing(Depth, Width))
|
||||
// Setting the ZCueing off if it's not yet
|
||||
myCurrent_V3d_View->SetZCueingOff();
|
||||
}
|
||||
|
||||
myCurrent_V3d_View->Update();
|
||||
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
if(!myCurrent_V3d_View->ZCueing(Depth, Width));\n\
|
||||
myCurrent_V3d_View->SetZCueingOn();\n\
|
||||
else\n\
|
||||
myCurrent_V3d_View->SetZCueingOff();\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->Update();\n\
|
||||
");
|
||||
|
||||
// Update The Result Message Dialog
|
||||
myDoc->UpdateResultMessageDlg("SetZCueingWidth",Message);
|
||||
}
|
||||
|
||||
void ZCueingDlg::OnChangeEditZcueingdepth()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
|
||||
// Setting the m_ZCueingDepthSlidCtrl position at floor(m_ZCueingDepth) value (because slider position is an integer)
|
||||
m_ZCueingDepthSlidCtrl.SetPos( (int) floor(m_ZCueingDepth));
|
||||
// Setting the ZCueing depth at m_ZCueingDepth value
|
||||
myCurrent_V3d_View->SetZCueingDepth( (const Quantity_Length) m_ZCueingDepth);
|
||||
|
||||
myCurrent_V3d_View->Update();
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
myCurrent_V3d_View->SetZCueingDepth( (const Quantity_Length) m_ZCueingDepth);\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->Update();\n\
|
||||
");
|
||||
|
||||
// Update The Result Message Dialog
|
||||
myDoc->UpdateResultMessageDlg("SetZCueingDepth",Message);
|
||||
}
|
||||
|
||||
void ZCueingDlg::OnChangeEditZcueingwidth()
|
||||
{
|
||||
UpdateData(TRUE);
|
||||
|
||||
if(m_ZCueingWidth<=0)
|
||||
{
|
||||
m_ZCueingWidth=1;
|
||||
UpdateData(FALSE);
|
||||
}
|
||||
|
||||
// Setting the m_ZCueingWidthSlidCtrl position at floor(m_ZCueingWidth) value (because slider position is an integer)
|
||||
m_ZCueingWidthSlidCtrl.SetPos( (int) floor(m_ZCueingWidth));
|
||||
// Setting the ZCueing width at m_ZCueingWidth value
|
||||
myCurrent_V3d_View->SetZCueingWidth( (const Quantity_Length) m_ZCueingWidth);
|
||||
|
||||
myCurrent_V3d_View->Update();
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
myCurrent_V3d_View->SetZCueingWidth( (const Quantity_Length) m_ZCueingWidth);\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->Update();\n\
|
||||
");
|
||||
|
||||
// Update The Result Message Dialog
|
||||
myDoc->UpdateResultMessageDlg("SetZCueingWidth",Message);
|
||||
}
|
||||
|
||||
void ZCueingDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
|
||||
{
|
||||
// Setting the m_ZCueingDepth value at m_ZCueingDepthSlidCtrl position
|
||||
m_ZCueingDepth = m_ZCueingDepthSlidCtrl.GetPos();
|
||||
// Setting the m_ZCueingWidth value at m_ZCueingWidthSlidCtrl position
|
||||
m_ZCueingWidth = m_ZCueingWidthSlidCtrl.GetPos();
|
||||
|
||||
if(m_ZCueingWidth<=0)
|
||||
{
|
||||
m_ZCueingWidth=1;
|
||||
m_ZCueingWidthSlidCtrl.SetPos( 1 );
|
||||
}
|
||||
|
||||
UpdateData(FALSE);
|
||||
|
||||
// Setting the ZCueing depth at m_ZCueingDepth value
|
||||
myCurrent_V3d_View->SetZCueingDepth( (const Quantity_Length) m_ZCueingDepth);
|
||||
// Setting the ZCueing width at m_ZCueingWidth value
|
||||
myCurrent_V3d_View->SetZCueingWidth( (const Quantity_Length) m_ZCueingWidth);
|
||||
myCurrent_V3d_View->Update();
|
||||
|
||||
TCollection_AsciiString Message("\
|
||||
myCurrent_V3d_View->SetZCueingDepth( (const Quantity_Length) m_ZCueingDepth);\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->SetZCueingWidth( (const Quantity_Length) m_ZCueingWidth);\n\
|
||||
\n\
|
||||
myCurrent_V3d_View->Update();\n\
|
||||
");
|
||||
|
||||
// Update The Result Message Dialog
|
||||
myDoc->UpdateResultMessageDlg("SetZCueingDepth/SetZCueingWidth",Message);
|
||||
|
||||
CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
|
||||
}
|
||||
|
@@ -1,59 +0,0 @@
|
||||
#if !defined(AFX_ZCUEINGDLG_H__B8439A02_61FB_11D3_8D0A_00AA00D10994__INCLUDED_)
|
||||
#define AFX_ZCUEINGDLG_H__B8439A02_61FB_11D3_8D0A_00AA00D10994__INCLUDED_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
// ZCueingDlg.h : header file
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// ZCueingDlg dialog
|
||||
|
||||
class ZCueingDlg : public CDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
ZCueingDlg(Handle(V3d_View) Current_V3d_View, CViewer3dDoc* pDoc, CWnd* pParent = NULL);
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(ZCueingDlg)
|
||||
enum { IDD = IDD_ZCUEING };
|
||||
CSliderCtrl m_ZCueingWidthSlidCtrl;
|
||||
CSliderCtrl m_ZCueingDepthSlidCtrl;
|
||||
BOOL m_Cueing;
|
||||
double m_ZCueingDepth;
|
||||
double m_ZCueingWidth;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(ZCueingDlg)
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(ZCueingDlg)
|
||||
afx_msg void OnCheckCueingonoff();
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnChangeEditZcueingdepth();
|
||||
afx_msg void OnChangeEditZcueingwidth();
|
||||
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
|
||||
Handle(V3d_View) myCurrent_V3d_View;
|
||||
CViewer3dDoc* myDoc;
|
||||
};
|
||||
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_ZCUEINGDLG_H__B8439A02_61FB_11D3_8D0A_00AA00D10994__INCLUDED_)
|
Reference in New Issue
Block a user