1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0023791: Remove obsolete functionality - animation mode and degeneration presentation mode

This commit is contained in:
kgv
2013-03-15 11:46:21 +04:00
parent 123e4db005
commit de75ed09ad
71 changed files with 497 additions and 3106 deletions

View File

@@ -32,7 +32,7 @@ CSelectionDialog::CSelectionDialog(CHLRDoc* aDoc,CWnd* pParent /*=NULL*/)
m_DisplayMode = 0;
m_NbIsos = 2;
m_DrawHiddenLine = TRUE;
m_DegeneratedModeOn = TRUE;
m_HlrModeIsOn = FALSE;
//}}AFX_DATA_INIT
}
@@ -44,7 +44,7 @@ void CSelectionDialog::DoDataExchange(CDataExchange* pDX)
DDX_Radio(pDX, IDC_DisplayDefault, m_DisplayMode);
DDX_Text(pDX, IDC_EDIT_NBIsos, m_NbIsos);
DDX_Check(pDX, IDC_DrawHiddenLine, m_DrawHiddenLine);
DDX_Check(pDX, IDC_DegeneratedMode, m_DegeneratedModeOn);
DDX_Check(pDX, IDC_HlrModeIsOn, m_HlrModeIsOn);
//}}AFX_DATA_MAP
}
@@ -80,7 +80,7 @@ BEGIN_MESSAGE_MAP(CSelectionDialog, CDialog)
ON_WM_RBUTTONUP()
ON_WM_MOUSEMOVE()
ON_BN_CLICKED(IDC_DrawHiddenLine, OnDrawHiddenLine)
ON_BN_CLICKED(IDC_DegeneratedMode, OnDegeneratedMode)
ON_BN_CLICKED(IDC_HlrModeIsOn, OnHlrMode)
ON_WM_DRAWITEM()
ON_WM_PAINT()
//}}AFX_MSG_MAP
@@ -121,30 +121,30 @@ BOOL CSelectionDialog::OnInitDialog()
void CSelectionDialog::OnDisplay(bool isFit)
{
GetDlgItem(IDC_DUMMYBUTTON)->SetRedraw(true);
if(!myDisplay) {
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
((CHLRApp*)AfxGetApp())->GetGraphicDriver();
if (!myDisplay)
{
Handle(Graphic3d_GraphicDriver) aGraphicDriver = ((CHLRApp*)AfxGetApp())->GetGraphicDriver();
myActiveViewer = new V3d_Viewer(aGraphicDriver,(short *) "Visu3D");
myActiveViewer->SetDefaultLights();
myActiveViewer->SetLightOn();
myActiveView = myActiveViewer->CreateView();
myActiveViewer = new V3d_Viewer(aGraphicDriver,(short *) "Visu3D");
myActiveViewer->SetDefaultLights();
myActiveViewer->SetLightOn();
myActiveView = myActiveViewer->CreateView();
Handle(WNT_Window) aWNTWindow = new WNT_Window(GetDlgItem(IDC_DUMMYBUTTON)->GetSafeHwnd(),
Quantity_NOC_GRAY);
Handle(WNT_Window) aWNTWindow = new WNT_Window (GetDlgItem(IDC_DUMMYBUTTON)->GetSafeHwnd(),
Quantity_NOC_GRAY);
myActiveView->SetComputedMode (m_HlrModeIsOn);
myActiveView->SetWindow(aWNTWindow);
if (m_DegeneratedModeOn) myActiveView->SetDegenerateModeOn();
myActiveView->SetWindow(aWNTWindow);
myInteractiveContext = new AIS_InteractiveContext(myActiveViewer);
myInteractiveContext = new AIS_InteractiveContext(myActiveViewer);
// TRIHEDRON
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
myTrihedron=new AIS_Trihedron(aTrihedronAxis);
// TRIHEDRON
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
myTrihedron=new AIS_Trihedron(aTrihedronAxis);
myInteractiveContext->Display(myTrihedron);
myInteractiveContext->Display(myTrihedron);
}
if(isFit) {
if (isFit)
{
myActiveView->ZFitAll();
myActiveView->FitAll();
}
@@ -389,20 +389,18 @@ void CSelectionDialog::OnAxoView()
OnDisplay(true);
}
void CSelectionDialog::OnDegeneratedMode()
void CSelectionDialog::OnHlrMode()
{
UpdateData(true);
if(m_DegeneratedModeOn)
if (!m_HlrModeIsOn)
{
myActiveView->SetDegenerateModeOn();
m_DegeneratedModeOn = Standard_True;
myActiveView->SetComputedMode (m_HlrModeIsOn);
}
else
{
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
myActiveView->SetDegenerateModeOff();
m_DegeneratedModeOn = Standard_False;
myActiveView->SetComputedMode (m_HlrModeIsOn);
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
}
OnDisplay(false);
@@ -433,16 +431,20 @@ void CSelectionDialog::OnRButtonDown(UINT nFlags, CPoint point)
{
CDialog::OnRButtonDown(nFlags, point);
if ((myPosMinX > point.x)||(myPosMaxX < point.x) ||
(myPosMinY > point.y) ||(myPosMaxY < point.y))
return;
if ( nFlags & CASCADESHORTCUTKEY )
if ((myPosMinX > point.x) || (myPosMaxX < point.x) ||
(myPosMinY > point.y) || (myPosMaxY < point.y))
{
if (!m_DegeneratedModeOn)
myActiveView->SetDegenerateModeOn();
myActiveView->StartRotation(point.x,point.y);
OnDisplay(false);
return;
}
if ( nFlags & CASCADESHORTCUTKEY )
{
if (m_HlrModeIsOn)
{
myActiveView->SetComputedMode (Standard_False);
}
myActiveView->StartRotation (point.x, point.y);
OnDisplay (false);
}
}
@@ -450,17 +452,16 @@ void CSelectionDialog::OnRButtonUp(UINT nFlags, CPoint point)
{
CDialog::OnRButtonUp(nFlags, point);
if ((myPosMinX > point.x)||(myPosMaxX < point.x) ||
(myPosMinY > point.y) ||(myPosMaxY < point.y))
if ((myPosMinX > point.x) || (myPosMaxX < point.x) ||
(myPosMinY > point.y) || (myPosMaxY < point.y))
{
return;
}
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
// reset tyhe good Degenerated mode according to the strored one
// --> dynamic rotation may have change it
if (!m_DegeneratedModeOn)
myActiveView->SetDegenerateModeOff();
else
myActiveView->SetDegenerateModeOn();
// reset tyhe good HLR mode according to the strored one
// --> dynamic rotation may have change it
myActiveView->SetComputedMode (m_HlrModeIsOn);
OnDisplay(false);
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
}

View File

@@ -29,7 +29,7 @@ public:
int m_DisplayMode;
int m_NbIsos;
BOOL m_DrawHiddenLine;
BOOL m_DegeneratedModeOn;
BOOL m_HlrModeIsOn;
//}}AFX_DATA
// Overrides
@@ -75,7 +75,7 @@ protected:
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnDrawHiddenLine();
afx_msg void OnDegeneratedMode();
afx_msg void OnHlrMode();
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()