0023791: Remove obsolete functionality - animation mode and degeneration presentation...
authorkgv <kgv@opencascade.com>
Fri, 15 Mar 2013 07:46:21 +0000 (11:46 +0400)
committerkgv <kgv@opencascade.com>
Fri, 22 Mar 2013 12:55:11 +0000 (16:55 +0400)
71 files changed:
samples/CSharp/OCC/OCC.vcproj
samples/CSharp/OCC/OCCViewer.cpp
samples/CSharp/OCC/stdafx.h
samples/CSharp/shell/shell.vcproj
samples/mfc/standard/01_Geometry/src/GeometryView.cpp
samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp
samples/mfc/standard/04_Viewer3d/src/Viewer3dView.h
samples/mfc/standard/08_HLR/res/HLR.APS
samples/mfc/standard/08_HLR/res/HLR.rc
samples/mfc/standard/08_HLR/res/resource.h
samples/mfc/standard/08_HLR/src/SelectionDialog.cpp
samples/mfc/standard/08_HLR/src/SelectionDialog.h
samples/mfc/standard/09_Animation/src/AnimationView3D.cpp
samples/mfc/standard/09_Animation/src/AnimationView3D.h
samples/mfc/standard/Common/OCC_3dView.cpp
samples/mfc/standard/Common/OCC_3dView.h
samples/qt/Common/src/MDIWindow.cxx
samples/qt/Common/src/View.cxx
samples/qt/Common/src/View.h
src/AIS/AIS_InteractiveContext.cdl
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_InteractiveObject.cdl
src/AIS/AIS_InteractiveObject.cxx
src/Aspect/Aspect.cdl
src/Graphic3d/Graphic3d_AspectFillArea3d.cdl
src/Graphic3d/Graphic3d_AspectFillArea3d.cxx
src/Graphic3d/Graphic3d_CGroup.hxx
src/Graphic3d/Graphic3d_CView.hxx
src/Graphic3d/Graphic3d_GraphicDriver.cdl
src/Graphic3d/Graphic3d_Structure.cxx
src/InterfaceGraphic/FILES
src/InterfaceGraphic/InterfaceGraphic_Labels.hxx
src/InterfaceGraphic/InterfaceGraphic_PrimitiveArray.hxx
src/InterfaceGraphic/InterfaceGraphic_degeneration.hxx [deleted file]
src/OpenGl/FILES
src/OpenGl/OpenGl_GraphicDriver.cxx
src/OpenGl/OpenGl_GraphicDriver.hxx
src/OpenGl/OpenGl_GraphicDriver_1.cxx
src/OpenGl/OpenGl_GraphicDriver_3.cxx
src/OpenGl/OpenGl_GraphicDriver_4.cxx
src/OpenGl/OpenGl_GraphicDriver_7.cxx
src/OpenGl/OpenGl_Group.cxx
src/OpenGl/OpenGl_NamedStatus.hxx
src/OpenGl/OpenGl_Polygon.cxx
src/OpenGl/OpenGl_Polyline.cxx
src/OpenGl/OpenGl_PrimitiveArray.cxx
src/OpenGl/OpenGl_PrimitiveArray.hxx
src/OpenGl/OpenGl_Structure.cxx
src/OpenGl/OpenGl_Structure.hxx
src/OpenGl/OpenGl_Text.cxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_2.cxx
src/OpenGl/OpenGl_Workspace.cxx
src/OpenGl/OpenGl_Workspace.hxx
src/OpenGl/OpenGl_Workspace_1.cxx [deleted file]
src/OpenGl/OpenGl_Workspace_3.cxx
src/OpenGl/OpenGl_Workspace_5.cxx
src/OpenGl/OpenGl_tsm.hxx
src/QABugs/QABugs_17.cxx
src/QABugs/QABugs_8.cxx
src/V3d/V3d_View.cdl
src/V3d/V3d_View.cxx
src/V3d/V3d_Viewer.cdl
src/ViewerTest/ViewerTest_Tool.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/Visual3d/Visual3d.cdl
src/Visual3d/Visual3d_View.cdl
src/Visual3d/Visual3d_View.cxx
src/Visual3d/Visual3d_View.pxx
tests/bugs/vis/buc60753 [deleted file]

index ad731fd..abc8c2c 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="windows-1251"?>
 <VisualStudioProject
        ProjectType="Visual C++"
-       Version="9,00"
+       Version="9.00"
        Name="OCC"
        ProjectGUID="{DCB139CF-2190-412E-B72F-8B080CC01422}"
        Keyword="Win32Proj"
@@ -63,7 +63,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="TKV3d.lib TKV2d.lib TKHLR.lib TKService.lib TKBool.lib TKPShape.lib TKMath.lib TKBO.lib TKernel.lib TKPrim.lib TKTopAlgo.lib TKBRep.lib TKGeomAlgo.lib TKG2d.lib TKG3d.lib PTKernel.lib TKShapeSchema.lib TKXSBase.lib TKIGES.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKShHealing.lib TKSTL.lib TKVRML.lib"
+                               AdditionalDependencies="TKV3d.lib TKHLR.lib TKService.lib TKBool.lib TKPShape.lib TKMath.lib TKBO.lib TKernel.lib TKPrim.lib TKTopAlgo.lib TKBRep.lib TKGeomAlgo.lib TKG2d.lib TKG3d.lib PTKernel.lib TKShapeSchema.lib TKXSBase.lib TKIGES.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKShHealing.lib TKSTL.lib TKVRML.lib"
                                OutputFile="$(OutDir)/OCC.dll"
                                LinkIncremental="2"
                                AdditionalLibraryDirectories="$(CSF_OPT_LIB32D)"
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="TKV3d.lib TKV2d.lib TKHLR.lib TKService.lib TKBool.lib TKPShape.lib TKMath.lib TKBO.lib TKernel.lib TKPrim.lib TKTopAlgo.lib TKBRep.lib TKGeomAlgo.lib TKG2d.lib TKG3d.lib PTKernel.lib TKShapeSchema.lib TKXSBase.lib TKIGES.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKShHealing.lib TKSTL.lib TKVRML.lib"
+                               AdditionalDependencies="TKV3d.lib TKHLR.lib TKService.lib TKBool.lib TKPShape.lib TKMath.lib TKBO.lib TKernel.lib TKPrim.lib TKTopAlgo.lib TKBRep.lib TKGeomAlgo.lib TKG2d.lib TKG3d.lib PTKernel.lib TKShapeSchema.lib TKXSBase.lib TKIGES.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKShHealing.lib TKSTL.lib TKVRML.lib"
                                OutputFile="$(OutDir)/OCC.dll"
                                LinkIncremental="1"
                                AdditionalLibraryDirectories="$(CSF_OPT_LIB32)"
index 3b0f3fe..ebb3a0f 100755 (executable)
@@ -78,13 +78,13 @@ void OCCViewer::RedrawView(void)
 void OCCViewer::SetDegenerateModeOn(void)
 {
        if (!myView.IsNull())
-               myView->SetDegenerateModeOn();
+               myView->SetComputedMode (Standard_False);
 }
 
 void OCCViewer::SetDegenerateModeOff(void)
 {
        if (!myView.IsNull())
-               myView->SetDegenerateModeOff();
+               myView->SetComputedMode (Standard_True);
 }
 
 void OCCViewer::WindowFitAll(int Xmin, int Ymin, int Xmax, int Ymax)
index bfa3fc2..fbb4173 100755 (executable)
@@ -51,6 +51,7 @@
 #include <gp_Ax2.hxx>
 #include <Geom_Axis2Placement.hxx>
 //csfdb I/E
+#include <Message_ProgressIndicator.hxx>
 #include <FSD_File.hxx>
 #include <ShapeSchema.hxx>
 #include <Storage_Data.hxx>
@@ -71,4 +72,4 @@
 //for stl export
 #include <StlAPI_Writer.hxx>
 //for vrml export
-#include <VrmlAPI_Writer.hxx>
\ No newline at end of file
+#include <VrmlAPI_Writer.hxx>
index 5df333a..28c3951 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="windows-1251"?>
 <VisualStudioProject
        ProjectType="Visual C++"
-       Version="9,00"
+       Version="9.00"
        Name="shell"
        ProjectGUID="{969912D9-78E7-4AB8-B4FF-6B52B4F03991}"
        Keyword="Win32Proj"
@@ -63,7 +63,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="OCC.lib TKV3d.lib TKV2d.lib TKHLR.lib TKService.lib PTKernel.lib TKShapeSchema.lib TKBool.lib TKMath.lib TKBO.lib TKernel.lib TKPrim.lib TKTopAlgo.lib TKBRep.lib TKGeomAlgo.lib TKPShape.lib TKXSBase.lib TKIGES.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKShHealing.lib TKSTL.lib TKVRML.lib"
+                               AdditionalDependencies="OCC.lib TKV3d.lib TKHLR.lib TKService.lib PTKernel.lib TKShapeSchema.lib TKBool.lib TKMath.lib TKBO.lib TKernel.lib TKPrim.lib TKTopAlgo.lib TKBRep.lib TKGeomAlgo.lib TKPShape.lib TKXSBase.lib TKIGES.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKShHealing.lib TKSTL.lib TKVRML.lib"
                                OutputFile="$(OutDir)/shell.dll"
                                LinkIncremental="2"
                                AdditionalLibraryDirectories="..\OCC\$(OutDir);$(CSF_OPT_LIB32D)"
                        />
                        <Tool
                                Name="VCLinkerTool"
-                               AdditionalDependencies="OCC.lib TKV3d.lib TKV2d.lib TKHLR.lib TKService.lib PTKernel.lib TKShapeSchema.lib TKBool.lib TKMath.lib TKBO.lib TKernel.lib TKPrim.lib TKTopAlgo.lib TKBRep.lib TKGeomAlgo.lib TKPShape.lib TKXSBase.lib TKIGES.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKShHealing.lib TKSTL.lib TKVRML.lib"
+                               AdditionalDependencies="OCC.lib TKV3d.lib TKHLR.lib TKService.lib PTKernel.lib TKShapeSchema.lib TKBool.lib TKMath.lib TKBO.lib TKernel.lib TKPrim.lib TKTopAlgo.lib TKBRep.lib TKGeomAlgo.lib TKPShape.lib TKXSBase.lib TKIGES.lib TKSTEP.lib TKSTEP209.lib TKSTEPAttr.lib TKSTEPBase.lib TKShHealing.lib TKSTL.lib TKVRML.lib"
                                OutputFile="$(OutDir)/shell.dll"
                                LinkIncremental="1"
                                AdditionalLibraryDirectories="..\OCC\$(OutDir);$(CSF_OPT_LIB32)"
index 0f1f35a..3e8de8d 100755 (executable)
@@ -139,9 +139,11 @@ void CGeometryView::OnLButtonDown(UINT nFlags, CPoint point)
       break;
     case  CurAction3d_DynamicRotation :
       // SetCursor(AfxGetApp()->LoadStandardCursor());
-      if (!myDegenerateModeIsOn)
-        myView->SetDegenerateModeOn();
-      myView->StartRotation(point.x,point.y);  
+      if (myHlrModeIsOn)
+      {
+        myView->SetComputedMode (Standard_False);
+      }
+      myView->StartRotation (point.x, point.y);
       break;
     default :
       Standard_Failure::Raise(" incompatible Current Mode ");
@@ -231,31 +233,25 @@ void CGeometryView::OnMButtonUp(UINT nFlags, CPoint point)
 
 void CGeometryView::OnRButtonDown(UINT nFlags, CPoint point) 
 {
-  if ( nFlags & MK_CONTROL ) 
+  if ( nFlags & MK_CONTROL )
   {
-    // SetCursor(AfxGetApp()->LoadStandardCursor());   
-    if (!myDegenerateModeIsOn)
-      myView->SetDegenerateModeOn();
-    myView->StartRotation(point.x,point.y);  
+    // SetCursor(AfxGetApp()->LoadStandardCursor());
+    if (myHlrModeIsOn)
+    {
+      myView->SetComputedMode (Standard_False);
+    }
+    myView->StartRotation (point.x, point.y);
   }
   else // if ( Ctrl )
   {
-    Popup(point.x,point.y);
-  }    
+    Popup (point.x, point.y);
+  }
 }
 
 void CGeometryView::OnRButtonUp(UINT nFlags, CPoint point) 
 {
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
-  if (!myDegenerateModeIsOn)
-  {  
-    myView->SetDegenerateModeOff();
-    myDegenerateModeIsOn = Standard_False;
-  } else
-  {
-    myView->SetDegenerateModeOn();
-    myDegenerateModeIsOn = Standard_True;
-  }
+  myView->SetComputedMode (myHlrModeIsOn);
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
 }
 
@@ -341,16 +337,16 @@ void CGeometryView::OnMouseMove(UINT nFlags, CPoint point)
       }
 }
 
-void CGeometryView::OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI) 
+void CGeometryView::OnUpdateBUTTONHlrOff (CCmdUI* pCmdUI)
 {
-  pCmdUI->SetCheck (myDegenerateModeIsOn);
-  pCmdUI->Enable   (!myDegenerateModeIsOn);    
+  pCmdUI->SetCheck (!myHlrModeIsOn);
+  pCmdUI->Enable   (myHlrModeIsOn);
 }
 
-void CGeometryView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) 
+void CGeometryView::OnUpdateBUTTONHlrOn (CCmdUI* pCmdUI)
 {
-  pCmdUI->SetCheck (!myDegenerateModeIsOn);
-  pCmdUI->Enable   (myDegenerateModeIsOn);     
+  pCmdUI->SetCheck (myHlrModeIsOn);
+  pCmdUI->Enable   (!myHlrModeIsOn);
 }
 
 void CGeometryView::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) 
index d6652f7..f7605cf 100755 (executable)
@@ -101,38 +101,32 @@ END_MESSAGE_MAP()
 // CViewer3dView construction/destruction
 
 CViewer3dView::CViewer3dView()
+: scaleX (1),
+  scaleY (1),
+  scaleZ (1),
+  myVisMode (VIS_SHADE),
+  myCurrentMode (CurAction3d_Nothing),
+  myXmin (0),
+  myYmin (0),
+  myXmax (0),
+  myYmax (0),
+  myCurZoom (0.0),
+  myWidth  (0),
+  myHeight (0),
+  NbActiveLights (2), // There are 2 default active lights
+  myHlrModeIsOn (Standard_False),
+  m_Pen (NULL),
+  myAxisKey (0),
+  myScaleDirection (0)
 {
-       // TODO: add construction code here
-    myXmin=0;
-    myYmin=0;  
-    myXmax=0;
-    myYmax=0;
-    myCurZoom=0;
-       myWidth=0;
-       myHeight=0;
-
-    scaleX = 1;
-    scaleY = 1;
-    scaleZ = 1;
-
-       myAxisKey = 0;
-       myScaleDirection = 0;
-
-
-       myVisMode = VIS_SHADE;
-
-    // will be set in OnInitial update, but, for more security :
-    myCurrentMode = CurAction3d_Nothing;
-    myDegenerateModeIsOn=Standard_True;
-    m_Pen = NULL;
-       NbActiveLights=2; // There are 2 default active lights
-       myGraphicDriver = ((CViewer3dApp*)AfxGetApp())->GetGraphicDriver();
+  // TODO: add construction code here
+  myGraphicDriver = ((CViewer3dApp*)AfxGetApp())->GetGraphicDriver();
 }
 
 CViewer3dView::~CViewer3dView()
 {
-       myView->Remove();
-    if (m_Pen) delete m_Pen;
+  myView->Remove();
+  if (m_Pen) delete m_Pen;
 }
 
 BOOL CViewer3dView::PreCreateWindow(CREATESTRUCT& cs)
@@ -147,31 +141,29 @@ BOOL CViewer3dView::PreCreateWindow(CREATESTRUCT& cs)
 // CViewer3dView drawing
 void CViewer3dView::OnInitialUpdate() 
 {
-       CView::OnInitialUpdate();
-       
-       
-    myView = GetDocument()->GetViewer()->CreateView();
-
-    // set the default mode in wireframe ( not hidden line ! )
-    myView->SetDegenerateModeOn();
-    // store for restore state after rotation (witch is in Degenerated mode)
-    myDegenerateModeIsOn = Standard_True;
-
-    Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ());
-    myView->SetWindow(aWNTWindow);
-    if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
-
-//     Standard_Integer w=100 , h=100 ;   /* Debug Matrox                         */
-//     aWNTWindow->Size (w,h) ;           /* Keeps me unsatisfied (rlb).....      */
-                                          /* Resize is not supposed to be done on */
-                                          /* Matrox                               */
-                                          /* I suspect another problem elsewhere  */
-//     ::PostMessage ( GetSafeHwnd () , WM_SIZE , SIZE_RESTORED , w + h*65536 ) ;
-
-    // store the mode ( nothing , dynamic zooming, dynamic ... )
-    myCurrentMode = CurAction3d_Nothing;
-       myVisMode = VIS_SHADE;
-       RedrawVisMode();
+  CView::OnInitialUpdate();
+
+  myView = GetDocument()->GetViewer()->CreateView();
+
+  // store for restore state after rotation (witch is in Degenerated mode)
+  myHlrModeIsOn = Standard_False;
+  myView->SetComputedMode (myHlrModeIsOn);
+
+  Handle(WNT_Window) aWNTWindow = new WNT_Window (GetSafeHwnd());
+  myView->SetWindow(aWNTWindow);
+  if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
+
+  //   Standard_Integer w=100 , h=100 ;   /* Debug Matrox                         */
+  //   aWNTWindow->Size (w,h) ;           /* Keeps me unsatisfied (rlb).....      */
+                                         /* Resize is not supposed to be done on */
+                                         /* Matrox                               */
+                                         /* I suspect another problem elsewhere  */
+  //   ::PostMessage ( GetSafeHwnd () , WM_SIZE , SIZE_RESTORED , w + h*65536 ) ;
+
+  // store the mode ( nothing , dynamic zooming, dynamic ... )
+  myCurrentMode = CurAction3d_Nothing;
+  myVisMode = VIS_SHADE;
+  RedrawVisMode();
 }
 
 void CViewer3dView::OnDraw(CDC* pDC)
@@ -325,30 +317,28 @@ GetDocument()->UpdateResultMessageDlg("SetProj",Message);
 
 void CViewer3dView::OnBUTTONHlrOff() 
 {
-  myView->SetDegenerateModeOn();
-  myDegenerateModeIsOn = Standard_True;
+  myHlrModeIsOn = Standard_False;
+  myView->SetComputedMode (myHlrModeIsOn);
 
-TCollection_AsciiString Message("\
-myView->SetDegenerateModeOn();\n\
-  ");
+  TCollection_AsciiString aMsg ("myView->SetComputedMode (Standard_False);\n"
+                                "  ");
 
   // Update The Result Message Dialog
-GetDocument()->UpdateResultMessageDlg("SetDegenerateModeOn",Message);
+  GetDocument()->UpdateResultMessageDlg ("SetComputedMode", aMsg);
 }
 
 void CViewer3dView::OnBUTTONHlrOn() 
 {
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
-  myView->SetDegenerateModeOff();
-  myDegenerateModeIsOn = Standard_False;
+  myHlrModeIsOn = Standard_True;
+  myView->SetComputedMode (myHlrModeIsOn);
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
 
-TCollection_AsciiString Message("\
-myView->SetDegenerateModeOff();\n\
-  ");
+  TCollection_AsciiString aMsg ("myView->SetComputedMode (Standard_True);\n"
+                                "  ");
 
   // Update The Result Message Dialog
-GetDocument()->UpdateResultMessageDlg("SetDegenerateModeOff",Message);
+  GetDocument()->UpdateResultMessageDlg ("SetComputedMode", aMsg);
 }
 
 void CViewer3dView::OnBUTTONPan() 
@@ -414,10 +404,12 @@ void CViewer3dView::OnLButtonDown(UINT nFlags, CPoint point)
          case CurAction3d_GlobalPanning :// noting
         break;
         case  CurAction3d_DynamicRotation :
-                       if (!myDegenerateModeIsOn)
-                         myView->SetDegenerateModeOn();
-                       myView->StartRotation(point.x,point.y);  
-        break;
+          if (myHlrModeIsOn)
+          {
+            myView->SetComputedMode (Standard_False);
+          }
+          myView->StartRotation (point.x, point.y);
+          break;
         case  CurAction3d_BeginPositionalLight :
                        {
                        p1 = ConvertClickToPoint(point.x,point.y,myView);
@@ -573,7 +565,7 @@ void CViewer3dView::OnLButtonUp(UINT nFlags, CPoint point)
          }
          break;
          case CurAction3d_DynamicZooming :
-             // SetCursor(AfxGetApp()->LoadStandardCursor());         
+             // SetCursor(AfxGetApp()->LoadStandardCursor());
               myCurrentMode = CurAction3d_Nothing;
          break;
          case CurAction3d_WindowZooming :
@@ -607,7 +599,7 @@ void CViewer3dView::OnMButtonDown(UINT nFlags, CPoint point)
    if ( nFlags & MK_CONTROL ) 
          {
        // Button MB2 down Control : panning init  
-        // SetCursor(AfxGetApp()->LoadStandardCursor());   
+        // SetCursor(AfxGetApp()->LoadStandardCursor());
          }
 }
 
@@ -616,38 +608,32 @@ void CViewer3dView::OnMButtonUp(UINT nFlags, CPoint point)
    if ( nFlags & MK_CONTROL ) 
          {
        // Button MB2 down Control : panning init  
-        // SetCursor(AfxGetApp()->LoadStandardCursor());   
+        // SetCursor(AfxGetApp()->LoadStandardCursor());
          }
 }
 
 void CViewer3dView::OnRButtonDown(UINT nFlags, CPoint point) 
 {
-   if ( nFlags & MK_CONTROL ) 
-         {
-        // SetCursor(AfxGetApp()->LoadStandardCursor());   
-           if (!myDegenerateModeIsOn)
-             myView->SetDegenerateModeOn();
-             myView->StartRotation(point.x,point.y);  
-         }
-       else // if ( Ctrl )
-         {
-           GetDocument()->Popup(point.x,point.y,myView);
-      }        
+  if ( nFlags & MK_CONTROL )
+  {
+    // SetCursor(AfxGetApp()->LoadStandardCursor());
+    if (myHlrModeIsOn)
+    {
+      myView->SetComputedMode (Standard_False);
+    }
+    myView->StartRotation (point.x, point.y);
+  }
+  else // if ( Ctrl )
+  {
+    GetDocument()->Popup (point.x, point.y, myView);
+  }
 }
 
 void CViewer3dView::OnRButtonUp(UINT nFlags, CPoint point) 
 {
-    SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
-    if (!myDegenerateModeIsOn)
-    {  
-      myView->SetDegenerateModeOff();
-      myDegenerateModeIsOn = Standard_False;
-    } else
-    {
-      myView->SetDegenerateModeOn();
-      myDegenerateModeIsOn = Standard_True;
-    }
-    SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
+  SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
+  myView->SetComputedMode (myHlrModeIsOn);
+  SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
 }
 
 void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point) 
@@ -779,16 +765,16 @@ void CViewer3dView::OnMouseMove(UINT nFlags, CPoint point)
        }
 }
 
-void CViewer3dView::OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI) 
+void CViewer3dView::OnUpdateBUTTONHlrOff (CCmdUI* pCmdUI)
 {
-    pCmdUI->SetCheck (myDegenerateModeIsOn);
-       pCmdUI->Enable   (!myDegenerateModeIsOn);       
+  pCmdUI->SetCheck (!myHlrModeIsOn);
+  pCmdUI->Enable   (myHlrModeIsOn);
 }
 
-void CViewer3dView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) 
+void CViewer3dView::OnUpdateBUTTONHlrOn (CCmdUI* pCmdUI)
 {
-    pCmdUI->SetCheck (!myDegenerateModeIsOn);
-       pCmdUI->Enable   (myDegenerateModeIsOn);        
+  pCmdUI->SetCheck (myHlrModeIsOn);
+  pCmdUI->Enable   (!myHlrModeIsOn);
 }
 
 void CViewer3dView::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) 
index 27f037e..b1fce00 100755 (executable)
@@ -67,9 +67,9 @@ public:
        virtual void Dump(CDumpContext& dc) const;
 #endif
 
-       int scaleX;
-       int scaleY;
-    int scaleZ;
+  int scaleX;
+  int scaleY;
+  int scaleZ;
 
 protected:
 
@@ -125,28 +125,27 @@ protected:
        DECLARE_MESSAGE_MAP()
 private:
        enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR };
-       VisMode              myVisMode;
+       VisMode                        myVisMode;
        
-       Handle_V3d_View     myView;
-       Handle_Graphic3d_GraphicDriver myGraphicDriver;
-    View3D_CurrentAction myCurrentMode;
-    Standard_Integer     myXmin;
-    Standard_Integer     myYmin;  
-    Standard_Integer     myXmax;
-    Standard_Integer    myYmax;
-       Standard_Integer myWidth;
-       Standard_Integer myHeight;
-
-
-    Standard_Integer     NbActiveLights;
-    Quantity_Factor      myCurZoom;
-    Standard_Boolean     myDegenerateModeIsOn;
-       Handle_V3d_AmbientLight  myCurrent_AmbientLight;
-       Handle_V3d_SpotLight     myCurrent_SpotLight;
-       Handle_V3d_PositionalLight       myCurrent_PositionalLight;
-       Handle_V3d_DirectionalLight      myCurrent_DirectionalLight;
-       Handle_V3d_Plane myPlane;
-    Handle_AIS_Shape myShape;
+  Handle_V3d_View                myView;
+  Handle_Graphic3d_GraphicDriver myGraphicDriver;
+  View3D_CurrentAction           myCurrentMode;
+  Standard_Integer               myXmin;
+  Standard_Integer               myYmin;
+  Standard_Integer               myXmax;
+  Standard_Integer               myYmax;
+  Standard_Integer               myWidth;
+  Standard_Integer               myHeight;
+
+  Standard_Integer               NbActiveLights;
+  Standard_Boolean               myHlrModeIsOn;
+  Quantity_Factor                myCurZoom;
+  Handle_V3d_AmbientLight        myCurrent_AmbientLight;
+  Handle_V3d_SpotLight           myCurrent_SpotLight;
+  Handle_V3d_PositionalLight     myCurrent_PositionalLight;
+  Handle_V3d_DirectionalLight    myCurrent_DirectionalLight;
+  Handle_V3d_Plane               myPlane;
+  Handle_AIS_Shape               myShape;
 
 private:
        enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
index 5df1266..f5487fb 100755 (executable)
Binary files a/samples/mfc/standard/08_HLR/res/HLR.APS and b/samples/mfc/standard/08_HLR/res/HLR.APS differ
index 8bd0010..0ece1ee 100755 (executable)
@@ -274,7 +274,7 @@ BEGIN
     CONTROL         "AXOVIEW",IDC_AxoView,"Button",BS_OWNERDRAW | WS_TABSTOP,201,40,13,14
     DEFPUSHBUTTON   "Get Shapes",ID_GetShape,105,22,57,14
     PUSHBUTTON      "Update 2D",ID_Update2D,165,22,50,14
-    CONTROL         "Degenerated Mode",IDC_DegeneratedMode,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,143,77,10
+    CONTROL         "HLR Mode",IDC_HlrModeIsOn,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,127,143,51,10
     PUSHBUTTON      "Close",IDOK,150,160,50,14
     EDITTEXT        IDC_EDIT_NBIsos,100,167,30,12,ES_AUTOHSCROLL
     GROUPBOX        "Hidden",IDC_STATIC,10,89,82,65
index 180e73f..87c1bda 100755 (executable)
@@ -1,5 +1,5 @@
 //{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
+// Microsoft Visual C++ generated include file.
 // Used by HLR.rc
 //
 #define ID_MENU_CASCADE_PROPERTIES      150
 #define IDC_STATIC_NbIsos               1520
 #define IDC_DrawHiddenLine              1521
 #define ID_Update2D                     1522
-#define IDC_DegeneratedMode             1523
+#define IDC_HlrModeIsOn                 1523
 #define IDC_TopView                     1529
 #define IDC_DUMMYBUTTON                 1530
 #define IDC_BottomView                  1531
 #define IDC_FrontView                   1535
 #define IDC_AxoView                     1536
 #define ID_BUTTON_HLRDialog             32795
+
 // Next default values for new objects
 // 
 #ifdef APSTUDIO_INVOKED
index 3a56089..e8aa0b9 100755 (executable)
@@ -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();
-
-               myActiveViewer = new V3d_Viewer(aGraphicDriver,(short *) "Visu3D");
-               myActiveViewer->SetDefaultLights();
-               myActiveViewer->SetLightOn();
-               myActiveView = myActiveViewer->CreateView();
+       if (!myDisplay)
+  {
+    Handle(Graphic3d_GraphicDriver) aGraphicDriver = ((CHLRApp*)AfxGetApp())->GetGraphicDriver();
 
-               Handle(WNT_Window) aWNTWindow = new WNT_Window(GetDlgItem(IDC_DUMMYBUTTON)->GetSafeHwnd(),
-                                                                         Quantity_NOC_GRAY);
+    myActiveViewer = new V3d_Viewer(aGraphicDriver,(short *) "Visu3D");
+    myActiveViewer->SetDefaultLights();
+    myActiveViewer->SetLightOn();
+    myActiveView = myActiveViewer->CreateView();
 
-         if (m_DegeneratedModeOn) myActiveView->SetDegenerateModeOn();
-                 myActiveView->SetWindow(aWNTWindow);
+    Handle(WNT_Window) aWNTWindow = new WNT_Window (GetDlgItem(IDC_DUMMYBUTTON)->GetSafeHwnd(),
+                                                    Quantity_NOC_GRAY);
+    myActiveView->SetComputedMode (m_HlrModeIsOn);
+    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))
+  if ((myPosMinX > point.x) || (myPosMaxX < point.x) ||
+      (myPosMinY > point.y) || (myPosMaxY < point.y))
+  {
     return;
+  }
 
-  if ( nFlags & CASCADESHORTCUTKEY ) 
+  if ( nFlags & CASCADESHORTCUTKEY )
   {
-    if (!m_DegeneratedModeOn)
-      myActiveView->SetDegenerateModeOn();
-    myActiveView->StartRotation(point.x,point.y);  
-    OnDisplay(false);
+    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));
 }
index a618541..7fe613c 100755 (executable)
@@ -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()
index 42d1591..d9b1e4a 100755 (executable)
@@ -83,28 +83,18 @@ END_MESSAGE_MAP()
 // CAnimationView3D construction/destruction
 
 CAnimationView3D::CAnimationView3D()
+: myXmin (0),
+  myYmin (0),
+  myXmax (0),
+  myYmax (0),
+  myCurZoom (0.0),
+  myHlrModeIsOn (Standard_False),
+  myCurrentMode  (CurrentAction3d_Nothing),
+  m_FlySens  (500.0),
+  m_TurnSens (M_PI / 40.0),
+  m_Pen (NULL)
 {
-       // TODO: add construction code here
-
-    myXmin=0;
-    myYmin=0;  
-    myXmax=0;
-    myYmax=0;
-    myCurZoom=0;
-    // will be set in OnInitial update, but, for more security :
-    myCurrentMode = CurrentAction3d_Nothing;
-    myDegenerateModeIsOn=Standard_True;
-    m_Pen = NULL;
-
-       myXmin=0;
-    myYmin=0;  
-    myXmax=0;
-    myYmax=0;
-    myCurZoom=0;
-
-    // will be set in OnInitial update, but, for more security :
-       m_FlySens = 500. ;
-       m_TurnSens = M_PI / 40. ;
+  // TODO: add construction code here
 }
 
 CAnimationView3D::~CAnimationView3D()
@@ -136,61 +126,60 @@ void CAnimationView3D::OnDraw(CDC* pDC)
 }
 void CAnimationView3D::OnInitialUpdate() 
 {
-       CView::OnInitialUpdate();
+  CView::OnInitialUpdate();
 
-       // TODO: Add your specialized code here and/or call the base class
-           // TODO: Add your specialized code here and/or call the base class
-//     myView = GetDocument()->GetViewer()->CreateView();
+  // TODO: Add your specialized code here and/or call the base class
+  //   myView = GetDocument()->GetViewer()->CreateView();
 
-       Handle(V3d_Viewer) aViewer ;
-       
-    aViewer = GetDocument()->GetViewer() ;
-       aViewer->DefaultPerspectiveView () ;
-       aViewer->SetDefaultTypeOfView ( V3d_PERSPECTIVE ) ;
-    myView = aViewer->CreateView();
+  Handle(V3d_Viewer) aViewer;
 
-    // store for restore state after rotation (witch is in Degenerated mode)
-    myDegenerateModeIsOn = myView->DegenerateModeIsOn();
+  aViewer = GetDocument()->GetViewer();
+  aViewer->DefaultPerspectiveView();
+  aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE);
+  myView = aViewer->CreateView();
 
-    Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ());
-    myView->SetWindow(aWNTWindow);
-    if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
+  // store for restore state after rotation (witch is in Degenerated mode)
+  myHlrModeIsOn = myView->ComputedMode();
 
-    // store the mode ( nothing , dynamic zooming, dynamic ... )
-    myCurrentMode = CurrentAction3d_Nothing;
-       CFrameWnd* pParentFrm = GetParentFrame();
-       pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED);
+  Handle(WNT_Window) aWNTWindow = new WNT_Window (GetSafeHwnd());
+  myView->SetWindow(aWNTWindow);
+  if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
 
-       Standard_Integer w=100 , h=100 ;   /* Debug Matrox                         */
-       aWNTWindow->Size (w,h) ;           /* Keeps me unsatisfied (rlb).....      */
-                                          /* Resize is not supposed to be done on */
-                                          /* Matrox                               */
-                                          /* I suspect another problem elsewhere  */
-       ::PostMessage ( GetSafeHwnd () , WM_SIZE , SIZE_RESTORED , w + h*65536 ) ;
+  // store the mode ( nothing , dynamic zooming, dynamic ... )
+  myCurrentMode = CurrentAction3d_Nothing;
+  CFrameWnd* pParentFrm = GetParentFrame();
+  pParentFrm->ActivateFrame(SW_SHOWMAXIMIZED);
 
-       myPView = Handle(V3d_PerspectiveView)::DownCast (myView);
+  Standard_Integer w=100 , h=100 ;   /* Debug Matrox                         */
+  aWNTWindow->Size (w,h) ;           /* Keeps me unsatisfied (rlb).....      */
+                                   /* Resize is not supposed to be done on */
+                                   /* Matrox                               */
+                                   /* I suspect another problem elsewhere  */
+  ::PostMessage ( GetSafeHwnd () , WM_SIZE , SIZE_RESTORED , w + h*65536 ) ;
 
-       m_Tune.Create ( IDD_TUNE , NULL ) ;
-       
-       RECT dlgrect;
-       m_Tune.GetWindowRect(&dlgrect);
-       LONG width = dlgrect.right-dlgrect.left;
-       LONG height = dlgrect.bottom-dlgrect.top;
-       RECT MainWndRect;
-       AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect);
-       LONG left = MainWndRect.left+3;
-       LONG top = MainWndRect.top + 112;
-       m_Tune.MoveWindow(left,top,width,height);
-       
-       m_Tune.m_pView = this ;
+  myPView = Handle(V3d_PerspectiveView)::DownCast (myView);
+
+  m_Tune.Create ( IDD_TUNE , NULL ) ;
+
+  RECT dlgrect;
+  m_Tune.GetWindowRect(&dlgrect);
+  LONG width = dlgrect.right-dlgrect.left;
+  LONG height = dlgrect.bottom-dlgrect.top;
+  RECT MainWndRect;
+  AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect);
+  LONG left = MainWndRect.left+3;
+  LONG top = MainWndRect.top + 112;
+  m_Tune.MoveWindow(left,top,width,height);
 
-       m_Tune.ShowWindow ( SW_HIDE );
+  m_Tune.m_pView = this ;
 
-    // store the mode ( nothing , dynamic zooming, dynamic ... )
+  m_Tune.ShowWindow ( SW_HIDE );
 
-    myCurrentMode = CurrentAction3d_Nothing;
+  // store the mode ( nothing , dynamic zooming, dynamic ... )
 
-       ReloadData () ;
+  myCurrentMode = CurrentAction3d_Nothing;
+
+  ReloadData () ;
 
 }
 
@@ -285,15 +274,15 @@ void CAnimationView3D::OnBUTTONAxo()
 
 void CAnimationView3D::OnBUTTONHlrOff() 
 {
-  myView->SetDegenerateModeOn();
-  myDegenerateModeIsOn = Standard_True;
+  myHlrModeIsOn = Standard_False;
+  myView->SetComputedMode (myHlrModeIsOn);
 }
 
 void CAnimationView3D::OnBUTTONHlrOn() 
 {
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
-  myView->SetDegenerateModeOff();
-  myDegenerateModeIsOn = Standard_False;
+  myHlrModeIsOn = Standard_True;
+  myView->SetComputedMode (myHlrModeIsOn);
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
 }
 
@@ -373,9 +362,11 @@ void CAnimationView3D::OnLButtonDown(UINT nFlags, CPoint point)
          case CurrentAction3d_GlobalPanning :// noting
         break;
         case  CurrentAction3d_DynamicRotation :
-                       if (!myDegenerateModeIsOn)
-                         myView->SetDegenerateModeOn();
-                       myView->StartRotation(point.x,point.y);  
+          if (myHlrModeIsOn)
+          {
+            myView->SetComputedMode (Standard_False);
+          }
+          myView->StartRotation (point.x, point.y);
         break;
                case  CurrentAction3d_Fly :
                        KillTimer (1) ;
@@ -479,31 +470,25 @@ void CAnimationView3D::OnMButtonUp(UINT nFlags, CPoint point)
 
 void CAnimationView3D::OnRButtonDown(UINT nFlags, CPoint point) 
 {
-   if ( nFlags & MK_CONTROL ) 
-         {
-        // SetCursor(AfxGetApp()->LoadStandardCursor());   
-           if (!myDegenerateModeIsOn)
-             myView->SetDegenerateModeOn();
-             myView->StartRotation(point.x,point.y);  
-         }
-       else // if ( Ctrl )
-         {
-           GetDocument()->Popup(point.x,point.y,myView);
-      }        
+  if ( nFlags & MK_CONTROL )
+  {
+    // SetCursor(AfxGetApp()->LoadStandardCursor());
+    if (myHlrModeIsOn)
+    {
+      myView->SetComputedMode (Standard_False);
+    }
+    myView->StartRotation (point.x, point.y);
+  }
+  else // if ( Ctrl )
+  {
+    GetDocument()->Popup(point.x,point.y,myView);
+  }
 }
 
 void CAnimationView3D::OnRButtonUp(UINT nFlags, CPoint point) 
 {
     SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
-    if (!myDegenerateModeIsOn)
-    {  
-      myView->SetDegenerateModeOff();
-      myDegenerateModeIsOn = Standard_False;
-    } else
-    {
-      myView->SetDegenerateModeOn();
-      myDegenerateModeIsOn = Standard_True;
-    }
+    myView->SetComputedMode (myHlrModeIsOn);
     SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
 }
 
@@ -598,14 +583,14 @@ void CAnimationView3D::OnMouseMove(UINT nFlags, CPoint point)
 
 void CAnimationView3D::OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI) 
 {
-    pCmdUI->SetCheck (myDegenerateModeIsOn);
-       pCmdUI->Enable   (!myDegenerateModeIsOn);       
+  pCmdUI->SetCheck (!myHlrModeIsOn);
+  pCmdUI->Enable   (myHlrModeIsOn);
 }
 
 void CAnimationView3D::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) 
 {
-    pCmdUI->SetCheck (!myDegenerateModeIsOn);
-       pCmdUI->Enable   (myDegenerateModeIsOn);        
+  pCmdUI->SetCheck (myHlrModeIsOn);
+  pCmdUI->Enable   (!myHlrModeIsOn);
 }
 
 void CAnimationView3D::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) 
index 0fdf284..c965502 100755 (executable)
@@ -131,22 +131,21 @@ public:
        Handle_V3d_View&    GetView() { return myView;};
        void                DisplayTuneDialog();
 private:
-//    CurrentAction3d      myCurrentMode;
-    Standard_Integer     myXmin;
-    Standard_Integer     myYmin;  
-    Standard_Integer     myXmax;
-    Standard_Integer     myYmax;
-    Quantity_Factor      myCurZoom;
-    Standard_Boolean     myDegenerateModeIsOn;
-
-       Handle_V3d_PerspectiveView myPView;
-
-    View3D_CurrentAction myCurrentMode;
-    double               m_Atx  , m_Aty  , m_Atz  ;
-       double               m_Eyex , m_Eyey , m_Eyez ;
-       double               m_FlySens ;
-       double               m_TurnSens ;
-       double               m_Focus ;
+  Standard_Integer     myXmin;
+  Standard_Integer     myYmin;
+  Standard_Integer     myXmax;
+  Standard_Integer     myYmax;
+  Quantity_Factor      myCurZoom;
+  Standard_Boolean     myHlrModeIsOn;
+
+  Handle_V3d_PerspectiveView myPView;
+
+  View3D_CurrentAction myCurrentMode;
+  double               m_Atx  , m_Aty  , m_Atz  ;
+  double               m_Eyex , m_Eyey , m_Eyez ;
+  double               m_FlySens ;
+  double               m_TurnSens ;
+  double               m_Focus ;
 
 private:
        enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
index 2a68322..d50b687 100755 (executable)
@@ -57,19 +57,18 @@ END_MESSAGE_MAP()
 // OCC_3dView construction/destruction
 
 OCC_3dView::OCC_3dView()
+: myCurrentMode (CurAction3d_Nothing),
+  myXmin (0),
+  myYmin (0),
+  myXmax (0),
+  myYmax (0),
+  myCurZoom (0.0),
+  myWidth  (0),
+  myHeight (0),
+  myHlrModeIsOn (Standard_False),
+  m_Pen (NULL)
 {
   // TODO: add construction code here
-  myXmin=0;
-  myYmin=0;  
-  myXmax=0;
-  myYmax=0;
-  myCurZoom=0;
-  myWidth=0;
-  myHeight=0;
-  // will be set in OnInitial update, but, for more security :
-  myCurrentMode = CurAction3d_Nothing;
-  myDegenerateModeIsOn=Standard_True;
-  m_Pen = NULL;
 }
 
 OCC_3dView::~OCC_3dView()
@@ -94,11 +93,9 @@ void OCC_3dView::OnInitialUpdate()
 
   myView = GetDocument()->GetViewer()->CreateView();
 
-  // set the default mode in wireframe ( not hidden line ! )
-  myView->SetDegenerateModeOn();
   // store for restore state after rotation (which is in Degenerated mode)
-  myDegenerateModeIsOn = Standard_True;
-
+  myHlrModeIsOn = Standard_False;
+  myView->SetComputedMode (myHlrModeIsOn);
 
   Handle(Graphic3d_GraphicDriver) aGraphicDriver = 
     ((OCC_App*)AfxGetApp())->GetGraphicDriver();
@@ -229,15 +226,15 @@ void OCC_3dView::OnBUTTONAxo()
 
 void OCC_3dView::OnBUTTONHlrOff() 
 {
-  myView->SetDegenerateModeOn();
-  myDegenerateModeIsOn = Standard_True;
+  myHlrModeIsOn = Standard_False;
+  myView->SetComputedMode (myHlrModeIsOn);
 }
 
 void OCC_3dView::OnBUTTONHlrOn() 
 {
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
-  myView->SetDegenerateModeOff();
-  myDegenerateModeIsOn = Standard_False;
+  myHlrModeIsOn = Standard_True;
+  myView->SetComputedMode (myHlrModeIsOn);
   SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
 }
 
@@ -309,8 +306,11 @@ void OCC_3dView::OnLButtonDown(UINT nFlags, CPoint point)
     case CurAction3d_GlobalPanning :// noting
       break;
     case  CurAction3d_DynamicRotation :
-      if (!myDegenerateModeIsOn)
-        myView->SetDegenerateModeOn();
+      if (myHlrModeIsOn)
+      {
+        myView->SetComputedMode (Standard_False);
+      }
+
       myView->StartRotation(point.x,point.y);  
       break;
     default :
@@ -373,16 +373,14 @@ void OCC_3dView::OnLButtonUp(UINT nFlags, CPoint point)
       break;
     case  CurAction3d_DynamicRotation :
       myCurrentMode = CurAction3d_Nothing;
-      if (!myDegenerateModeIsOn)
-      {  
+      if (myHlrModeIsOn)
+      {
         CWaitCursor aWaitCursor;
-        myView->SetDegenerateModeOff();
-        myDegenerateModeIsOn = Standard_False;
+        myView->SetComputedMode (myHlrModeIsOn);
       }
       else
       {
-        myView->SetDegenerateModeOn();
-        myDegenerateModeIsOn = Standard_True;
+        myView->SetComputedMode (myHlrModeIsOn);
       }
       break;
     default :
@@ -412,10 +410,12 @@ void OCC_3dView::OnMButtonUp(UINT nFlags, CPoint point)
 
 void OCC_3dView::OnRButtonDown(UINT nFlags, CPoint point) 
 {
-  if ( nFlags & MK_CONTROL ) 
-  { 
-    if (!myDegenerateModeIsOn)
-      myView->SetDegenerateModeOn();
+  if ( nFlags & MK_CONTROL )
+  {
+    if (myHlrModeIsOn)
+    {
+      myView->SetComputedMode (Standard_False);
+    }
     myView->StartRotation(point.x,point.y);  
   }
   else // if ( Ctrl )
@@ -427,15 +427,7 @@ void OCC_3dView::OnRButtonDown(UINT nFlags, CPoint point)
 void OCC_3dView::OnRButtonUp(UINT nFlags, CPoint point) 
 {
     SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
-    if (!myDegenerateModeIsOn)
-    {  
-      myView->SetDegenerateModeOff();
-      myDegenerateModeIsOn = Standard_False;
-    } else
-    {
-      myView->SetDegenerateModeOn();
-      myDegenerateModeIsOn = Standard_True;
-    }
+    myView->SetComputedMode (myHlrModeIsOn);
     SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
 }
 
@@ -574,14 +566,14 @@ void OCC_3dView::DrawRectangle(const Standard_Integer  MinX    ,
 
 void OCC_3dView::OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI) 
 {
-    pCmdUI->SetCheck (myDegenerateModeIsOn);
-       pCmdUI->Enable   (!myDegenerateModeIsOn);       
+  pCmdUI->SetCheck (!myHlrModeIsOn);
+  pCmdUI->Enable   (myHlrModeIsOn);
 }
 
-void OCC_3dView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI) 
+void OCC_3dView::OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI)
 {
-    pCmdUI->SetCheck (!myDegenerateModeIsOn);
-       pCmdUI->Enable   (myDegenerateModeIsOn);        
+  pCmdUI->SetCheck (myHlrModeIsOn);
+  pCmdUI->Enable   (!myHlrModeIsOn);
 }
 
 void OCC_3dView::OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI) 
index 2153fb0..0e76294 100755 (executable)
@@ -39,7 +39,7 @@ public:
 // Overrides
        // ClassWizard generated virtual function overrides
        //{{AFX_VIRTUAL(OCC_3dView)
-       public:
+public:
        virtual void OnDraw(CDC* pDC);  // overridden to draw this view
        virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
        virtual void OnInitialUpdate();
@@ -90,16 +90,17 @@ protected:
 #endif
 
 protected:
-       Handle_V3d_View          myView;
-    CurAction3d                         myCurrentMode;
-    Standard_Integer     myXmin;
-    Standard_Integer     myYmin;  
-    Standard_Integer     myXmax;
-    Standard_Integer     myYmax;
-    Quantity_Factor      myCurZoom;
-    Standard_Boolean     myDegenerateModeIsOn;
-       Standard_Integer         myWidth;
-       Standard_Integer         myHeight;
+
+  Handle_V3d_View  myView;
+  CurAction3d      myCurrentMode;
+  Standard_Integer myXmin;
+  Standard_Integer myYmin;
+  Standard_Integer myXmax;
+  Standard_Integer myYmax;
+  Quantity_Factor  myCurZoom;
+  Standard_Integer myWidth;
+  Standard_Integer myHeight;
+  Standard_Boolean myHlrModeIsOn;
 
        enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
        CPen*  m_Pen;
index caf82c5..86bc793 100755 (executable)
@@ -60,7 +60,7 @@ DocumentCommon* MDIWindow::getDocument()
        return myDocument;
 }
 
-void MDIWindow::closeEvent(QCloseEvent* e)
+void MDIWindow::closeEvent(QCloseEvent* )
 {
        emit sendCloseView(this);
 }
index e707cd3..67ef5b3 100755 (executable)
@@ -144,7 +144,7 @@ myViewActions( 0 )
     }
 #endif
     myCurrentMode = CurAction3d_Nothing;
-    myDegenerateModeIsOn = Standard_True;
+    myHlrModeIsOn = Standard_False;
     setMouseTracking( true );
 
     initViewActions();
@@ -186,7 +186,7 @@ void View::init()
   myView->MustBeResized();
 }
 
-void View::paintEvent( QPaintEvent * e )
+void View::paintEvent( QPaintEvent *  )
 {
 //  QApplication::syncX();
     if( myFirst )
@@ -197,7 +197,7 @@ void View::paintEvent( QPaintEvent * e )
     myView->Redraw();
 }
 
-void View::resizeEvent( QResizeEvent * e)
+void View::resizeEvent( QResizeEvent * )
 {
 //  QApplication::syncX();
     if( !myView.IsNull() )
@@ -286,16 +286,16 @@ void View::reset()
 void View::hlrOff()
 {
     QApplication::setOverrideCursor( Qt::WaitCursor );
-    myView->SetDegenerateModeOn();
-    myDegenerateModeIsOn = Standard_True;
+    myHlrModeIsOn = Standard_False;
+    myView->SetComputedMode (myHlrModeIsOn);
     QApplication::restoreOverrideCursor();
 }
 
 void View::hlrOn()
 {
     QApplication::setOverrideCursor( Qt::WaitCursor );
-    myView->SetDegenerateModeOff();
-    myDegenerateModeIsOn = Standard_False;
+    myHlrModeIsOn = Standard_True;
+    myView->SetComputedMode (myHlrModeIsOn);
     QApplication::restoreOverrideCursor();
 }
 
@@ -580,8 +580,10 @@ void View::onLButtonDown( const int/*Qt::MouseButtons*/ nFlags, const QPoint poi
       case CurAction3d_GlobalPanning:
            break;
       case CurAction3d_DynamicRotation:
-           if ( !myDegenerateModeIsOn )
-                  myView->SetDegenerateModeOn();
+           if (myHlrModeIsOn)
+           {
+                  myView->SetComputedMode (Standard_False);
+           }
            myView->StartRotation( point.x(), point.y() );
            break;
       default:
@@ -592,7 +594,7 @@ void View::onLButtonDown( const int/*Qt::MouseButtons*/ nFlags, const QPoint poi
   activateCursor( myCurrentMode );
 }
 
-void View::onMButtonDown( const int/*Qt::MouseButtons*/ nFlags, const QPoint point )
+void View::onMButtonDown( const int/*Qt::MouseButtons*/ nFlags, const QPoint /*point*/ )
 {
   if ( nFlags & CASCADESHORTCUTKEY )
     myCurrentMode = CurAction3d_DynamicPanning;
@@ -603,8 +605,10 @@ void View::onRButtonDown( const int/*Qt::MouseButtons*/ nFlags, const QPoint poi
 {
   if ( nFlags & CASCADESHORTCUTKEY )
   {
-    if ( !myDegenerateModeIsOn )
-      myView->SetDegenerateModeOn();
+    if (myHlrModeIsOn)
+    {
+      myView->SetComputedMode (Standard_False);
+    }
     myCurrentMode = CurAction3d_DynamicRotation;
     myView->StartRotation( point.x(), point.y() );
   }
@@ -676,13 +680,13 @@ void View::onLButtonUp( Qt::MouseButtons nFlags, const QPoint point )
     ApplicationCommonWindow::getApplication()->onSelectionChanged();
 }
 
-void View::onMButtonUp( Qt::MouseButtons nFlags, const QPoint point )
+void View::onMButtonUp( Qt::MouseButtons /*nFlags*/, const QPoint /*point*/ )
 {
     myCurrentMode = CurAction3d_Nothing;
     activateCursor( myCurrentMode );
 }
 
-void View::onRButtonUp( Qt::MouseButtons nFlags, const QPoint point )
+void View::onRButtonUp( Qt::MouseButtons /*nFlags*/, const QPoint point )
 {
     if ( myCurrentMode == CurAction3d_Nothing )
         Popup( point.x(), point.y() );
@@ -691,16 +695,7 @@ void View::onRButtonUp( Qt::MouseButtons nFlags, const QPoint point )
         QApplication::setOverrideCursor( Qt::WaitCursor );
         // reset tyhe good Degenerated mode according to the strored one
         //   --> dynamic rotation may have change it
-        if ( !myDegenerateModeIsOn )
-        {
-            myView->SetDegenerateModeOff();
-            myDegenerateModeIsOn = Standard_False;
-        }
-        else
-        {
-            myView->SetDegenerateModeOn();
-            myDegenerateModeIsOn = Standard_True;
-        }
+        myView->SetComputedMode (myHlrModeIsOn);
         QApplication::restoreOverrideCursor();
         myCurrentMode = CurAction3d_Nothing;
     }
@@ -783,7 +778,7 @@ void View::DragEvent( const int x, const int y, const int TheState )
     }
 }
 
-void View::InputEvent( const int x, const int y )
+void View::InputEvent( const int /*x*/, const int /*y*/ )
 {
   myContext->Select();
   emit selectionChanged();
@@ -816,13 +811,13 @@ void View::MultiDragEvent( const int x, const int y, const int TheState )
     }
 }
 
-void View::MultiInputEvent( const int x, const int y )
+void View::MultiInputEvent( const int /*x*/, const int /*y*/ )
 {
   myContext->ShiftSelect();
   emit selectionChanged();
 }
 
-void View::Popup( const int x, const int y )
+void View::Popup( const int /*x*/, const int /*y*/ )
 {
   ApplicationCommonWindow* stApp = ApplicationCommonWindow::getApplication();
   QWorkspace* ws = ApplicationCommonWindow::getWorkspace();
@@ -865,7 +860,7 @@ void View::Popup( const int x, const int y )
     w->setFocus();
 }
 
-void View::addItemInPopup( QMenu* theMenu)
+void View::addItemInPopup( QMenu* /*theMenu*/)
 {
 }
 
index 3d097b0..50c4a7c 100755 (executable)
@@ -117,7 +117,7 @@ private:
     Standard_Integer                myXmax;
     Standard_Integer                myYmax;
     Quantity_Factor                 myCurZoom;
-    Standard_Boolean                myDegenerateModeIsOn;
+    Standard_Boolean                myHlrModeIsOn;
     QList<QAction*>*                myViewActions;
     QRubberBand*                    myRectBand; //!< selection rectangle rubber band
 };
index 5dbf80b..8ed0021 100755 (executable)
@@ -25,8 +25,6 @@
 --   GG  :  GER61351 17/11/1999 Change SetColor() with a compatible i
 --         Quantity_Color instead the restricted NameOfColor.
 --          Add SetCurrentFacingModel() methods
---   EUG :  G003 05/11/1999 Degeneration mode support
---              Add SetDegenerateModel() methods
 --   GG  : IMP140200 Add SetSelectedAspect() method
 --   GG  : 25/05/00 BUC60688 Add SetSensitivity() methods 
 --   VSV : 22/05/01 Add Selection by polygon
@@ -143,7 +141,6 @@ uses
     Location              from TopLoc,
     EntityOwner           from SelectMgr,
     TypeOfFacingModel    from Aspect,
-    TypeOfDegenerateModel from Aspect,
     Array1OfPnt2d         from TColgp,
     Transformation       from Geom
 
@@ -702,33 +699,6 @@ is
 -- Standard_False, the presentation of the Interactive
 -- Object activates the selection mode; the object is
 -- displayed but no viewer will be updated.
-        
-    SetDegenerateModel ( me : mutable;
-               aniobj  : InteractiveObject from AIS;
-                aModel  : TypeOfDegenerateModel from Aspect =
-                                                Aspect_TDM_WIREFRAME;
-                aRatio : Ratio from Quantity = 0.0);
-    ---Level: Public
-    ---Purpose: Sets the model of degeneration for the shaded representation
-    --   of the object <aniobj>
-    --   according to the degenerate ratio >= 0. & <= 1. where :
-    --   <aRatio> = 0. indicate that all polygons of the object
-    --      will be displayed.
-    --   <aRatio> = 1. indicate that no polygons will be displayed !!
-    --   When <ARatio> is > 0 & < 1. the corresponding amount
-    --   of object polygons will be displayed with a random method.
-    --  Warning: the degenerate structure is shown only when
-    -- the animation and degenerate flags are set to TRUE
-    -- in V3d_View::SetAnimationMode(..)
-    ---Category: Methods to manage the object degeneration
-
-    SetDegenerateModel (
-     me         : mutable;
-     aModel     : TypeOfDegenerateModel from Aspect;
-     aSkipRatio : Ratio                 from Quantity = 0.0
-    ) is static;
-    ---Purpose: Defines the degenerate method to apply on the shaded 
-    --  representation of all objects.
 
     SetLocalAttributes(me      : mutable; 
                       aniobj  : InteractiveObject from AIS;
index 9d8ce88..bd1620a 100755 (executable)
 #define BUC60577        //GG_101099     Enable to compute correctly
 //                      transparency with more than one object in the view.
 
-//GER61351        //GG_171199     Enable to set an object RGB color instead a restricted object NameOfColor.
-
-#define G003            //EUG_26/01/00 Degenerate support (G003)
-
-//IMP140200       //GG Add SetSelectedAspect() method.
-
 #define BUC60632        //GG 15/03/00 Add protection on SetDisplayMode()
 //                      method, compute only authorized presentation.
 
@@ -2495,45 +2489,6 @@ void AIS_InteractiveContext::UnsetTransparency(const Handle(AIS_InteractiveObjec
     UpdateCurrentViewer();
 }
 
-//=======================================================================
-//function : SetDegenerateModel
-//purpose  : 
-//=======================================================================
-
-#ifdef G003
-void AIS_InteractiveContext :: SetDegenerateModel (
-                          const Handle( AIS_InteractiveObject )& anObject,
-                          const Aspect_TypeOfDegenerateModel   aModel,
-                          const Quantity_Ratio                 aRatio
-                               ) {
- if (  !anObject.IsNull ()  ) {
-  if (  !anObject -> HasInteractiveContext ()  ) 
-                                anObject -> SetContext ( this );
-  anObject->SetDegenerateModel(aModel,aRatio);
-
- }  // end if
-}  // end AIS_InteractiveContext :: SetDegenerateModel
-
-void AIS_InteractiveContext :: SetDegenerateModel (
-                           const Aspect_TypeOfDegenerateModel aModel,
-                           const Quantity_Ratio            aRatio
-                               ) {
-
- AIS_DataMapIteratorOfDataMapOfIOStatus it ( myObjects );
-
- while (  it.More ()  ) {
-
-  Handle( AIS_InteractiveObject ) obj = it.Key ();
-
-  obj->SetDegenerateModel(aModel,aRatio);
-
-  it.Next ();
-
- }  // end while
-
-}  // end AIS_InteractiveContext :: SetDegenerateModel
-#endif
-
 //=======================================================================
 //function : SetSelectedAspect
 //purpose  : 
index e1b98ad..335833c 100755 (executable)
@@ -21,8 +21,6 @@
 --   GG  :  GER61351 17/11/1999 Change SetColor() with a compatible 
 --              Quantity_Color instead the restricted NameOfColor.
 --          Add SetCurrentFacingModel() methods
---   EUG :  G003 05/11/1999 Degeneration mode support
---              Add SetDegenerateModel() methods
 --   GG :   IMP140100 Add HasPresentation() and Presentation() methods
 --                    Add SetAspect() method
 --   SAN :  OCC4895 22/03/04 High-level interface for controlling polygon offsets
@@ -73,7 +71,6 @@ uses
     InteractiveContext   from AIS,
     KindOfInteractive    from AIS,
     TypeOfFacingModel    from Aspect,
-    TypeOfDegenerateModel from Aspect,
     Transformation       from Geom,
     Presentation         from Prs3d,
     BasicAspect          from Prs3d,
@@ -532,31 +529,6 @@ is
     State(me) returns Integer from Standard ;
        ---C++: inline
 
-    SetDegenerateModel ( me : mutable;
-                aModel     : TypeOfDegenerateModel from Aspect =
-                                                Aspect_TDM_WIREFRAME;
-                aRatio : Ratio from Quantity = 0.0) is virtual;
-       ---Level: Public
-       ---Purpose: Sets the model of degeneration for the shaded representation 
-       --   according to the degenerate ratio >= 0. & <= 1. where :
-       --   <aRatio> = 0. indicate that all polygons of the object 
-       --      will be displayed.
-       --   <aRatio> = 1. indicate that no polygons will be displayed !!
-       --   When <ARatio> is > 0 & < 1. the corresponding amount
-       --   of object polygons will be displayed with a random method.
-       --  Warning: the degenerate structure is shown only when
-       --  the animation and degenerate flags are set to TRUE
-       --  in V3d_View::SetAnimationMode(..)
-       --  Category: Methods to manage the object degeneration
-
-    DegenerateModel ( me ;
-                aRatio: out Ratio from Quantity ) 
-        returns TypeOfDegenerateModel from Aspect is virtual;
-       ---Level: Public
-       ---Purpose: returns the current degeneration model and ratio 
-       --  for the polygons
-       ---Category: Inquire methods
-
     SetTransformation ( me : mutable;
                 aTranformation: Transformation from Geom;
                 postConcatenate: Boolean from Standard = Standard_False;
index 80438e0..e2b914b 100755 (executable)
@@ -28,9 +28,6 @@
 //                     instead a restricted object NameOfColor. 
 //                     Add SetCurrentFacingModel() method
 
-#define G003           //EUG/GG 260100 DEgenerate mode support
-//                     Add SetDegenerateModel() methods
-
 #define IMP020200      //GG Add SetTransformation() method
 
 #define IMP140200      //GG Add HasPresentation() and Presentation() methods
@@ -556,43 +553,6 @@ void AIS_InteractiveObject::SetInfiniteState(const Standard_Boolean aFlag)
       P->SetInfiniteState(myInfiniteState);}
 }
 
-#ifdef G003
-//=======================================================================
-//function : SetDegenerateModel
-//purpose  : 
-//=======================================================================
-void AIS_InteractiveObject::SetDegenerateModel(
-               const Aspect_TypeOfDegenerateModel aModel,
-               const Quantity_Ratio aRatio ) {
-  if( !HasColor() && !IsTransparent() && !HasMaterial() ) {
-    myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
-  }
-
-  myDrawer->ShadingAspect()->Aspect()->SetDegenerateModel(aModel,aRatio);
-
-  if(!GetContext().IsNull()){
-    if( GetContext()->MainPrsMgr()->HasPresentation(this,1)){
-      Handle(Prs3d_Presentation) P = 
-       GetContext()->MainPrsMgr()->CastPresentation(this,1)->Presentation();
-      Handle(Graphic3d_AspectFillArea3d) a4bis = 
-                               myDrawer->ShadingAspect()->Aspect();
-      P->SetPrimitivesAspect(a4bis);
-    }
-  }
-}
-
-//=======================================================================
-//function : DegenerateModel
-//purpose  : 
-//=======================================================================
-
-Aspect_TypeOfDegenerateModel AIS_InteractiveObject::DegenerateModel( 
-                       Quantity_Ratio& aRatio) const
-{
-  return myDrawer->ShadingAspect()->Aspect()->DegenerateModel(aRatio);
-}
-#endif
-
 #ifdef IMP020200
 //=======================================================================
 //function : SetTransformation
index 5907dd9..88342ed 100755 (executable)
@@ -52,8 +52,6 @@
 --   Add GDM_None in enum GridDrawMode.
 -- Modified: 25-JAN-00 : VKH
 --   Add class PixMap
--- Modified: 26-JAN-00 : EUG/GG G003
---   Add enum TypeOfDegenerateModel
 -- Modified: 23-FEB-00 : GG
 --   Returns format name in ValuesOfFOSP() internal method.
 -- Modified: 27-03-02 RIC120302 GG Add imported class 
@@ -791,18 +789,6 @@ is
                                          TOFM_FRONT_SIDE
         end TypeOfFacingModel;
 
-        enumeration TypeOfDegenerateModel is
-         TDM_NONE,
-         TDM_TINY,
-         TDM_WIREFRAME,
-         TDM_MARKER,
-         TDM_BBOX,
-         TDM_AUTO
-        end TypeOfDegenerateModel;
-        ---Purpose: Defines type of degeneration model of the
-        --          graphic structure.
-        ---Category: The enumerations
-
         enumeration FillMethod is
           FM_NONE,
           FM_CENTERED,
index 040aba5..fa18c37 100755 (executable)
 --              0312/99  ; GG : BUC60488 Why the field DistinguishModeActive
 --                      field is not accessible properly ?
 --                      workaround : Move the Material fields at end.
---              26/01/00 ; EUG/GG degeneration management (G003)
---                       Add SetDegenerateModel() and DegenerateModel() methods
---              29/09/00 ; GG degeneration management (G003)
---                       Add SetDefaultDegenerateModel() and DefaultDegenerateModel() methods
 --              22/03/04 ; OCC4895 SAN High-level interface for controlling polygon offsets
 
 class AspectFillArea3d from Graphic3d inherits AspectFillArea from Aspect
@@ -51,7 +47,6 @@ uses
 
         TypeOfLine      from Aspect,    
         InteriorStyle   from Aspect,
-        TypeOfDegenerateModel from Aspect, 
 
         MaterialAspect  from Graphic3d,
         TextureMap      from Graphic3d
@@ -170,36 +165,6 @@ is
         SetTextureMapOn(me  :  mutable);
         SetTextureMapOff(me :  mutable);
 
-        SetDefaultDegenerateModel ( myclass;
-                aModel     : TypeOfDegenerateModel from Aspect =
-                                                Aspect_TDM_WIREFRAME;
-                aRatio : Ratio from Quantity = 0.0);
-        ---Level: Public
-        ---Purpose: Sets the default model of degeneration for the polygons
-        --      which is taking in account at creation time of any
-        --      graphic structure until the model is change using
-        --      SetDegenerateModel() method.
-        ---Category: Methods to manage the structure degeneration
-
-        SetDegenerateModel ( me : mutable;
-                aModel     : TypeOfDegenerateModel from Aspect =
-                                                Aspect_TDM_WIREFRAME;
-                aRatio : Ratio from Quantity = 0.0);
-        ---Level: Public
-        ---Purpose: Sets the model of degeneration for the polygons
-        --   according to the degenerate ratio >= 0. & <= 1. where :
-        --   <aRatio> = 0. indicate that all polygons of the graphic structure
-        --      are displayed.
-        --   <aRatio> = 1. indicate that nothing is displayed in the graphic
-        --      structure.
-        --   When <ARatio> is > 0 & < 1. the corresponding amount
-        --   of polygons are displayed in the graphic structure with a
-        --   random method.     
-        --  Warning: the degenerate structure is shown only when
-        -- the animation and degenerate flags are set to TRUE
-        -- in V3d_View::SetAnimationMode(..)
-        ---Category: Methods to manage the structure degeneration
-        
         -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
         SetPolygonOffsets ( me : mutable;
                             aMode   : Integer from Standard;
@@ -272,22 +237,6 @@ is
         TextureMapState(me) 
             returns  Boolean  from  Standard;
 
-        DegenerateModel ( me ;
-                aRatio: out Ratio from Quantity )
-                returns TypeOfDegenerateModel from Aspect;
-        ---Level: Public
-        ---Purpose: returns the current degeneration model and ratio
-        --  for the polygons
-        ---Category: Inquire methods
-
-        DefaultDegenerateModel ( myclass ;
-                aRatio: out Ratio from Quantity )
-                returns TypeOfDegenerateModel from Aspect;
-        ---Level: Public
-        ---Purpose: returns the default degeneration model and ratio
-        --  for the polygons
-        ---Category: Inquire methods
-        
         -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
         PolygonOffsets ( me;
                          aMode   : out Integer from Standard;
@@ -298,7 +247,7 @@ is
         ---Category: Inquire methods    
         
         
---\f
+--
 
 fields
 
@@ -335,10 +284,6 @@ fields
         MyFrontMaterial         :       MaterialAspect from Graphic3d;
         MyBackMaterial          :       MaterialAspect from Graphic3d;
 
-        -- the degenate model
-        MyDegenerateModel       :       TypeOfDegenerateModel from Aspect;
-        MyDegenerateRatio       :       Ratio from Quantity;
-        
         -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
         -- polygon offsets
         MyPolygonOffsetMode     :       Integer from Standard;
index 2e959c3..b5ec053 100755 (executable)
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-// Modified     1/08/97 ; PCT : Ajout texture mapping
-//             26/01/00 ; EUG/GG degeneration management (G003)
-//                     Add SetDegenerateModel() and DegenerateModel() methods
-// JR 02.01.100 : Initialization order of fields in contructors
-//             29/09/00 ; GG Add SetDefaultDegerateModel() and
-//                     DefaultDegenerateModel() class methods
-//              22/03/04 ; SAN : OCC4895 High-level interface for controlling polygon offsets 
-
-
-//-Version     
-
 //-Design      Declaration of variables specific to the context
 //             of tracing of facets 3D
 
 //             Additionally, it has more than one definition of material
 //             for internal and external faces.
 
-//-References  
-
-//-Language    C++ 2.0
-
-//-Declarations
-
 // for the class
 #include <Graphic3d_AspectFillArea3d.ixx>
 
-// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
 #include <Aspect_PolygonOffsetMode.hxx>
-// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
-
 #include <Standard_Boolean.hxx>
 
-//-Aliases
-
-//-Global data definitions
-static Aspect_TypeOfDegenerateModel theDefaultDegenerateModel = Aspect_TDM_WIREFRAME;
-static Quantity_Ratio theDefaultDegenerateRatio = 0.0;
-
-//     -- la matiere
-//     MyFrontMaterial         :       MaterialAspect;
-//     MyBackMaterial          :       MaterialAspect;
-
-//     -- flag de distinction entre faces internes et externes
-//     DistinguishModeActive   :       Standard_Boolean;
-
-//     -- flag de trace des aretes
-//     EdgeModeActive          :       Standard_Boolean;
-
-//     -- flag d'affichage des polygones tournant le dos
-//     BackFaceRemovalActive   :       Standard_Boolean;
-
-//-Constructors
-
-//-Destructors
-
-//-Methods, in order
-
 Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d ():
-DistinguishModeActive (Standard_False), EdgeModeActive (Standard_False), BackFaceRemovalActive (Standard_False),  MyTextureMapState(Standard_False), MyFrontMaterial (), MyBackMaterial () {
-  MyDegenerateModel = theDefaultDegenerateModel;
-  MyDegenerateRatio = theDefaultDegenerateRatio;
-
-  // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
+DistinguishModeActive (Standard_False), EdgeModeActive (Standard_False), BackFaceRemovalActive (Standard_False),  MyTextureMapState(Standard_False), MyFrontMaterial (), MyBackMaterial ()
+{
   // By default, aspect do not change current polygon offset parameters
   MyPolygonOffsetMode   = Aspect_POM_Fill;
   MyPolygonOffsetFactor = 1.;
   MyPolygonOffsetUnits  = 0.;
-  // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
 }
 
 // (InteriorStyle, InteriorColor, EdgeColor, EdgeLineType, EdgeLineWidth)
@@ -99,15 +50,10 @@ DistinguishModeActive (Standard_False), EdgeModeActive (Standard_False), BackFac
 
 Graphic3d_AspectFillArea3d::Graphic3d_AspectFillArea3d (const Aspect_InteriorStyle InteriorStyle, const Quantity_Color& InteriorColor, const Quantity_Color& EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth, const Graphic3d_MaterialAspect& FrontMaterial, const Graphic3d_MaterialAspect& BackMaterial):
 Aspect_AspectFillArea (InteriorStyle, InteriorColor, EdgeColor, EdgeLineType, EdgeLineWidth), DistinguishModeActive (Standard_False), EdgeModeActive (Standard_False), BackFaceRemovalActive (Standard_False), MyTextureMap(), MyTextureMapState(Standard_False), MyFrontMaterial (FrontMaterial), MyBackMaterial (BackMaterial) {
-  MyDegenerateModel = theDefaultDegenerateModel;
-  MyDegenerateRatio = theDefaultDegenerateRatio;
-
-  // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
   // By default, aspect do not change current polygon offset parameters
   MyPolygonOffsetMode   = Aspect_POM_Fill;
   MyPolygonOffsetFactor = 1.;
   MyPolygonOffsetUnits  = 0.;
-  // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
 }
 
 void Graphic3d_AspectFillArea3d::SetBackMaterial (const Graphic3d_MaterialAspect& AMaterial) {
@@ -219,34 +165,6 @@ Standard_Boolean Graphic3d_AspectFillArea3d::TextureMapState() const
   return MyTextureMapState;
 }
 
-void Graphic3d_AspectFillArea3d::SetDefaultDegenerateModel(
-       const Aspect_TypeOfDegenerateModel aModel,
-       const Quantity_Ratio aRatio) {
-  theDefaultDegenerateModel = aModel;
-  theDefaultDegenerateRatio = aRatio;
-}
-
-void Graphic3d_AspectFillArea3d::SetDegenerateModel(
-       const Aspect_TypeOfDegenerateModel aModel,
-       const Quantity_Ratio aRatio) {
-
-  MyDegenerateModel = aModel;
-  MyDegenerateRatio = aRatio;
-}
-
-Aspect_TypeOfDegenerateModel Graphic3d_AspectFillArea3d::DefaultDegenerateModel(
-                       Quantity_Ratio& aRatio) {
-  aRatio = theDefaultDegenerateRatio;
-  return theDefaultDegenerateModel;
-}
-
-Aspect_TypeOfDegenerateModel Graphic3d_AspectFillArea3d::DegenerateModel(
-                       Quantity_Ratio& aRatio) const {
-  aRatio = MyDegenerateRatio;
-  return MyDegenerateModel;
-}
-
-// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
 void Graphic3d_AspectFillArea3d::SetPolygonOffsets(const Standard_Integer    aMode,
                                                    const Standard_ShortReal  aFactor,
                                                    const Standard_ShortReal  aUnits) {
@@ -262,4 +180,3 @@ void Graphic3d_AspectFillArea3d::PolygonOffsets(Standard_Integer&    aMode,
   aFactor = MyPolygonOffsetFactor;
   aUnits  = MyPolygonOffsetUnits;
 }
-// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
index 72afa44..7add19a 100755 (executable)
@@ -39,8 +39,6 @@ public:
     Distinguish (0),
     BackFace (0),
     Edge (0),
-    DegenerationMode (0),
-    SkipRatio (0.0f),
     PolygonOffsetMode   (0),
     PolygonOffsetFactor (0.0f),
     PolygonOffsetUnits  (0.0f)
@@ -76,9 +74,6 @@ public:
 
   Graphic3d_CTexture Texture;
 
-  int   DegenerationMode;
-  float SkipRatio;
-
   int   PolygonOffsetMode;
   float PolygonOffsetFactor;
   float PolygonOffsetUnits;
index 5a9d548..fc81011 100755 (executable)
@@ -93,8 +93,6 @@ public:
     Active (0),
     ptrUnderLayer (NULL),
     ptrOverLayer  (NULL),
-    IsDegenerates     (0),
-    IsDegeneratesPrev (0),
     Backfacing  (0),
     GDisplayCB  (NULL),
     GClientData (NULL),
@@ -127,8 +125,6 @@ public:
   void* ptrUnderLayer;
   void* ptrOverLayer;
 
-  int   IsDegenerates;
-  int   IsDegeneratesPrev;
   int   Backfacing;
 
   Aspect_RenderingContext    GContext;
index 2301f2b..5910f0e 100755 (executable)
@@ -423,11 +423,6 @@ is
         is deferred;
     ---Purpose: call_togl_transformstructure
 
-        DegenerateStructure ( me                        : mutable;
-                              ACStructure       : CStructure from Graphic3d )
-                is deferred;
-        ---Purpose: call_togl_degeneratestructure
-
     Transparency ( me       : mutable;
                    ACView   : CView from Graphic3d;
                    AFlag    : Boolean from Standard )
@@ -618,20 +613,6 @@ is
     ---Purpose: call_togl_graduatedtrihedron_minmaxvalues
     is deferred;
 
-    ---------------------------
-    -- Category: Animation mode
-    ---------------------------
-
-    BeginAnimation ( me : mutable;
-             ACView : CView from Graphic3d)
-        is deferred;
-    ---Purpose: call_togl_begin_animation
-
-    EndAnimation ( me   : mutable;
-               ACView   : CView from Graphic3d)
-        is deferred;
-    ---Purpose: call_togl_end_animation
-
     ----------------------------------
     -- Category: Ajout mode methods
     ----------------------------------
index ee0e341..831caad 100755 (executable)
@@ -53,8 +53,6 @@
 //      30/11/98 ; FMN : S4069. Textes always visible.
 //      22/03/04 ; SAN : OCC4895 High-level interface for controlling polygon offsets
 
-#define G003    //EUG 26/01/00 Degeneration management
-
 #define BUC60918        //GG 31/05/01 A transparente structure priority must have the
 //                      MAX_PRIORITY value so, the highlighted structure must have
 //                      MAX_PRIORITY-1 value.
@@ -984,13 +982,6 @@ Graphic3d_MATERIAL_PHYSIC : Graphic3d_MATERIAL_ASPECT;
   {
     CTXF->SetTextureMapOff();
   }
-#ifdef G003
-  Aspect_TypeOfDegenerateModel dMode = Aspect_TypeOfDegenerateModel(
-    MyCStructure.ContextFillArea.DegenerationMode);
-  Quantity_Ratio dRatio =
-    MyCStructure.ContextFillArea.SkipRatio;
-  CTXF->SetDegenerateModel(dMode,dRatio);
-#endif  // G003
 
   // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
   CTXF->SetPolygonOffsets(MyCStructure.ContextFillArea.PolygonOffsetMode,
@@ -1081,12 +1072,6 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectFill
   MyCStructure.ContextFillArea.LineType           = int (ALType);
   MyCStructure.ContextFillArea.Width              = float (AWidth);
   MyCStructure.ContextFillArea.Hatch              = int (CTX->HatchStyle ());
-#ifdef G003
-  Quantity_Ratio ratio;
-  MyCStructure.ContextFillArea.DegenerationMode =
-    int (CTX->DegenerateModel(ratio));
-  MyCStructure.ContextFillArea.SkipRatio = float (ratio);
-#endif  // G003
 
   /*** Front and Back face ***/
   MyCStructure.ContextFillArea.Distinguish        = CTX->Distinguish () ? 1:0;
@@ -1239,9 +1224,6 @@ void Graphic3d_Structure::SetPrimitivesAspect (const Handle(Graphic3d_AspectFill
   // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
 
   MyGraphicDriver->ContextStructure (MyCStructure);
-#ifdef G003
-  MyGraphicDriver -> DegenerateStructure (MyCStructure);
-#endif
 
   // CAL 14/04/95
   // Attributes are "IsSet" during the first update
@@ -2142,13 +2124,6 @@ void Graphic3d_Structure::UpdateStructure (const Handle(Graphic3d_AspectLine3d)&
   MyCStructure.ContextFillArea.LineType           = int (ALType);
   MyCStructure.ContextFillArea.Width              = float (AWidth);
   MyCStructure.ContextFillArea.Hatch              = int (CTXF->HatchStyle ());
-#ifdef G003
-  Quantity_Ratio ratio;
-  MyCStructure.ContextFillArea.DegenerationMode =
-    int (CTXF->DegenerateModel(ratio));
-  MyCStructure.ContextFillArea.SkipRatio = float (ratio);
-#endif  // G003
-
 
   /*** Front and Back face ***/
   MyCStructure.ContextFillArea.Distinguish = CTXF->Distinguish () ? 1:0;
index 000f871..f8890de 100755 (executable)
@@ -13,5 +13,4 @@ InterfaceGraphic_cPrintf.cxx
 InterfaceGraphic_Palette.c
 InterfaceGraphic_PrimitiveArray.hxx
 InterfaceGraphic_telem.hxx
-InterfaceGraphic_degeneration.hxx
 InterfaceGraphic_tgl_all.hxx
index 2f342eb..5ecc04b 100755 (executable)
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-/*
- * 24/01/00 EUG : G003 add Structure_LABDegenerateModel value
-*/
-
 #ifndef LABELS_HXX_INCLUDED
 #define LABELS_HXX_INCLUDED
 
@@ -56,9 +52,6 @@
 /* structure, hierarchy */
 #define Structure_LABConnect   33
 
-/* structure degenerate model */
-#define Structure_LABDegenerateModel 34
-
 /* view, index */
 #define View_LABViewIndex      10
 
index e8a690a..ee21df9 100755 (executable)
@@ -30,7 +30,6 @@ PARRAY and DARRAY primitives, used in OpenGl package for presentation
 */
 
 #include <InterfaceGraphic_telem.hxx>
-#include <InterfaceGraphic_degeneration.hxx>
 
 #define MVERTICE 1
 #define MVNORMAL 2
diff --git a/src/InterfaceGraphic/InterfaceGraphic_degeneration.hxx b/src/InterfaceGraphic/InterfaceGraphic_degeneration.hxx
deleted file mode 100755 (executable)
index 5fd88a6..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-#ifndef __INTERFACEGRAPHIC_DEGENERATION_H
-# define __INTERFACEGRAPHIC_DEGENERATION_H
-
-/*
-Created by EUG
-
-16/06/2000 : ATS : G005 : Copied from OpenGl to InterfaceGraphic to support required 
-for InterfaceGraphic_Parray.hxx definitions
-*/
-
-#include <InterfaceGraphic_telem.hxx>
-
-struct _degeneration 
-{
-  int   mode;
-  float skipRatio;
-  DEFINE_STANDARD_ALLOC
-};
-typedef _degeneration  DEGENERATION;
-typedef _degeneration* PDEGENERATION;
-
-struct _ds_internal 
-{
-
-  unsigned int        list;
-  unsigned int        dlist;
-  int                 degMode;
-  int                 model;
-  float               skipRatio;
-  unsigned char*      bDraw;
-  DEFINE_STANDARD_ALLOC
-};
-typedef _ds_internal  DS_INTERNAL;
-typedef _ds_internal* PDS_INTERNAL;
-
-#endif  /* __INTERFACEGRAPHIC_DEGENERATION_H */
index e6e91ca..216d2ec 100755 (executable)
@@ -43,7 +43,6 @@ OpenGl_PrimitiveArray.cxx
 Handle_OpenGl_Workspace.hxx
 OpenGl_Workspace.hxx
 OpenGl_Workspace.cxx
-OpenGl_Workspace_1.cxx
 OpenGl_Workspace_2.cxx
 OpenGl_Workspace_3.cxx
 OpenGl_Workspace_5.cxx
index f626dd2..71e1d30 100755 (executable)
@@ -94,19 +94,6 @@ Standard_ShortReal OpenGl_GraphicDriver::DefaultTextHeight() const
   return 16.;
 }
 
-// =======================================================================
-// function : InvalidateAllWorkspaces
-// purpose  : ex-TsmInitUpdateState, deprecated, need to decide what to do with EraseAnimation() call
-// =======================================================================
-void OpenGl_GraphicDriver::InvalidateAllWorkspaces()
-{
-  for (NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)>::Iterator anIt (myMapOfWS);
-       anIt.More(); anIt.Next())
-  {
-    anIt.ChangeValue()->EraseAnimation();
-  }
-}
-
 // =======================================================================
 // function : ToUseVBO
 // purpose  :
index 3cc0856..1b3de0a 100644 (file)
@@ -157,7 +157,6 @@ public:
   Standard_EXPORT void SetPlane (const Graphic3d_CView& ACView);
   Standard_EXPORT void SetVisualisation (const Graphic3d_CView& ACView);
   Standard_EXPORT void TransformStructure (const Graphic3d_CStructure& ACStructure);
-  Standard_EXPORT void DegenerateStructure (const Graphic3d_CStructure& ACStructure);
   Standard_EXPORT void Transparency (const Graphic3d_CView& ACView, const Standard_Boolean AFlag);
   Standard_EXPORT void Update (const Graphic3d_CView& ACView, const Aspect_CLayer2d& ACUnderLayer, const Aspect_CLayer2d& ACOverLayer);
   Standard_EXPORT Standard_Boolean View (Graphic3d_CView& ACView);
@@ -179,8 +178,6 @@ public:
   Standard_EXPORT void GraduatedTrihedronDisplay (const Graphic3d_CView& view, const Graphic3d_CGraduatedTrihedron& cubic);
   Standard_EXPORT void GraduatedTrihedronErase (const Graphic3d_CView& view);
   Standard_EXPORT void GraduatedTrihedronMinMaxValues (const Standard_ShortReal xmin, const Standard_ShortReal ymin, const Standard_ShortReal zmin, const Standard_ShortReal xmax, const Standard_ShortReal ymax, const Standard_ShortReal zmax);
-  Standard_EXPORT void BeginAnimation (const Graphic3d_CView& ACView);
-  Standard_EXPORT void EndAnimation (const Graphic3d_CView& ACView);
   Standard_EXPORT Standard_Boolean SetImmediateModeDrawToFront (const Graphic3d_CView& theCView,
                                                                 const Standard_Boolean theDrawToFrontBuffer);
   Standard_EXPORT Standard_Boolean BeginAddMode (const Graphic3d_CView& ACView);
@@ -326,9 +323,6 @@ private:
   //! Could return NULL-handle if no window created by this driver.
   Standard_EXPORT const Handle(OpenGl_Context)& GetSharedContext() const;
 
-  //! Deprecated.
-  void InvalidateAllWorkspaces();
-
 public:
 
   DEFINE_STANDARD_RTTI(OpenGl_GraphicDriver)
index 231ac26..abcf5b7 100755 (executable)
@@ -57,31 +57,3 @@ void OpenGl_GraphicDriver::End ()
   // So we disable this destructor here until openglDisplay not moved to  OpenGl_GraphicDriver class definition.
   ///openglDisplay.Nullify();
 }
-
-//=======================================================================
-//function : BeginAnimation
-//purpose  : 
-//=======================================================================
-
-void OpenGl_GraphicDriver::BeginAnimation (const Graphic3d_CView& ACView)
-{
-  const OpenGl_CView *aCView = (const OpenGl_CView *)ACView.ptrView;
-  if (aCView)
-  {
-    const Standard_Boolean UpdateAM = (ACView.IsDegenerates && !ACView.IsDegeneratesPrev) || (!ACView.IsDegenerates && ACView.IsDegeneratesPrev);
-    aCView->WS->BeginAnimation(ACView.IsDegenerates != 0,UpdateAM);
-    ((Graphic3d_CView*)(&ACView))->IsDegeneratesPrev = ACView.IsDegenerates; //szvgl: temporary
-  }
-}
-
-//=======================================================================
-//function : EndAnimation
-//purpose  : 
-//=======================================================================
-
-void OpenGl_GraphicDriver::EndAnimation (const Graphic3d_CView& ACView)
-{
-  const OpenGl_CView *aCView = (const OpenGl_CView *)ACView.ptrView;
-  if (aCView)
-    aCView->WS->EndAnimation();
-}
index ccf2348..b6208f6 100755 (executable)
@@ -31,7 +31,6 @@ void OpenGl_GraphicDriver::ClearGroup (const Graphic3d_CGroup& theCGroup)
     return;
 
   ((OpenGl_Group* )theCGroup.ptrGroup)->Release (GetSharedContext());
-  InvalidateAllWorkspaces();
 }
 
 void OpenGl_GraphicDriver::FaceContextGroup (const Graphic3d_CGroup& theCGroup,
@@ -41,7 +40,6 @@ void OpenGl_GraphicDriver::FaceContextGroup (const Graphic3d_CGroup& theCGroup,
     return;
 
   ((OpenGl_Group* )theCGroup.ptrGroup)->SetAspectFace (GetSharedContext(), theCGroup.ContextFillArea, theNoInsert);
-  InvalidateAllWorkspaces();
 }
 
 void OpenGl_GraphicDriver::Group (Graphic3d_CGroup& theCGroup)
@@ -50,7 +48,6 @@ void OpenGl_GraphicDriver::Group (Graphic3d_CGroup& theCGroup)
   if (aStructure)
   {
     theCGroup.ptrGroup = aStructure->AddGroup();
-    InvalidateAllWorkspaces();
   }
 }
 
@@ -60,7 +57,6 @@ void OpenGl_GraphicDriver::LineContextGroup (const Graphic3d_CGroup& theCGroup,
   if (!theCGroup.ContextLine.IsDef || theCGroup.ptrGroup == NULL) return;
 
   ((OpenGl_Group* )theCGroup.ptrGroup)->SetAspectLine (theCGroup.ContextLine, theNoInsert);
-  InvalidateAllWorkspaces();
 }
 
 void OpenGl_GraphicDriver::MarkerContextGroup (const Graphic3d_CGroup& theCGroup,
@@ -69,7 +65,6 @@ void OpenGl_GraphicDriver::MarkerContextGroup (const Graphic3d_CGroup& theCGroup
   if (!theCGroup.ContextMarker.IsDef || theCGroup.ptrGroup == NULL) return;
 
   ((OpenGl_Group* )theCGroup.ptrGroup)->SetAspectMarker (theCGroup.ContextMarker, theNoInsert);
-  InvalidateAllWorkspaces();
 }
 
 void OpenGl_GraphicDriver::MarkerContextGroup (const Graphic3d_CGroup& theCGroup,
@@ -87,7 +82,6 @@ void OpenGl_GraphicDriver::MarkerContextGroup (const Graphic3d_CGroup& theCGroup
   if (theCGroup.ptrGroup != NULL)
   {
     ((OpenGl_Group* )theCGroup.ptrGroup)->SetAspectMarker (theCGroup.ContextMarker, theNoInsert);
-    InvalidateAllWorkspaces();
   }
 }
 
@@ -98,7 +92,6 @@ void OpenGl_GraphicDriver::RemoveGroup (const Graphic3d_CGroup& theCGroup)
     return;
 
   aStructure->RemoveGroup (GetSharedContext(), (const OpenGl_Group* )theCGroup.ptrGroup);
-  InvalidateAllWorkspaces();
 }
 
 void OpenGl_GraphicDriver::TextContextGroup (const Graphic3d_CGroup& theCGroup,
@@ -108,5 +101,4 @@ void OpenGl_GraphicDriver::TextContextGroup (const Graphic3d_CGroup& theCGroup,
     return;
 
   ((OpenGl_Group* )theCGroup.ptrGroup)->SetAspectText (theCGroup.ContextText, theNoInsert);
-  InvalidateAllWorkspaces();
 }
index 4c10105..84e7296 100755 (executable)
@@ -31,7 +31,6 @@ void OpenGl_GraphicDriver::ClearStructure (const Graphic3d_CStructure& theCStruc
     return;
 
   aStructure->Clear (GetSharedContext());
-  InvalidateAllWorkspaces();
 }
 
 void OpenGl_GraphicDriver::ContextStructure (const Graphic3d_CStructure& theCStructure)
@@ -53,8 +52,6 @@ void OpenGl_GraphicDriver::ContextStructure (const Graphic3d_CStructure& theCStr
 
   if (theCStructure.ContextText.IsDef)
     aStructure->SetAspectText (theCStructure.ContextText);
-
-  InvalidateAllWorkspaces();
 }
 
 void OpenGl_GraphicDriver::Connect (const Graphic3d_CStructure& theFather,
@@ -106,7 +103,6 @@ void OpenGl_GraphicDriver::RemoveStructure (const Graphic3d_CStructure& theCStru
   OpenGl_Structure* aStructure = myMapOfStructure.Find (theCStructure.Id);
   myMapOfStructure.UnBind (theCStructure.Id);
   OpenGl_Element::Destroy (GetSharedContext(), aStructure);
-  InvalidateAllWorkspaces();
 }
 
 void OpenGl_GraphicDriver::Structure (Graphic3d_CStructure& theCStructure)
@@ -115,9 +111,6 @@ void OpenGl_GraphicDriver::Structure (Graphic3d_CStructure& theCStructure)
 
   OpenGl_Structure* aStructure = new OpenGl_Structure();
 
-  aStructure->SetDegenerateModel (theCStructure.ContextFillArea.DegenerationMode,
-                                  theCStructure.ContextFillArea.SkipRatio);
-
   Standard_Integer aStatus = 0;
   if (theCStructure.highlight) aStatus |= OPENGL_NS_HIGHLIGHT;
   if (!theCStructure.visible)  aStatus |= OPENGL_NS_HIDE;
@@ -125,7 +118,6 @@ void OpenGl_GraphicDriver::Structure (Graphic3d_CStructure& theCStructure)
 
   theCStructure.ptrStructure = aStructure;
   myMapOfStructure.Bind (theCStructure.Id, aStructure);
-  InvalidateAllWorkspaces();
 }
 
 //=======================================================================
index c7d3be6..e079220 100755 (executable)
@@ -467,13 +467,6 @@ void OpenGl_GraphicDriver::TransformStructure (const Graphic3d_CStructure& ACStr
     astructure->SetTransformation(&(ACStructure.Transformation[0][0]));
 }
 
-void OpenGl_GraphicDriver::DegenerateStructure (const Graphic3d_CStructure& ACStructure)
-{
-  OpenGl_Structure *astructure = (OpenGl_Structure *)ACStructure.ptrStructure;
-  if (astructure)
-    astructure->SetDegenerateModel( ACStructure.ContextFillArea.DegenerationMode, ACStructure.ContextFillArea.SkipRatio );
-}
-
 void OpenGl_GraphicDriver::Transparency (const Graphic3d_CView& ACView, const Standard_Boolean AFlag)
 {
   const OpenGl_CView *aCView = (const OpenGl_CView *)ACView.ptrView;
index b5788aa..e596f6b 100644 (file)
@@ -160,7 +160,6 @@ void OpenGl_Group::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
   }
 
   // Render group elements
-  Handle(OpenGl_Texture) aPrevTexture; // temporary disabled texture
   for (OpenGl_ElementNode* aNodeIter = myFirst; aNodeIter != NULL; aNodeIter = aNodeIter->next)
   {
     switch (aNodeIter->type)
@@ -171,28 +170,10 @@ void OpenGl_Group::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
       case TelText:
       {
         glDisable (GL_LIGHTING);
-
         if (isImmediate)
         {
           glDepthMask (GL_FALSE);
         }
-        else if ((theWorkspace->NamedStatus & OPENGL_NS_ANIMATION) != 0 &&
-                 (theWorkspace->NamedStatus & OPENGL_NS_WIREFRAME) == 0 &&
-                  theWorkspace->DegenerateModel != 0)
-        {
-          glDisable (GL_DEPTH_TEST);
-          if (theWorkspace->NamedStatus & OPENGL_NS_TEXTURE)
-          {
-            aPrevTexture = theWorkspace->DisableTexture();
-          }
-          theWorkspace->NamedStatus |= OPENGL_NS_WIREFRAME;
-        }
-
-        if (!aPrevTexture.IsNull())
-        {
-          theWorkspace->EnableTexture (aPrevTexture);
-          aPrevTexture.Nullify();
-        }
 
         aNodeIter->elem->Render (theWorkspace);
         break;
@@ -207,13 +188,6 @@ void OpenGl_Group::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
         {
           glDepthMask(GL_FALSE);
         }
-        else if ((theWorkspace->NamedStatus & OPENGL_NS_ANIMATION) != 0 &&
-                 (theWorkspace->NamedStatus & OPENGL_NS_WIREFRAME) != 0 &&
-                  theWorkspace->DegenerateModel < 2)
-        {
-          glEnable (GL_DEPTH_TEST);
-          theWorkspace->NamedStatus &= ~OPENGL_NS_WIREFRAME;
-        }
 
         if (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT)
         {
index c0efd91..90066c6 100644 (file)
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-
 #ifndef _OpenGl_NamedStatus_Header
 #define _OpenGl_NamedStatus_Header
 
 // Dynamic fields
 #define OPENGL_NS_HIDE         (1<<0)
 #define OPENGL_NS_HIGHLIGHT    (1<<1)
-#define OPENGL_NS_WIREFRAME    (1<<2)
-#define OPENGL_NS_RESMAT       (1<<3)
-#define OPENGL_NS_ADD          (1<<4)
-#define OPENGL_NS_IMMEDIATE    (1<<5)
-#define OPENGL_NS_TEXTURE      (1<<6)
-#define OPENGL_NS_ANTIALIASING (1<<7)
-#define OPENGL_NS_ANIMATION    (1<<8)
-#define OPENGL_NS_UPDATEAM     (1<<9)
-#define OPENGL_NS_DEGENERATION (1<<10)
-#define OPENGL_NS_2NDPASSNEED  (1<<11)
-#define OPENGL_NS_2NDPASSDO    (1<<12)
-#define OPENGL_NS_FORBIDSETTEX (1<<13)
-#define OPENGL_NS_FLIST        (1<<14)
-#define OPENGL_NS_WHITEBACK    (1<<15)
+#define OPENGL_NS_RESMAT       (1<<2)
+#define OPENGL_NS_ADD          (1<<3)
+#define OPENGL_NS_IMMEDIATE    (1<<4)
+#define OPENGL_NS_TEXTURE      (1<<5)
+#define OPENGL_NS_ANTIALIASING (1<<6)
+#define OPENGL_NS_2NDPASSNEED  (1<<7)
+#define OPENGL_NS_2NDPASSDO    (1<<8)
+#define OPENGL_NS_FORBIDSETTEX (1<<9)
+#define OPENGL_NS_WHITEBACK    (1<<10)
 
 #endif //_OpenGl_NamedStatus_Header
index 5214fef..c9cea07 100644 (file)
@@ -589,7 +589,7 @@ void OpenGl_Polygon::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
     front_lighting_model = 0;
   }
 
-  if( interior_style != Aspect_IS_EMPTY && AWorkspace->DegenerateModel < 2 )
+  if( interior_style != Aspect_IS_EMPTY)
   {
     if ( front_lighting_model )
       glEnable(GL_LIGHTING);
@@ -609,14 +609,7 @@ void OpenGl_Polygon::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
   glDisable(GL_TEXTURE_1D);
   glDisable(GL_TEXTURE_2D);
 
-  switch ( AWorkspace->DegenerateModel )
-  {
-    default:
-      draw_edges ( edge_colour, interior_style, AWorkspace );
-      break;
-    case 3:  /* marker degeneration */
-      break;
-  }
+  draw_edges ( edge_colour, interior_style, AWorkspace );
 
   glPopAttrib(); /* skt: GL_ENABLE_BIT*/
 }
index 73770f5..22b61bb 100644 (file)
@@ -59,7 +59,7 @@ void OpenGl_Polyline::Render (const Handle(OpenGl_Workspace)& theWorkspace) cons
   glDisable (GL_TEXTURE_1D);
   glDisable (GL_TEXTURE_2D);
 
-  glBegin (theWorkspace->DegenerateModel != 3 ? GL_LINE_STRIP : GL_POINTS);
+  glBegin (GL_LINE_STRIP);
 
   // Use highlight colors
   glColor3fv ((theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT) ? theWorkspace->HighlightColor->rgb : anAspectLine->Color().rgb);
index a512f26..e1c2162 100755 (executable)
@@ -1,6 +1,6 @@
 // Created on: 2011-07-13
 // Created by: Sergey ZERCHANINOV
-// Copyright (c) 2011-2012 OPEN CASCADE SAS
+// Copyright (c) 2011-2013 OPEN CASCADE SAS
 //
 // The content of this file is subject to the Open CASCADE Technology Public
 // License Version 6.5 (the "License"). You may not use the content of this file
 
 #include <InterfaceGraphic_PrimitiveArray.hxx>
 
-namespace
-{
-  static unsigned long vRand = 1L;
-  #define OGL_Rand() (vRand = vRand * 214013L + 2531011L)
-};
-
 // =======================================================================
 // function : clearMemoryOwn
 // purpose  :
@@ -192,9 +186,8 @@ void OpenGl_PrimitiveArray::DrawArray (Tint theLightingModel,
     glDisable (GL_TEXTURE_2D);
   }
 
-  if (theWorkspace->DegenerateModel < 2 &&
-     ((myDrawMode >  GL_LINE_STRIP && theInteriorStyle != Aspect_IS_EMPTY) ||
-      (myDrawMode <= GL_LINE_STRIP)))
+  if ((myDrawMode >  GL_LINE_STRIP && theInteriorStyle != Aspect_IS_EMPTY) ||
+      (myDrawMode <= GL_LINE_STRIP))
   {
     if (theWorkspace->NamedStatus & OPENGL_NS_HIGHLIGHT)
     {
@@ -368,49 +361,19 @@ void OpenGl_PrimitiveArray::DrawArray (Tint theLightingModel,
       if (myPArray->vtexels != NULL)
         glDisableClientState (GL_TEXTURE_COORD_ARRAY);
     }
-
-    if (theWorkspace->DegenerateModel)
-    {
-      if (myDrawMode <= GL_LINE_STRIP)
-      {
-        glPopAttrib();
-      }
-      return;
-    }
   }
 
-  if (theEdgeFlag || theWorkspace->DegenerateModel)
+  // On some NVIDIA graphic cards, using glEdgeFlagPointer() in
+  // combination with VBO (edge flag data put into a VBO buffer)
+  // leads to a crash in a driver. Therefore, edge flags are simply
+  // igonored when VBOs are enabled, so all the edges are drawn if
+  // edge visibility is turned on. In order to draw edges selectively,
+  // either disable VBO or turn off edge visibilty in the current
+  // primitive array and create a separate primitive array (segments)
+  // and put edges to be drawn into it.
+  if (theEdgeFlag && myDrawMode > GL_LINE_STRIP)
   {
-    switch (theWorkspace->DegenerateModel)
-    {
-      default: // XXX_TDM_NODE or TINY
-        //  On some NVIDIA graphic cards, using glEdgeFlagPointer() in
-        //  combination with VBO ( edge flag data put into a VBO buffer)
-        //  leads to a crash in a driver. Therefore, edge flags are simply
-        //  igonored when VBOs are enabled, so all the edges are drawn if
-        //  edge visibility is turned on. In order to draw edges selectively,
-        //  either disable VBO or turn off edge visibilty in the current
-        //  primitive array and create a separate primitive array (segments)
-        //  and put edges to be drawn into it.
-        if (myDrawMode > GL_LINE_STRIP)
-        {
-          DrawEdges (theEdgeFlag ? theEdgeColour : theInteriorColour, theWorkspace);
-        }
-        break;
-      // DegenerateModel(as Lines, Points, BBoxs) are used only without VBO
-      case 2: // XXX_TDM_WIREFRAME
-        if (!toDrawVbo())
-          DrawDegeneratesAsLines ((theEdgeFlag ? theEdgeColour : theInteriorColour), theWorkspace);
-        break;
-      case 3: // XXX_TDM_MARKER
-        if (!toDrawVbo())
-          DrawDegeneratesAsPoints ((theEdgeFlag ? theEdgeColour : theInteriorColour), theWorkspace->SkipRatio);
-        break;
-      case 4: // XXX_TDM_BBOX
-        if (!toDrawVbo())
-          DrawDegeneratesAsBBoxs (theEdgeFlag ? theEdgeColour : theInteriorColour);
-        break;
-    }
+    DrawEdges (theEdgeColour, theWorkspace);
   }
 
   if (myDrawMode <= GL_LINE_STRIP)
@@ -553,944 +516,6 @@ void OpenGl_PrimitiveArray::DrawEdges (const TEL_COLOUR*               theEdgeCo
   }
 }
 
-// =======================================================================
-// function : DrawDegeneratesPointsAsPoints
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesPointsAsPoints() const
-{
-  tel_point pv = myPArray->vertices;
-  for (Tint aVertId = 0; aVertId < myPArray->num_vertexs; ++aVertId)
-  {
-    glVertex3fv (&pv[aVertId].xyz[0]);
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesLinesAsPoints
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesLinesAsPoints() const
-{
-  GLfloat pt[3];
-  tel_point pv = myPArray->vertices;
-
-  Tint j = 0;
-  while (j < myPArray->num_vertexs)
-  {
-    pt[0] = pv[j].xyz[0];
-    pt[1] = pv[j].xyz[1];
-    pt[2] = pv[j].xyz[2]; ++j;
-    pt[0] += pv[j].xyz[0];
-    pt[1] += pv[j].xyz[1];
-    pt[2] += pv[j].xyz[2]; ++j;
-    pt[0] *= 0.5f;
-    pt[1] *= 0.5f;
-    pt[2] *= 0.5f;
-    glVertex3fv (pt);
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesTrianglesAsPoints
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesTrianglesAsPoints() const
-{
-  Tint      i, j, iv;
-  GLfloat   pt[ 3 ];
-  tel_point pv = myPArray->vertices;
-
-  if (myPArray->num_edges > 0)
-  {
-    for (j = 0; j < myPArray->num_edges; j += 3)
-    {
-      iv = myPArray->edges[j];
-      pt[0] = pv[iv].xyz[0];
-      pt[1] = pv[iv].xyz[1];
-      pt[2] = pv[iv].xyz[2];
-      for (i = 1; i < 3; ++i)
-      {
-        iv = myPArray->edges[j+i];
-        pt[0] += pv[iv].xyz[0];
-        pt[1] += pv[iv].xyz[1];
-        pt[2] += pv[iv].xyz[2];
-      }
-      pt[0] /= 3.f;
-      pt[1] /= 3.f;
-      pt[2] /= 3.f;
-      glVertex3fv (pt);
-    }
-  }
-  else
-  {
-    for (j = 0; j < myPArray->num_vertexs; j += 3)
-    {
-      pt[0] = pv[j].xyz[0];
-      pt[1] = pv[j].xyz[1];
-      pt[2] = pv[j].xyz[2];
-      for (i = 1; i < 3; ++i)
-      {
-        pt[0] += pv[j+i].xyz[0];
-        pt[1] += pv[j+i].xyz[1];
-        pt[2] += pv[j+i].xyz[2];
-      }
-      pt[0] /= 3.f;
-      pt[1] /= 3.f;
-      pt[2] /= 3.f;
-      glVertex3fv (pt);
-    }
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesTrianglesAsPoints
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesTrianglestripsAsPoints() const
-{
-  Tint      i, j, k, n;
-  GLfloat   pt[ 3 ];
-  tel_point pv = myPArray->vertices;
-
-  if (myPArray->num_bounds > 0)
-  {
-    for (k = n = 0; k < myPArray->num_bounds; ++k)
-    {
-      for (j = 0; j < myPArray->bounds[k] - 2; ++j)
-      {
-        pt[0] = pv[n+j].xyz[0];
-        pt[1] = pv[n+j].xyz[1];
-        pt[2] = pv[n+j].xyz[2];
-        for (i = 1; i < 3; ++i)
-        {
-          pt[0] += pv[n+j+i].xyz[0];
-          pt[1] += pv[n+j+i].xyz[1];
-          pt[2] += pv[n+j+i].xyz[2];
-        }
-        pt[0] /= 3.f;
-        pt[1] /= 3.f;
-        pt[2] /= 3.f;
-        glVertex3fv (pt);
-      }
-      n += myPArray->bounds[k];
-    }
-  }
-  else
-  {
-    for (j = 0; j < myPArray->num_vertexs - 2; ++j)
-    {
-      pt[0] = pv[j].xyz[0];
-      pt[1] = pv[j].xyz[1];
-      pt[2] = pv[j].xyz[2];
-      for (i = 1; i < 3; ++i)
-      {
-        pt[0] += pv[j+i].xyz[0];
-        pt[1] += pv[j+i].xyz[1];
-        pt[2] += pv[j+i].xyz[2];
-      }
-      pt[0] /= 3.f;
-      pt[1] /= 3.f;
-      pt[2] /= 3.f;
-      glVertex3fv (pt);
-    }
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesPolygonsAsPoints
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesPolygonsAsPoints() const
-{
-  Tint      j, k, n, iv;
-  GLfloat   pt[3];
-  tel_point pv = myPArray->vertices;
-
-  if (myPArray->num_bounds > 0)
-  {
-    if (myPArray->num_edges > 0)
-    {
-      for (k = n = 0; k < myPArray->num_bounds; ++k)
-      {
-        pt[0] = pt[1] = pt[2] = 0.0;
-        for (j = 0; j < myPArray->bounds[k]; ++j)
-        {
-          iv = myPArray->edges[n+j];
-          pt[0] += pv[iv].xyz[0];
-          pt[1] += pv[iv].xyz[1];
-          pt[2] += pv[iv].xyz[2];
-        }
-        pt[0] /= myPArray->bounds[k];
-        pt[1] /= myPArray->bounds[k];
-        pt[2] /= myPArray->bounds[k];
-        glVertex3fv (pt);
-        n += myPArray->bounds[k];
-      }
-    }
-    else
-    {
-      for (k = n = 0; k < myPArray->num_bounds; ++k)
-      {
-        pt[0] = pt[1] = pt[2] = 0.0;
-        for (j = 0; j < myPArray->bounds[k]; ++j)
-        {
-          pt[0] += pv[n+j].xyz[0];
-          pt[1] += pv[n+j].xyz[1];
-          pt[2] += pv[n+j].xyz[2];
-        }
-        pt[0] /= myPArray->bounds[k];
-        pt[1] /= myPArray->bounds[k];
-        pt[2] /= myPArray->bounds[k];
-        glVertex3fv (pt);
-        n += myPArray->bounds[k];
-      }
-    }
-  }
-  else if (myPArray->num_edges > 0)
-  {
-    pt[0] = pt[1] = pt[2] = 0.0;
-    for (j = 0; j < myPArray->num_edges; ++j)
-    {
-      iv = myPArray->edges[j];
-      pt[0] += pv[iv].xyz[0];
-      pt[1] += pv[iv].xyz[1];
-      pt[2] += pv[iv].xyz[2];
-    }
-    pt[0] /= myPArray->num_edges;
-    pt[1] /= myPArray->num_edges;
-    pt[2] /= myPArray->num_edges;
-    glVertex3fv (pt);
-  }
-  else
-  {
-    pt[0] = pt[1] = pt[2] = 0.0;
-    for (j = 0; j < myPArray->num_vertexs; ++j)
-    {
-      pt[0] += pv[j].xyz[0];
-      pt[1] += pv[j].xyz[1];
-      pt[2] += pv[j].xyz[2];
-    }
-    pt[0] /= myPArray->num_vertexs;
-    pt[1] /= myPArray->num_vertexs;
-    pt[2] /= myPArray->num_vertexs;
-    glVertex3fv (pt);
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesQuadranglesAsPoints
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesQuadranglesAsPoints() const
-{
-  Tint      i, j, iv;
-  GLfloat   pt[ 3 ];
-  tel_point pv = myPArray->vertices;
-
-  if (myPArray->num_edges > 0)
-  {
-    for (j = 0; j < myPArray->num_edges; j += 4)
-    {
-      pt[0] = pt[1] = pt[2] = 0.0;
-      for (i = 0; i < 4; ++i)
-      {
-        iv = myPArray->edges[j+i];
-        pt[0] += pv[iv].xyz[0];
-        pt[1] += pv[iv].xyz[1];
-        pt[2] += pv[iv].xyz[2];
-      }
-      pt[0] /= 4;
-      pt[1] /= 4;
-      pt[2] /= 4;
-      glVertex3fv ( pt );
-    }
-  }
-  else
-  {
-    for (j = 0; j < myPArray->num_vertexs; j += 4)
-    {
-      pt[0] = pt[1] = pt[2] = 0.0;
-      for (i = 0; i < 4; ++i)
-      {
-        pt[0] += pv[j+i].xyz[0];
-        pt[1] += pv[j+i].xyz[1];
-        pt[2] += pv[j+i].xyz[2];
-      }
-      pt[0] /= 4;
-      pt[1] /= 4;
-      pt[2] /= 4;
-      glVertex3fv (pt);
-    }
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesAsPoints
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesQuadranglestripsAsPoints() const
-{
-  Tint      i, j, k, n;
-  GLfloat   pt[3];
-  tel_point pv = myPArray->vertices;
-
-  if (myPArray->num_bounds > 0)
-  {
-    for (k = n = 0; k < myPArray->num_bounds; ++k)
-    {
-      for (j = 0; j < myPArray->bounds[k] - 2; j += 2)
-      {
-        pt[0] = pt[1] = pt[2] = 0.;
-        for (i = 0; i < 4; ++i)
-        {
-          pt[0] += pv[n+j+i].xyz[0];
-          pt[1] += pv[n+j+i].xyz[1];
-          pt[2] += pv[n+j+i].xyz[2];
-        }
-        pt[0] /= 4;
-        pt[1] /= 4;
-        pt[2] /= 4;
-        glVertex3fv (pt);
-      }
-      n += myPArray->bounds[k];
-    }
-  }
-  else
-  {
-    for (j = 0; j < myPArray->num_vertexs - 2; j += 2)
-    {
-      pt[0] = pt[1] = pt[2] = 0.;
-      for (i = 0; i < 4; ++i)
-      {
-        pt[0] += pv[j+i].xyz[0];
-        pt[1] += pv[j+i].xyz[1];
-        pt[2] += pv[j+i].xyz[2];
-      }
-      pt[0] /= 4;
-      pt[1] /= 4;
-      pt[2] /= 4;
-      glVertex3fv (pt);
-    }
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesAsPoints
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesAsPoints (const TEL_COLOUR* theEdgeColour,
-                                                     const float       theSkipRatio) const
-{
-  if (theSkipRatio >= 1.0f)
-    return;
-
-  GLboolean zbuff_state = glIsEnabled (GL_DEPTH_TEST);
-  glDisable (GL_LIGHTING);
-  if (zbuff_state)
-    glDisable (GL_DEPTH_TEST);
-  glColor3fv (theEdgeColour->rgb);
-
-  glBegin (GL_POINTS);
-  switch (myDrawMode)
-  {
-    case GL_POINTS:
-      DrawDegeneratesPointsAsPoints();
-      break;
-    case GL_LINES:
-      DrawDegeneratesLinesAsPoints();
-      break;
-    case GL_LINE_STRIP:
-    case GL_POLYGON:
-      DrawDegeneratesPolygonsAsPoints();
-      break;
-    case GL_TRIANGLES:
-      DrawDegeneratesTrianglesAsPoints();
-      break;
-    case GL_QUADS:
-      DrawDegeneratesQuadranglesAsPoints();
-      break;
-    case GL_TRIANGLE_FAN:
-    case GL_TRIANGLE_STRIP:
-      DrawDegeneratesTrianglestripsAsPoints();
-      break;
-    case GL_QUAD_STRIP:
-      DrawDegeneratesQuadranglestripsAsPoints();
-      break;
-    default:
-      break;
-  }
-  glEnd();
-  if (zbuff_state)
-    glEnable (GL_DEPTH_TEST);
-}
-
-// =======================================================================
-// function : DrawDegeneratesLinesAsLines
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesLinesAsLines (const float theSkipRatio) const
-{
-  Tint i, iv;
-  tel_point  pv = myPArray->vertices;
-
-  Tint n = myPArray->num_vertexs;
-  Tint j = int((1.0f - theSkipRatio) * n);
-  for (; j > 0; --j)
-  {
-    i = OGL_Rand() % n;
-    myPArray->keys[i] = -myPArray->keys[i];
-  }
-
-  if (myPArray->num_bounds > 0)
-  {
-    if (myPArray->num_edges > 0)
-    {
-      for (i = n = 0; i < myPArray->num_bounds; ++i)
-      {
-        glBegin (GL_LINES);
-        for (j = 0; j < myPArray->bounds[i]; ++j)
-        {
-          iv = myPArray->edges[n + j];
-          if (myPArray->keys[iv] < 0)
-          {
-            myPArray->keys[iv] = -myPArray->keys[iv];
-            glVertex3fv (pv[iv].xyz);
-          }
-        }
-        glEnd();
-        n += myPArray->bounds[i];
-      }
-    }
-    else
-    {
-      for (i = n = 0; i < myPArray->num_bounds; ++i)
-      {
-        glBegin (GL_LINES);
-        for (j = 0; j < myPArray->bounds[i]; ++j)
-        {
-          if (myPArray->keys[n+j] < 0)
-          {
-            myPArray->keys[n+j] = -myPArray->keys[n+j];
-            glVertex3fv (pv[n+j].xyz);
-          }
-        }
-        glEnd();
-        n += myPArray->bounds[i];
-      }
-    }
-  }
-  else if (myPArray->num_edges > 0)
-  {
-    glBegin (GL_LINES);
-    for (j = 0; j < myPArray->num_edges; ++j)
-    {
-      iv = myPArray->edges[j];
-      if (myPArray->keys[iv] < 0)
-      {
-        myPArray->keys[iv] = -myPArray->keys[iv];
-        glVertex3fv (pv[iv].xyz);
-      }
-    }
-    glEnd();
-  }
-  else
-  {
-    glBegin (GL_LINES);
-    for (j = 0; j < myPArray->num_vertexs; ++j)
-    {
-      if (myPArray->keys[j] < 0)
-      {
-        myPArray->keys[j] = -myPArray->keys[j];
-        glVertex3fv (pv[j].xyz);
-      }
-    }
-    glEnd();
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesTrianglesAsLines
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesTrianglesAsLines (const float theSkipRatio) const
-{
-  Tint i, iv;
-  tel_point pv = myPArray->vertices;
-
-  Tint n = myPArray->num_vertexs / 3;
-  Tint j = int((1.0f - theSkipRatio) * n);
-  for (; j > 0; --j)
-  {
-    i = OGL_Rand() % n; i *= 3;
-    myPArray->keys[i] = -myPArray->keys[i];
-  }
-
-  if (myPArray->num_edges > 0)
-  {
-    for (j = 0; j < myPArray->num_edges; j += 3)
-    {
-      iv = myPArray->edges[j];
-      if (myPArray->keys[iv] < 0)
-      {
-        myPArray->keys[iv] = -myPArray->keys[iv];
-        glBegin (GL_LINE_LOOP);
-        for (i = 0; i < 3; ++i)
-        {
-          iv = myPArray->edges[j+i];
-          glVertex3fv (pv[iv].xyz);
-        }
-        glEnd();
-      }
-    }
-  }
-  else
-  {
-    for (j = 0; j < myPArray->num_vertexs; j += 3)
-    {
-      if (myPArray->keys[j] < 0)
-      {
-        myPArray->keys[j] = -myPArray->keys[j];
-        glBegin (GL_LINE_LOOP);
-        for (i = 0; i < 3; ++i)
-        {
-          glVertex3fv (pv[j+i].xyz);
-        }
-        glEnd();
-      }
-    }
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesTrianglesAsLines
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesTrianglestripsAsLines (const float theSkipRatio) const
-{
-  Tint i, j, k, n, ni;
-  tel_point pv = myPArray->vertices;
-
-  if (myPArray->num_bounds > 0)
-  {
-    for (i = n = 0; i < myPArray->num_bounds; ++i)
-    {
-      ni = myPArray->bounds[i] - 2;
-      k = int((1.0f - theSkipRatio) * ni);
-      for (; k > 0; --k)
-      {
-        j = OGL_Rand() % ni; j += 2;
-        myPArray->keys[n+j] = -myPArray->keys[n+j];
-      }
-      for (j = 2; j < myPArray->bounds[i]; ++j)
-      {
-        if (myPArray->keys[n+j] < 0)
-        {
-          myPArray->keys[n+j] = -myPArray->keys[n+j];
-          glBegin (GL_LINE_LOOP);
-          glVertex3fv (pv[n+j-2].xyz);
-          glVertex3fv (pv[n+j-1].xyz);
-          glVertex3fv (pv[n+j].xyz);
-          glEnd();
-        }
-      }
-      n += myPArray->bounds[i];
-    }
-  }
-  else
-  {
-    ni = myPArray->num_vertexs - 2;
-    k = int((1.0f - theSkipRatio) * ni);
-    for (; k > 0; --k)
-    {
-      j = OGL_Rand() % ni; j += 2;
-      myPArray->keys[j] = -myPArray->keys[j];
-    }
-    for (j = 2; j < myPArray->num_vertexs; ++j)
-    {
-      if (myPArray->keys[j] < 0)
-      {
-        myPArray->keys[j] = -myPArray->keys[j];
-        glBegin (GL_LINE_LOOP);
-        glVertex3fv (pv[j-2].xyz);
-        glVertex3fv (pv[j-1].xyz);
-        glVertex3fv (pv[j].xyz);
-        glEnd();
-      }
-    }
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesPolygonsAsLines
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesPolygonsAsLines (const float theSkipRatio) const
-{
-  Tint i, iv;
-  tel_point pv = myPArray->vertices;
-
-  Tint n = myPArray->num_vertexs;
-  Tint j = int((1.0f - theSkipRatio) * n);
-  for (; j > 0; --j)
-  {
-    i = OGL_Rand() % n;
-    myPArray->keys[i] = -myPArray->keys[i];
-  }
-
-  if (myPArray->num_bounds > 0)
-  {
-    if (myPArray->num_edges > 0)
-    {
-      for (i = n = 0; i < myPArray->num_bounds; ++i)
-      {
-        glBegin (GL_LINE_LOOP);
-        for (j = 0; j < myPArray->bounds[i]; ++j)
-        {
-          iv = myPArray->edges[n+j];
-          if (myPArray->keys[iv] < 0)
-          {
-            myPArray->keys[iv] = -myPArray->keys[iv];
-            glVertex3fv (pv[iv].xyz);
-          }
-        }
-        glEnd();
-        n += myPArray->bounds[i];
-      }
-    }
-    else
-    {
-      for (i = n = 0; i < myPArray->num_bounds; ++i)
-      {
-        glBegin (GL_LINE_LOOP);
-        for (j = 0; j < myPArray->bounds[i]; ++j)
-        {
-          if (myPArray->keys[n+j] < 0)
-          {
-            myPArray->keys[n+j] = -myPArray->keys[n+j];
-            glVertex3fv (pv[n+j].xyz);
-          }
-        }
-        glEnd();
-        n += myPArray->bounds[i];
-      }
-    }
-  }
-  else if (myPArray->num_edges > 0)
-  {
-    glBegin (GL_LINE_LOOP);
-    for (j = 0; j < myPArray->num_edges; ++j)
-    {
-      iv = myPArray->edges[j];
-      if (myPArray->keys[iv] < 0)
-      {
-        myPArray->keys[iv] = -myPArray->keys[iv];
-        glVertex3fv (pv[iv].xyz);
-      }
-    }
-    glEnd();
-  }
-  else
-  {
-    glBegin (GL_LINE_LOOP);
-    for (j = 0; j < myPArray->num_vertexs; ++j)
-    {
-      if (myPArray->keys[j] < 0)
-      {
-        myPArray->keys[j] = -myPArray->keys[j];
-        glVertex3fv (pv[j].xyz);
-      }
-    }
-    glEnd();
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesQuadranglesAsLines
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesQuadranglesAsLines (const float theSkipRatio) const
-{
-  Tint i, iv;
-  tel_point pv = myPArray->vertices;
-
-  Tint n = myPArray->num_vertexs / 4;
-  Tint j = int((1.0f - theSkipRatio) * n);
-  for (; j > 0; --j)
-  {
-    i = OGL_Rand() % n; i *= 4;
-    myPArray->keys[i] = -myPArray->keys[i];
-  }
-
-  if (myPArray->num_edges > 0)
-  {
-    for (j = 0; j < myPArray->num_edges; j += 4)
-    {
-      iv = myPArray->edges[j];
-      if (myPArray->keys[iv] < 0)
-      {
-        myPArray->keys[iv] = -myPArray->keys[iv];
-        glBegin (GL_LINE_LOOP);
-        for (i = 0; i < 4; ++i)
-        {
-          iv = myPArray->edges[j+i];
-          glVertex3fv (pv[iv].xyz);
-        }
-        glEnd();
-      }
-    }
-  }
-  else
-  {
-    for (j = 0; j < myPArray->num_vertexs; j += 4)
-    {
-      if (myPArray->keys[j] < 0)
-      {
-        myPArray->keys[j] = -myPArray->keys[j];
-        glBegin (GL_LINE_LOOP);
-        for (i = 0; i < 4; ++i)
-        {
-          glVertex3fv (pv[j+i].xyz);
-        }
-        glEnd();
-      }
-    }
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesQuadranglesAsLines
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesQuadranglestripsAsLines (const float theSkipRatio) const
-{
-  Tint i, j, k, n, ni;
-  tel_point pv = myPArray->vertices;
-
-  if (myPArray->num_bounds > 0)
-  {
-    for (i = n = 0; i < myPArray->num_bounds; ++i)
-    {
-      ni = myPArray->bounds[i] / 2 - 2;
-      k = int((1.0f - theSkipRatio) * ni);
-      for (; k > 0; --k)
-      {
-        j = OGL_Rand() % ni; j = j * 2 + 2;
-        myPArray->keys[n+j] = -myPArray->keys[n+j];
-      }
-      for (j = 3; j < myPArray->bounds[i]; j += 2)
-      {
-        if (myPArray->keys[n+j] < 0)
-        {
-          myPArray->keys[n+j] = -myPArray->keys[n+j];
-          glBegin (GL_LINE_LOOP);
-          glVertex3fv (pv[n+j-3].xyz);
-          glVertex3fv (pv[n+j-2].xyz);
-          glVertex3fv (pv[n+j-1].xyz);
-          glVertex3fv (pv[n+j].xyz);
-          glEnd();
-        }
-      }
-      n += myPArray->bounds[i];
-    }
-  }
-  else
-  {
-    ni = myPArray->num_vertexs / 2 - 2;
-    k = int((1.0f - theSkipRatio) * ni);
-    for (; k > 0; --k)
-    {
-      j = OGL_Rand() % ni; j = j * 2 + 2;
-      myPArray->keys[j] = -myPArray->keys[j];
-    }
-    for (j = 3; j < myPArray->num_vertexs; j += 2)
-    {
-      if (myPArray->keys[j] < 0)
-      {
-        myPArray->keys[j] = -myPArray->keys[j];
-        glBegin (GL_LINE_LOOP);
-        glVertex3fv (pv[j-3].xyz);
-        glVertex3fv (pv[j-2].xyz);
-        glVertex3fv (pv[j-1].xyz);
-        glVertex3fv (pv[j].xyz);
-        glEnd();
-      }
-    }
-  }
-}
-
-// =======================================================================
-// function : DrawDegeneratesAsLines
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesAsLines (const TEL_COLOUR*               theEdgeColour,
-                                                    const Handle(OpenGl_Workspace)& theWorkspace) const
-{
-  const float aSkipRatio = theWorkspace->SkipRatio;
-
-  GLboolean zbuff_state = glIsEnabled (GL_DEPTH_TEST);
-
-  glDisable (GL_LIGHTING);
-
-  if (zbuff_state)
-    glDisable (GL_DEPTH_TEST);
-
-  glColor3fv (theEdgeColour->rgb);
-
-  if (aSkipRatio != 0.0f)
-  {
-    switch (myDrawMode)
-    {
-      case GL_POINTS:
-        if (aSkipRatio < 1.0f)
-          DrawDegeneratesPointsAsPoints();
-        break;
-      case GL_LINES:
-        DrawDegeneratesLinesAsLines (aSkipRatio);
-        break;
-      case GL_LINE_STRIP:
-      case GL_POLYGON:
-        DrawDegeneratesPolygonsAsLines (aSkipRatio);
-        break;
-      case GL_TRIANGLES:
-        DrawDegeneratesTrianglesAsLines (aSkipRatio);
-        break;
-      case GL_QUADS:
-        DrawDegeneratesQuadranglesAsLines (aSkipRatio);
-        break;
-      case GL_TRIANGLE_FAN:
-      case GL_TRIANGLE_STRIP:
-        DrawDegeneratesTrianglestripsAsLines (aSkipRatio);
-        break;
-      case GL_QUAD_STRIP:
-        DrawDegeneratesQuadranglestripsAsLines (aSkipRatio);
-        break;
-      default:
-        break;
-    }
-  }
-  else
-  {
-    int i,n;
-    glPushAttrib (GL_POLYGON_BIT);
-    glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
-
-    GLboolean color_array_mode         = glIsEnabled (GL_COLOR_ARRAY);
-    GLboolean edge_flag_array_mode     = glIsEnabled (GL_EDGE_FLAG_ARRAY);
-    GLboolean index_array_mode         = glIsEnabled (GL_INDEX_ARRAY);
-    GLboolean normal_array_mode        = glIsEnabled (GL_NORMAL_ARRAY);
-    GLboolean texture_coord_array_mode = glIsEnabled (GL_TEXTURE_COORD_ARRAY);
-    GLboolean vertex_array_mode        = glIsEnabled (GL_VERTEX_ARRAY);
-
-    glDisableClientState (GL_COLOR_ARRAY);
-    glDisableClientState (GL_EDGE_FLAG_ARRAY);
-    glDisableClientState (GL_INDEX_ARRAY);
-    glDisableClientState (GL_NORMAL_ARRAY);
-    glDisableClientState (GL_TEXTURE_COORD_ARRAY);
-
-    if (!vertex_array_mode)
-      glEnableClientState (GL_VERTEX_ARRAY);
-
-    glVertexPointer (3, GL_FLOAT, 0, myPArray->vertices); // array of vertices
-
-    if (myPArray->num_bounds > 0)
-    {
-      if (myPArray->num_edges > 0)
-      {
-        for (i = n = 0; i < myPArray->num_bounds; ++i)
-        {
-          glDrawElements (myDrawMode, myPArray->bounds[i], GL_UNSIGNED_INT, (GLenum* )&myPArray->edges[n]);
-          n += myPArray->bounds[i];
-        }
-      }
-      else
-      {
-        for (i = n = 0; i < myPArray->num_bounds; ++i)
-        {
-          glDrawArrays (myDrawMode, n, myPArray->bounds[i]);
-          n += myPArray->bounds[i];
-        }
-      }
-    }
-    else if (myPArray->num_edges > 0)
-    {
-      glDrawElements (myDrawMode, myPArray->num_edges, GL_UNSIGNED_INT, (GLenum* )myPArray->edges);
-    }
-    else
-    {
-      glDrawArrays (myDrawMode, 0, myPArray->num_vertexs);
-    }
-
-    if (!vertex_array_mode) glDisableClientState (GL_VERTEX_ARRAY);
-
-    if (color_array_mode)         glEnableClientState (GL_COLOR_ARRAY);
-    if (edge_flag_array_mode)     glEnableClientState (GL_EDGE_FLAG_ARRAY);
-    if (index_array_mode)         glEnableClientState (GL_INDEX_ARRAY);
-    if (normal_array_mode)        glEnableClientState (GL_NORMAL_ARRAY);
-    if (texture_coord_array_mode) glEnableClientState (GL_TEXTURE_COORD_ARRAY);
-
-    glPopAttrib();
-  }
-
-  if (zbuff_state)
-    glEnable(GL_DEPTH_TEST);
-}
-
-// =======================================================================
-// function : DrawDegeneratesAsBBoxs
-// purpose  :
-// =======================================================================
-void OpenGl_PrimitiveArray::DrawDegeneratesAsBBoxs (const TEL_COLOUR* theEdgeColour) const
-{
-  GLfloat minp[3] = { FLT_MAX, FLT_MAX, FLT_MAX };
-  GLfloat maxp[3] = { FLT_MIN, FLT_MIN, FLT_MIN };
-  tel_point pv = myPArray->vertices;
-
-  glDisable (GL_LIGHTING);
-
-  glColor3fv (theEdgeColour->rgb);
-
-  for (Tint i = 0; i < myPArray->num_vertexs; ++i)
-  {
-    if (pv[i].xyz[0] < minp[0])
-      minp[0] = pv[i].xyz[0];
-    if (pv[i].xyz[1] < minp[1])
-      minp[1] = pv[i].xyz[1];
-    if (pv[i].xyz[2] < minp[2])
-      minp[2] = pv[i].xyz[2];
-
-    if (pv[i].xyz[0] > maxp[0])
-      maxp[0] = pv[i].xyz[0];
-    if (pv[i].xyz[1] > maxp[1])
-      maxp[1] = pv[i].xyz[1];
-    if (pv[i].xyz[2] > maxp[2])
-      maxp[2] = pv[i].xyz[2];
-  }
-
-  glBegin (GL_LINE_STRIP);
-
-  glVertex3fv (minp);
-  glVertex3f (minp[0], maxp[1], minp[2]);
-  glVertex3f (minp[0], maxp[1], maxp[2]);
-  glVertex3f (minp[0], minp[1], maxp[2]);
-  glVertex3f (minp[0], minp[1], minp[2]);
-
-  glVertex3f (maxp[0], minp[1], minp[2]);
-  glVertex3f (maxp[0], maxp[1], minp[2]);
-  glVertex3f (maxp[0], maxp[1], maxp[2]);
-  glVertex3f (maxp[0], minp[1], maxp[2]);
-  glVertex3f (maxp[0], minp[1], minp[2]);
-
-  glVertex3f (maxp[0], minp[1], maxp[2]);
-  glVertex3f (minp[0], minp[1], maxp[2]);
-  glVertex3f (minp[0], maxp[1], maxp[2]);
-  glVertex3fv (maxp);
-  glVertex3f (maxp[0], maxp[1], minp[2]);
-  glVertex3f (minp[0], maxp[1], minp[2]);
-
-  glEnd();
-}
-
 // =======================================================================
 // function : OpenGl_PrimitiveArray
 // purpose  :
@@ -1578,7 +603,6 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace
     myIsVboInit = Standard_True;
   }
 
-  Standard_Boolean toDisableTexture = Standard_False;
   switch (myPArray->type)
   {
     case TelPointsArrayType:
@@ -1586,45 +610,15 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace
     case TelSegmentsArrayType:
     {
       glDisable (GL_LIGHTING);
-
-      if ((theWorkspace->NamedStatus & OPENGL_NS_ANIMATION) != 0 &&
-          (theWorkspace->NamedStatus & OPENGL_NS_WIREFRAME) == 0 &&
-           theWorkspace->DegenerateModel)
-      {
-        glDisable (GL_DEPTH_TEST);
-        toDisableTexture = (theWorkspace->NamedStatus & OPENGL_NS_TEXTURE);
-        theWorkspace->NamedStatus |= OPENGL_NS_WIREFRAME;
-      }
-      break;
-    }
-    case TelPolygonsArrayType:
-    case TelTrianglesArrayType:
-    case TelQuadranglesArrayType:
-    case TelTriangleStripsArrayType:
-    case TelTriangleFansArrayType:
-    case TelQuadrangleStripsArrayType:
-    {
-      if ((theWorkspace->NamedStatus & OPENGL_NS_ANIMATION) != 0 &&
-          (theWorkspace->NamedStatus & OPENGL_NS_WIREFRAME) != 0 &&
-           theWorkspace->DegenerateModel < 2)
-      {
-        glEnable (GL_DEPTH_TEST);
-        theWorkspace->NamedStatus &= ~OPENGL_NS_WIREFRAME;
-      }
       break;
     }
     default:
       break;
   }
 
-  Handle(OpenGl_Texture) aPrevTexture;
   const OpenGl_AspectFace*   anAspectFace   = theWorkspace->AspectFace   (Standard_True);
   const OpenGl_AspectLine*   anAspectLine   = theWorkspace->AspectLine   (Standard_True);
   const OpenGl_AspectMarker* anAspectMarker = theWorkspace->AspectMarker (myPArray->type == TelPointsArrayType);
-  if (toDisableTexture)
-  {
-    aPrevTexture = theWorkspace->DisableTexture();
-  }
 
   Tint aFrontLightingModel = anAspectFace->IntFront.color_mask;
   const TEL_COLOUR* anInteriorColor = &anAspectFace->IntFront.matcol;
@@ -1646,9 +640,4 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace
              anEdgeColor,
              &anAspectFace->IntFront,
              theWorkspace);
-
-  if (!aPrevTexture.IsNull())
-  {
-    theWorkspace->EnableTexture (aPrevTexture);
-  }
 }
index 0e9c545..1a314e3 100644 (file)
@@ -76,26 +76,6 @@ private:
   void DrawEdges (const TEL_COLOUR*               theEdgeColour,
                   const Handle(OpenGl_Workspace)& theWorkspace) const;
 
-  void DrawDegeneratesAsPoints (const TEL_COLOUR* theEdgeColour,
-                                const float       theSkipRatio) const;
-  void DrawDegeneratesAsLines (const TEL_COLOUR*               theEdgeColour,
-                               const Handle(OpenGl_Workspace)& theWorkspace) const;
-  void DrawDegeneratesAsBBoxs (const TEL_COLOUR* theEdgeColour) const;
-
-  void DrawDegeneratesPointsAsPoints() const;
-  void DrawDegeneratesLinesAsPoints() const;
-  void DrawDegeneratesLinesAsLines (const float theSkipRatio) const;
-  void DrawDegeneratesTrianglesAsPoints() const;
-  void DrawDegeneratesTrianglesAsLines (const float theSkipRatio) const;
-  void DrawDegeneratesTrianglestripsAsPoints() const;
-  void DrawDegeneratesTrianglestripsAsLines (const float theSkipRatio) const;
-  void DrawDegeneratesQuadranglesAsPoints() const;
-  void DrawDegeneratesQuadranglesAsLines (const float theSkipRatio) const;
-  void DrawDegeneratesQuadranglestripsAsPoints() const;
-  void DrawDegeneratesQuadranglestripsAsLines (const float theSkipRatio) const;
-  void DrawDegeneratesPolygonsAsPoints() const;
-  void DrawDegeneratesPolygonsAsLines (const float theSkipRatio) const;
-
 protected:
 
   //! Destructor
index 5db8005..8ef32fc 100644 (file)
@@ -45,7 +45,6 @@ static void call_util_transpose_mat (float tmat[16], float mat[4][4])
 OpenGl_Structure::OpenGl_Structure ()
 : myTransformation(NULL),
   myTransPers(NULL),
-  myDegenerateModel(NULL),
   myAspectLine(NULL),
   myAspectFace(NULL),
   myAspectMarker(NULL),
@@ -64,7 +63,6 @@ OpenGl_Structure::~OpenGl_Structure()
   Release (Handle(OpenGl_Context)());
   delete myTransformation;  myTransformation  = NULL;
   delete myTransPers;       myTransPers       = NULL;
-  delete myDegenerateModel; myDegenerateModel = NULL;
 }
 
 /*----------------------------------------------------------------------*/
@@ -92,17 +90,6 @@ void OpenGl_Structure::SetTransformPersistence(const CALL_DEF_TRANSFORM_PERSISTE
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_Structure::SetDegenerateModel (const Standard_Integer AMode, const float ASkipRatio)
-{
-  if (!myDegenerateModel)
-    myDegenerateModel = new DEGENERATION;
-
-  myDegenerateModel->mode = AMode;
-  myDegenerateModel->skipRatio = ASkipRatio;
-}
-
-/*----------------------------------------------------------------------*/
-
 void OpenGl_Structure::SetAspectLine (const CALL_DEF_CONTEXTLINE &AContext)
 {
   if (!myAspectLine)
@@ -340,26 +327,6 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &AWorkspace) const
     trans_pers = AWorkspace->ActiveView()->BeginTransformPersistence( myTransPers );
   }
 
-  // Apply degeneration
-  if (myDegenerateModel)
-  {
-    if ( AWorkspace->NamedStatus & OPENGL_NS_DEGENERATION )
-    {
-      AWorkspace->DegenerateModel = myDegenerateModel->mode;
-      switch ( AWorkspace->DegenerateModel )
-      {
-        case 0: break;
-
-        default:
-          glLineWidth ( 1.0 );
-          glDisable   ( GL_LINE_STIPPLE );
-
-        case 1:
-          AWorkspace->SkipRatio = myDegenerateModel->skipRatio;
-      }
-    }
-  }
-
   // Apply aspects
   const OpenGl_AspectLine *aspect_line = AWorkspace->AspectLine(Standard_False);
   const OpenGl_AspectFace *aspect_face = AWorkspace->AspectFace(Standard_False);
index 5b1f513..a2d7eaf 100644 (file)
@@ -47,8 +47,6 @@ public:
 
   void SetTransformPersistence (const CALL_DEF_TRANSFORM_PERSISTENCE &ATransPers);
 
-  void SetDegenerateModel (const Standard_Integer AMode, const float ASkipRatio);
-
   void SetAspectLine (const CALL_DEF_CONTEXTLINE &AContext);
   void SetAspectFace (const Handle(OpenGl_Context)&   theCtx,
                       const CALL_DEF_CONTEXTFILLAREA& theAspect);
@@ -103,7 +101,6 @@ protected:
   //Structure_LABBegin
   OpenGl_Matrix*             myTransformation;
   TEL_TRANSFORM_PERSISTENCE* myTransPers;
-  DEGENERATION*              myDegenerateModel;
   OpenGl_AspectLine*         myAspectLine;
   OpenGl_AspectFace*         myAspectFace;
   OpenGl_AspectMarker*       myAspectMarker;
index cc89d9b..2e873be 100644 (file)
@@ -382,11 +382,6 @@ void OpenGl_Text::StringSize (const Handle(OpenGl_Context)& theCtx,
 // =======================================================================
 void OpenGl_Text::Render (const Handle(OpenGl_Workspace)& theWorkspace) const
 {
-  if (theWorkspace->DegenerateModel > 0 && theWorkspace->SkipRatio >= 1.0f)
-  {
-    return;
-  }
-
   const OpenGl_AspectText* aTextAspect = theWorkspace->AspectText (Standard_True);
   const Handle(OpenGl_Texture) aPrevTexture = theWorkspace->DisableTexture();
 
index 9eae330..93607bc 100644 (file)
@@ -100,11 +100,8 @@ OpenGl_View::OpenGl_View (const CALL_DEF_VIEWCONTEXT &AContext)
   myVisualization(AContext.Visualization),
   myIntShadingMethod(TEL_SM_GOURAUD),
   myAntiAliasing(Standard_False),
-  myAnimationListIndex(0),
-  myAnimationListReady(Standard_False),
   myTransPers(&myDefaultTransPers),
-  myIsTransPers(Standard_False),
-  myResetFLIST(Standard_False)
+  myIsTransPers(Standard_False)
 {
   // Initialize matrices
   memcpy(myOrientationMatrix,myDefaultMatrix,sizeof(Tmatrix3));
@@ -144,11 +141,6 @@ void OpenGl_View::ReleaseGlResources (const Handle(OpenGl_Context)& theCtx)
     glDeleteTextures (1, (GLuint*)&(myBgTexture.TexId));
     myBgTexture.TexId = 0;
   }
-  if (myAnimationListIndex)
-  {
-    glDeleteLists ((GLuint )myAnimationListIndex, 1);
-    myAnimationListIndex = 0;
-  }
 }
 
 void OpenGl_View::SetTextureEnv (const Handle(OpenGl_Context)&       theCtx,
@@ -172,10 +164,9 @@ void OpenGl_View::SetTextureEnv (const Handle(OpenGl_Context)&       theCtx,
 
 /*----------------------------------------------------------------------*/
 
-void OpenGl_View::SetBackfacing (const Standard_Integer AMode)
+void OpenGl_View::SetBackfacing (const Standard_Integer theMode)
 {
-  myBackfacing = AMode;
-  myResetFLIST = Standard_True;
+  myBackfacing = theMode;
 }
 
 /*----------------------------------------------------------------------*/
index a70b81b..9598f65 100644 (file)
@@ -246,14 +246,9 @@ public:
 
   OpenGl_LayerList myZLayers;
 
-  int myAnimationListIndex;
-  Standard_Boolean myAnimationListReady;
-
   const TEL_TRANSFORM_PERSISTENCE *myTransPers;
   Standard_Boolean myIsTransPers;
 
-  Standard_Boolean myResetFLIST;
-
  public:
   DEFINE_STANDARD_ALLOC
 };
index d37385f..28b0be2 100644 (file)
@@ -637,13 +637,6 @@ void OpenGl_View::Render (const Handle(OpenGl_PrinterContext)& thePrintContext,
                           const Aspect_CLayer2d& ACUnderLayer,
                           const Aspect_CLayer2d& ACOverLayer)
 {
-  // Reset FLIST status after modification of myBackfacing
-  if (myResetFLIST)
-  {
-    AWorkspace->NamedStatus &= ~OPENGL_NS_FLIST;
-    myResetFLIST = Standard_False;
-  }
-
   // Store and disable current clipping planes
   GLint maxplanes;
   glGetIntegerv(GL_MAX_CLIP_PLANES, &maxplanes);
@@ -1054,123 +1047,73 @@ D = -[Px,Py,Pz] dot |Nx|
       AWorkspace->NamedStatus &= ~OPENGL_NS_ANTIALIASING;
   }
 
-  Standard_Boolean isAnimationListOpen = Standard_False;
-
-  // Request for update of animation mode?
-  if ( (AWorkspace->NamedStatus & OPENGL_NS_UPDATEAM) != 0 )
-  {
-    // Request to rebuild display list
-    myAnimationListReady = Standard_False;
-    // Reset request for update of animation mode
-    AWorkspace->NamedStatus &= ~OPENGL_NS_UPDATEAM;
-  }
+  // Clear status bitfields
+  AWorkspace->NamedStatus &= ~(OPENGL_NS_2NDPASSNEED | OPENGL_NS_2NDPASSDO);
 
-  // Is in animation mode?
-  if ( AWorkspace->NamedStatus & OPENGL_NS_ANIMATION )
+  // Added PCT for handling of textures
+  switch (mySurfaceDetail)
   {
-    // Is the animation list ready?
-    if (myAnimationListReady)
-    {
-      // Execute the animation list
-      glCallList(myAnimationListIndex);
-    }
-    else
-    {
-      // Update the animation list
-      if ( AWorkspace->NamedStatus & OPENGL_NS_FLIST )
+    case Visual3d_TOD_NONE:
+      AWorkspace->NamedStatus |= OPENGL_NS_FORBIDSETTEX;
+      AWorkspace->DisableTexture();
+      // Render the view
+      RenderStructs(AWorkspace);
+      break;
+
+    case Visual3d_TOD_ENVIRONMENT:
+      AWorkspace->NamedStatus |= OPENGL_NS_FORBIDSETTEX;
+      AWorkspace->EnableTexture (myTextureEnv);
+      // Render the view
+      RenderStructs(AWorkspace);
+      AWorkspace->DisableTexture();
+      break;
+
+    case Visual3d_TOD_ALL:
+      // First pass
+      AWorkspace->NamedStatus &= ~OPENGL_NS_FORBIDSETTEX;
+      // Render the view
+      RenderStructs(AWorkspace);
+      AWorkspace->DisableTexture();
+
+      // Second pass
+      if (AWorkspace->NamedStatus & OPENGL_NS_2NDPASSNEED)
       {
-        if (myAnimationListIndex == 0)
-          myAnimationListIndex = glGenLists(1);
+        AWorkspace->NamedStatus |= OPENGL_NS_2NDPASSDO;
+        AWorkspace->EnableTexture (myTextureEnv);
 
-        if (myAnimationListIndex != 0)
-        {
-          glNewList(myAnimationListIndex, GL_COMPILE_AND_EXECUTE);
-          isAnimationListOpen = Standard_True;
-        }
-      }
-      else
-        AWorkspace->NamedStatus |= OPENGL_NS_FLIST;
-    }
-  }
-  else
-    myAnimationListReady = Standard_False;
+        /* sauvegarde de quelques parametres OpenGL */
+        GLint blend_dst, blend_src;
+        GLint zbuff_f;
+        GLboolean zbuff_w;
+        glGetBooleanv(GL_DEPTH_WRITEMASK, &zbuff_w);
+        glGetIntegerv(GL_DEPTH_FUNC, &zbuff_f);
+        glGetIntegerv(GL_BLEND_DST, &blend_dst);
+        glGetIntegerv(GL_BLEND_SRC, &blend_src);
+        GLboolean zbuff_state = glIsEnabled(GL_DEPTH_TEST);
+        GLboolean blend_state = glIsEnabled(GL_BLEND);
 
-  if (!myAnimationListReady)
-  {
-    // Clear status bitfields
-    AWorkspace->NamedStatus &= ~(OPENGL_NS_2NDPASSNEED | OPENGL_NS_2NDPASSDO);
+        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+        glEnable(GL_BLEND);
 
-    // Added PCT for handling of textures
-    switch (mySurfaceDetail)
-    {
-      case Visual3d_TOD_NONE:
-        AWorkspace->NamedStatus |= OPENGL_NS_FORBIDSETTEX;
-        AWorkspace->DisableTexture();
-        // Render the view
-        RenderStructs(AWorkspace);
-        break;
+        glDepthFunc(GL_EQUAL);
+        glDepthMask(GL_FALSE);
+        glEnable(GL_DEPTH_TEST);
 
-      case Visual3d_TOD_ENVIRONMENT:
         AWorkspace->NamedStatus |= OPENGL_NS_FORBIDSETTEX;
-        AWorkspace->EnableTexture (myTextureEnv);
-        // Render the view
-        RenderStructs(AWorkspace);
-        AWorkspace->DisableTexture();
-        break;
 
-      case Visual3d_TOD_ALL:
-        // First pass
-        AWorkspace->NamedStatus &= ~OPENGL_NS_FORBIDSETTEX;
         // Render the view
         RenderStructs(AWorkspace);
         AWorkspace->DisableTexture();
 
-        // Second pass
-        if (AWorkspace->NamedStatus & OPENGL_NS_2NDPASSNEED)
-        {
-          AWorkspace->NamedStatus |= OPENGL_NS_2NDPASSDO;
-          AWorkspace->EnableTexture (myTextureEnv);
-
-          /* sauvegarde de quelques parametres OpenGL */
-          GLint blend_dst, blend_src;
-          GLint zbuff_f;
-          GLboolean zbuff_w;
-          glGetBooleanv(GL_DEPTH_WRITEMASK, &zbuff_w);
-          glGetIntegerv(GL_DEPTH_FUNC, &zbuff_f);
-          glGetIntegerv(GL_BLEND_DST, &blend_dst);
-          glGetIntegerv(GL_BLEND_SRC, &blend_src);
-          GLboolean zbuff_state = glIsEnabled(GL_DEPTH_TEST);
-          GLboolean blend_state = glIsEnabled(GL_BLEND);
-
-          glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-          glEnable(GL_BLEND);
-
-          glDepthFunc(GL_EQUAL);
-          glDepthMask(GL_FALSE);
-          glEnable(GL_DEPTH_TEST);
-
-          AWorkspace->NamedStatus |= OPENGL_NS_FORBIDSETTEX;
-
-          // Render the view
-          RenderStructs(AWorkspace);
-          AWorkspace->DisableTexture();
-
-          /* restauration des parametres OpenGL */
-          glBlendFunc(blend_src, blend_dst);
-          if (!blend_state) glDisable(GL_BLEND);
-
-          glDepthFunc(zbuff_f);
-          glDepthMask(zbuff_w);
-          if (!zbuff_state) glDisable(GL_DEPTH_FUNC);
-        }
-        break;
-    }
+        /* restauration des parametres OpenGL */
+        glBlendFunc(blend_src, blend_dst);
+        if (!blend_state) glDisable(GL_BLEND);
 
-    if (isAnimationListOpen)
-    {
-      glEndList();
-      myAnimationListReady = Standard_True;
-    }
+        glDepthFunc(zbuff_f);
+        glDepthMask(zbuff_w);
+        if (!zbuff_state) glDisable(GL_DEPTH_FUNC);
+      }
+      break;
   }
 
   // Resetting GL parameters according to the default aspects
@@ -1265,14 +1208,7 @@ void OpenGl_View::RenderStructs (const Handle(OpenGl_Workspace) &AWorkspace)
   myZLayers.Render (AWorkspace);
 
   //TsmPopAttri(); /* restore previous graphics context; before update lights */
-
-  if ( AWorkspace->DegenerateModel > 1 )
-  {
-    glLineWidth ( aspect_line->Width() );
-    if ( aspect_line->Type() != Aspect_TOL_SOLID ) glEnable ( GL_LINE_STIPPLE );
-  }
-
-  glPopAttrib ();
+  glPopAttrib();
 }
 
 /*----------------------------------------------------------------------*/
index cee0ed4..10ec9d5 100644 (file)
@@ -73,8 +73,6 @@ OpenGl_Workspace::OpenGl_Workspace (const Handle(OpenGl_Display)& theDisplay,
                                     const Handle(OpenGl_Context)& theShareCtx)
 : OpenGl_Window (theDisplay, theCWindow, theGContext, theShareCtx),
   NamedStatus (0),
-  DegenerateModel (0),
-  SkipRatio (0.F),
   HighlightColor (&myDefaultHighlightColor),
   //
   myIsTransientOpen (Standard_False),
@@ -146,8 +144,6 @@ Standard_Boolean OpenGl_Workspace::Activate()
   if (!OpenGl_Window::Activate())
     return Standard_False;
 
-  DegenerateModel         = 0;
-  SkipRatio               = 0.0f;
   ViewMatrix_applied      = &myDefaultMatrix;
   StructureMatrix_applied = &myDefaultMatrix;
 
@@ -162,11 +158,7 @@ Standard_Boolean OpenGl_Workspace::Activate()
 // =======================================================================
 void OpenGl_Workspace::UseTransparency (const Standard_Boolean theFlag)
 {
-  if ((myUseTransparency ? 1 : 0) != (theFlag ? 1 : 0))
-  {
-    myUseTransparency = theFlag;
-    EraseAnimation();
-  }
+  myUseTransparency = theFlag;
 }
 
 //=======================================================================
index 57b1bd2..b0c06d0 100644 (file)
@@ -110,12 +110,6 @@ public:
 
   void DisplayCallback (const Graphic3d_CView& theCView, int theReason);
 
-  // szvgl: defined in OpenGl_Workspace_1.cxx
-  void BeginAnimation (const Standard_Boolean theUseDegeneration,
-                       const Standard_Boolean theUpdateAM);
-  void EndAnimation();
-  void EraseAnimation();
-
   Standard_Boolean SetImmediateModeDrawToFront (const Standard_Boolean theDrawToFrontBuffer);
   Standard_Boolean BeginAddMode();
   void EndAddMode();
@@ -143,9 +137,6 @@ public:
 
   Standard_Integer   NamedStatus;
 
-  Standard_Integer   DegenerateModel;
-  Standard_ShortReal SkipRatio;
-
   const TEL_COLOUR* HighlightColor;
 
   const OpenGl_Matrix* SetViewMatrix (const OpenGl_Matrix* );
diff --git a/src/OpenGl/OpenGl_Workspace_1.cxx b/src/OpenGl/OpenGl_Workspace_1.cxx
deleted file mode 100644 (file)
index afe38ef..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// Created on: 2011-09-20
-// Created by: Sergey ZERCHANINOV
-// Copyright (c) 2011-2012 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
-//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-
-#include <OpenGl_Workspace.hxx>
-
-//call_togl_begin_animation
-void OpenGl_Workspace::BeginAnimation (const Standard_Boolean UseDegeneration, const Standard_Boolean UpdateAM)
-{
-  NamedStatus   |= OPENGL_NS_ANIMATION;
-  if (UseDegeneration)
-    NamedStatus |= OPENGL_NS_DEGENERATION;
-  else
-    NamedStatus &= ~OPENGL_NS_DEGENERATION;
-  if (UpdateAM)
-    NamedStatus |= OPENGL_NS_UPDATEAM;
-  else
-    NamedStatus &= ~OPENGL_NS_UPDATEAM;
-  NamedStatus &= ~OPENGL_NS_FLIST;
-}
-
-/*----------------------------------------------------------------------*/
-
-//call_togl_end_animation
-void OpenGl_Workspace::EndAnimation ()
-{
-  if( (NamedStatus & OPENGL_NS_ANIMATION) == 0 ) return;
-
-  NamedStatus &= ~(OPENGL_NS_ANIMATION | OPENGL_NS_DEGENERATION | OPENGL_NS_UPDATEAM);
-}
-
-/*----------------------------------------------------------------------*/
-/*
-* Permet de terminer effectivement le mode Animation.
-* Ceci est realise des qu'une structure a ete modifiee.
-*/
-
-//call_togl_erase_animation_mode
-void OpenGl_Workspace::EraseAnimation ()
-{
-  NamedStatus &= ~(OPENGL_NS_ANIMATION | OPENGL_NS_DEGENERATION | OPENGL_NS_UPDATEAM | OPENGL_NS_FLIST);
-}
-
-/*----------------------------------------------------------------------*/
index 273ad4a..03a3ca1 100644 (file)
@@ -87,7 +87,6 @@ void OpenGl_Workspace::ClearImmediatMode (const Graphic3d_CView& theCView,
   glGetBooleanv (GL_DOUBLEBUFFER, &isDoubleBuffer);
   if (!myBackBufferRestored || !myTransientDrawToFront || !isDoubleBuffer)
   {
-    EraseAnimation();
     Redraw1 (theCView, *((CALL_DEF_LAYER* )theCView.ptrUnderLayer), *((CALL_DEF_LAYER* )theCView.ptrOverLayer), theToFlush);
 
     // After a redraw,
index ef13b76..0126a31 100644 (file)
@@ -428,13 +428,9 @@ const OpenGl_Matrix * OpenGl_Workspace::SetViewMatrix(const OpenGl_Matrix *AMatr
   OpenGl_Transposemat3( &lmat, StructureMatrix_applied );
 
   glMatrixMode (GL_MODELVIEW);
-
-  if ( (NamedStatus & OPENGL_NS_ANIMATION) == 0 )
-  {
-    OpenGl_Matrix rmat;
-    OpenGl_Multiplymat3( &rmat, &lmat, ViewMatrix_applied );
-    glLoadMatrixf((const GLfloat *) rmat.mat);
-  }
+  OpenGl_Matrix rmat;
+  OpenGl_Multiplymat3 (&rmat, &lmat, ViewMatrix_applied);
+  glLoadMatrixf ((const GLfloat* )rmat.mat);
 
   return ViewMatrix_old;
 }
@@ -450,17 +446,9 @@ const OpenGl_Matrix * OpenGl_Workspace::SetStructureMatrix(const OpenGl_Matrix *
   OpenGl_Transposemat3( &lmat, AMatrix );
 
   glMatrixMode (GL_MODELVIEW);
-
-  if ( (NamedStatus & OPENGL_NS_ANIMATION) == 0 )
-  {
-    OpenGl_Matrix rmat;
-    OpenGl_Multiplymat3( &rmat, &lmat, ViewMatrix_applied );
-    glLoadMatrixf((const GLfloat *) rmat.mat);
-  }
-  else
-  {
-    glMultMatrixf((const GLfloat *) lmat.mat);
-  }
+  OpenGl_Matrix rmat;
+  OpenGl_Multiplymat3 (&rmat, &lmat, ViewMatrix_applied);
+  glLoadMatrixf ((const GLfloat* )rmat.mat);
 
   return StructureMatrix_old;
 }
index 8dbdddd..6af7e65 100755 (executable)
@@ -34,7 +34,6 @@ xx-xx-xx : xxx ; Creation.
 23-12-97 : FMN ; Suppression TelBackInteriorStyle, TelBackInteriorStyleIndex
 et TelBackInteriorShadingMethod
 30-11-98 : FMN ; S3819 : Textes toujours visibles
-21-09-99 : EUG : G003 : Degeneration management
 16-06-00 : ATS,SPK : G005 : Group of new primitives: TelParray
 22-03-04 : SAN : OCC4895 High-level interface for controlling polygon offsets
 
@@ -107,7 +106,6 @@ typedef  enum
   TelTextStyle,
   TelTextDisplayType, 
   TelTextColourSubTitle, 
-  TelDegenerationMode,
   TelTextZoomable,//Text Zoomable attributes
   TelTextAngle,//Text Angle attributes
   TelTextFontAspect,//Text Font Aspect attributes 
index 649e5a4..9063d6f 100755 (executable)
@@ -567,9 +567,10 @@ static Standard_Integer OCC280 (Draw_Interpretor& di, Standard_Integer argc, con
   ViewerTest::UnsetEventManager();
   ViewerTest::SetEventManager (new ViewerTest_EventManager (aNewView, ViewerTest::GetAISContext()));
 
-  if (HLR == 1) {
-    di << "HLR" << "\n";
-    aNewView->SetDegenerateModeOff();
+  if (HLR == 1)
+  {
+    di << "HLR\n";
+    aNewView->SetComputedMode (Standard_True);
   }
 
   return 0;
index 7ccfefe..16daf09 100755 (executable)
 
 #include <BRepPrimAPI_MakeBox.hxx>
 
-static Standard_Integer BUC60753 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if(argc!=3)
-  {
-    di << "Usage : " << argv[0] << " mode (0 <=mode<=5) ratio (0.0<=ration<=1.0)" <<"\n";
-    return -1;
-  }
-
-  Handle(AIS_InteractiveContext) myAISContext = ViewerTest::GetAISContext();
-  if(myAISContext.IsNull()) {
-    di << "use 'vinit' command before " << argv[0] << "\n";
-    return 1;
-  }
-           
-  Standard_Real Alpha = M_PI/10.;
-  Standard_Real CosAlpha = Cos (Alpha);
-  Standard_Real SinAlpha = Sin (Alpha);
-  Standard_Real MoinsCosAlpha = Cos (-Alpha);
-  Standard_Real MoinsSinAlpha = Sin (-Alpha);
-  TColStd_Array2OfReal TrsfI (0, 3, 0, 3);
-  TColStd_Array2OfReal TrsfX (0, 3, 0, 3);
-  TColStd_Array2OfReal TrsfY (0, 3, 0, 3);
-  TColStd_Array2OfReal TrsfZ (0, 3, 0, 3);
-  TColStd_Array2OfReal Trsfx (0, 3, 0, 3);
-  TColStd_Array2OfReal Trsfy (0, 3, 0, 3);
-  TColStd_Array2OfReal Trsfz (0, 3, 0, 3);
-  Standard_Integer i,j;
-  for (i=0; i<=3; i++)
-    for (j=0; j<=3; j++)
-      if (i == j) { 
-       TrsfX.SetValue (i, j, 1.0);
-       TrsfY.SetValue (i, j, 1.0);
-       TrsfZ.SetValue (i, j, 1.0);
-       Trsfx.SetValue (i, j, 1.0);
-       Trsfy.SetValue (i, j, 1.0);
-       Trsfz.SetValue (i, j, 1.0);
-       TrsfI.SetValue (i, j, 1.0);
-      } else { 
-       TrsfX.SetValue (i, j, 0.0);
-       TrsfY.SetValue (i, j, 0.0);
-       TrsfZ.SetValue (i, j, 0.0);
-       Trsfx.SetValue (i, j, 0.0);
-       Trsfy.SetValue (i, j, 0.0);
-       Trsfz.SetValue (i, j, 0.0);
-       TrsfI.SetValue (i, j, 0.0);
-      }
-       
-  // Rotation Alpha autour de l'axe X
-  TrsfX.SetValue (1, 1, CosAlpha);
-  TrsfX.SetValue (2, 2, CosAlpha);
-  TrsfX.SetValue (1, 2, -SinAlpha);
-  TrsfX.SetValue (2, 1, SinAlpha);
-  
-  // Rotation Alpha autour de l'axe Y
-  TrsfY.SetValue (0, 0, CosAlpha);
-  TrsfY.SetValue (2, 2, CosAlpha);
-  TrsfY.SetValue (0, 2, SinAlpha);
-  TrsfY.SetValue (2, 0, -SinAlpha);
-  
-  // Rotation Alpha autour de l'axe Z
-  TrsfZ.SetValue (0, 0, CosAlpha);
-  TrsfZ.SetValue (1, 1, CosAlpha);
-  TrsfZ.SetValue (0, 1, -SinAlpha);
-  TrsfZ.SetValue (1, 0, SinAlpha);
-  
-  // Rotation -Alpha autour de l'axe X
-  Trsfx.SetValue (1, 1, MoinsCosAlpha);
-  Trsfx.SetValue (2, 2, MoinsCosAlpha);
-  Trsfx.SetValue (1, 2, -MoinsSinAlpha);
-  Trsfx.SetValue (2, 1, MoinsSinAlpha);
-  
-  // Rotation -Alpha autour de l'axe Y
-  Trsfy.SetValue (0, 0, MoinsCosAlpha);
-  Trsfy.SetValue (2, 2, MoinsCosAlpha);
-  Trsfy.SetValue (0, 2, MoinsSinAlpha);
-       Trsfy.SetValue (2, 0, -MoinsSinAlpha);
-  
-  // Rotation -Alpha autour de l'axe Z
-  Trsfz.SetValue (0, 0, MoinsCosAlpha);
-  Trsfz.SetValue (1, 1, MoinsCosAlpha);
-  Trsfz.SetValue (0, 1, -MoinsSinAlpha);
-  Trsfz.SetValue (1, 0, MoinsSinAlpha);
-  
-  Handle(V3d_View) myV3dView = ViewerTest::CurrentView();
-  
-  myV3dView->SetAnimationMode(Standard_True,Standard_True);
-  myAISContext-> SetDegenerateModel((Aspect_TypeOfDegenerateModel) Draw::Atoi(argv[1]),Draw::Atof(argv[2]));
-  
-//               Timer.Reset ();
-//               Timer.Start ();
-  myV3dView->SetAnimationModeOn();
-  myV3dView->SetComputedMode ( Standard_False );
-  for (i=0;i<40;i++) {
-    myV3dView->View()->SetTransform (Trsfz);
-    myV3dView->View()->Update ();
-  }
-  myV3dView->SetAnimationModeOff();
-//               Timer.Stop ();
-//               Timer.Show (cout);   
-
-  return 0;
-}
-
 static Standard_Integer  OCC162 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
 {
   if ( argc != 2 ) {
@@ -260,7 +157,6 @@ static Standard_Integer OCC1651 (Draw_Interpretor& di, Standard_Integer argc, co
 void QABugs::Commands_8(Draw_Interpretor& theCommands) {
   const char *group = "QABugs";
 
-  theCommands.Add("BUC60753", "BUC60753 mode ratio", __FILE__, BUC60753, group);
   theCommands.Add("OCC162", "OCC162 name", __FILE__, OCC162, group);
   theCommands.Add("OCC172", "OCC172", __FILE__, OCC172, group);
   theCommands.Add("OCC204", "OCC204 updateviewer=0/1", __FILE__, OCC204, group);
index 0605918..5a6a2b1 100755 (executable)
 --              -> Add ConvertToGrid() methods,
 --                 the Compute() internal method become private.
 --              -> Add SetProjModel() method.
---      EUG - 25/01/00 : G003
---              -> Add methods SetAnimationMode() and
---                  AnimationMode()
---              -> Add methods SetComputedMode() and
---                  ComputedMode()
---                 Warning : SetDegenerateModeOn() and Off()
---                 become obsolete.
---              -> Add methods SetBackFacingModel() and
---                  BackFacingModel()
 --      VKH - 15/11/99 : G004
 --              -> Add method Dump()
 --      GG  - IMP210200
@@ -1427,78 +1418,6 @@ is
         --
                 returns Boolean from Standard;
 
-        ---------------------------------------------------
-        -- Category: Methods to modify the class definition
-        --           Animation Mode
-        ---------------------------------------------------
-
-        SetAnimationModeOn ( me : mutable )
-                is static;
-        ---Level: Advanced
-        ---Purpose: Activates animation mode.
-        --      When the animation mode is activated in the view,
-        --      all Graphic3d_Structure are stored in a graphic object.
-        ---Category: Methods to modify the class definition
-
-        SetAnimationModeOff ( me        : mutable )
-                is static;
-        ---Level: Advanced
-        ---Purpose: Deactivates the animation mode.
-        ---Category: Methods to modify the class definition
-
-        AnimationModeIsOn ( me )
-                returns Boolean from Standard
-                is static;
-        ---Level: Advanced
-        ---Purpose: Returns the activity of the animation mode.
-        ---Category: Inquire methods
-
-        SetAnimationMode ( me                : mutable;
-                           anAnimationFlag   : Boolean from Standard = Standard_True;
-                           aDegenerationFlag : Boolean from Standard = Standard_False
-        ) is static;
-        ---Level    : Advanced
-        ---Purpose  : Enable/Disable animation/degeneration mode
-        ---Category : Methods to modify the class definition
-
-    AnimationMode ( me; isDegenerate: out Boolean from Standard )
-                returns Boolean from Standard
-                is static;
-        ---Level    : Advanced
-        ---Purpose  : Returns the animation and degenerate status.
-        ---Category: Inquire methods
-
-        ---------------------------------------------------
-        -- Category: Methods to modify the class definition
-        --           Degenerate Mode
-        ---------------------------------------------------
-
-        SetDegenerateModeOn ( me        : mutable )
-                is static;
-        ---Level    : Obsolete
-        ---Purpose: Activates degenerate mode.
-        --      When the degenerate mode is activated in the view,
-        --      all Graphic3d_Structure with the type TOS_COMPUTED
-        --      displayed in this view are not computed.
-    --  Warning: Obsolete method , use SetComputedMode()
-        ---Category: Methods to modify the class definition
-
-        SetDegenerateModeOff ( me       : mutable )
-                is static;
-        ---Level    : Obsolete
-        ---Purpose: Deactivates the degenerate mode.
-        --  Category: Methods to modify the class definition
-        --  Warning: if the computed mode has been disabled in the
-        --          viewer the mode will remain degenerated.
-    --  Warning: Obsolete method , use SetComputedMode()
-
-        DegenerateModeIsOn ( me )
-                returns Boolean from Standard
-                is static;
-        ---Level    : Obsolete
-        ---Purpose: Returns the activity of the degenerate mode.
-        ---Category: Inquire methods
-
         SetComputedMode ( me : mutable; aMode : Boolean from Standard )
         is static;
         ---Level: Advanced
@@ -1576,17 +1495,6 @@ is
         --          grid in <me>
         ---Category: Methods to modify the class definition
 
-        Tumble ( me            : mutable;
-                 NbImages      : Integer from Standard = 314;
-                 AnimationMode : Boolean from Standard = Standard_False )
-                returns Real from Standard
-                is static;
-        ---Level   : Advanced
-        ---Purpose: Animates the view <me>
-        --          Returns the number of images per second
-        --          if <AnimationMode> is Standard_True, the animation mode
-        --          is activated.
-
         Dump ( me: mutable;
                theFile       : CString from Standard;
                theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB )
@@ -1743,7 +1651,6 @@ fields
         MyGridEchoGroup                 :       Group from Graphic3d;
 
     MyProjModel         :   TypeOfProjectionModel from V3d is protected;
-    MyAnimationFlags        :   Integer from Standard;
 
     MyTransparencyFlag      : Boolean from Standard;
     myImmediateUpdate: Boolean from Standard is protected;
index d9d0f7e..8f2848d 100755 (executable)
@@ -96,14 +96,6 @@ To solve the problem (for lack of a better solution) I make 2 passes.
 //        (reported in the viewer)
 //      -> Add SetProjModel() methods.
 
-#define G003    //EUG 04-10-99
-//      -> computed mode management
-//         Add SetComputedMode(..) method
-//      -> animation mode management
-//         Add SetAnimationMode()
-//      -> backfacing management
-//         Add SetBackFacingModel() method
-
 #define G004    //VKH 15-11-99
 //      -> Add Dump() methods
 //      -> GG 07/03/00 Use the new MMSize()
@@ -179,15 +171,7 @@ To solve the problem (for lack of a better solution) I make 2 passes.
 #include <Aspect_FontMap.hxx>
 #include <TColStd_HSequenceOfInteger.hxx>
 
-#ifdef G003
-# define V3d_FLAG_ANIMATION     0x00000001
-# define V3d_FLAG_DEGENERATION  0x00000002
-# define V3d_FLAG_COMPUTATION   0x00000004
-#endif  // G003
-
-// Tumble
-#include <OSD_Timer.hxx>
-static OSD_Timer FullTimer;
+#define V3d_FLAG_COMPUTATION   0x00000004
 
 // Perspective
 #include <OSD_Environment.hxx>
@@ -377,10 +361,6 @@ MyProjModel(V3d_TPM_SCREEN)
 #ifndef IMP240100
 #endif  //IMP240100
 
-#ifdef G003
-  MyAnimationFlags = 0;
-#endif  // G003
-
 #ifdef IMP210200
   MyTransparencyFlag = Standard_False;
 #endif
@@ -423,10 +403,6 @@ MyProjModel(V3d_TPM_SCREEN)
   VM->AddView(this) ;
   Init();
   myImmediateUpdate = Standard_True;
-
-#ifdef G003
-  MyAnimationFlags = 0;
-#endif
 }
 
 /*----------------------------------------------------------------------*/
@@ -3085,103 +3061,6 @@ void V3d_View::Rotation(const Standard_Integer X,
 #endif
 }
 
-void V3d_View::SetAnimationModeOn () {
-#ifdef G003
-  if ( MyAnimationFlags & V3d_FLAG_ANIMATION ) {
-    if( ComputedMode() ) {  // Deactivates computed mode during animation
-      MyAnimationFlags |= V3d_FLAG_COMPUTATION;
-      Standard_Boolean immediatUpdate = myImmediateUpdate;
-      myImmediateUpdate = Standard_False;
-      SetComputedMode(Standard_False);
-      myImmediateUpdate = immediatUpdate;
-    }
-    MyView -> SetAnimationModeOn ( MyAnimationFlags & V3d_FLAG_DEGENERATION );
-  }
-#else
-  MyView->SetAnimationModeOn();
-#endif
-}
-
-void V3d_View::SetAnimationModeOff () {
-#ifdef G003
-  if ( MyAnimationFlags & V3d_FLAG_ANIMATION ) {
-    MyView -> SetAnimationModeOff ();
-    if ( MyAnimationFlags & V3d_FLAG_COMPUTATION ) {
-      // Reactivates computed mode after animation
-      MyAnimationFlags &= ~V3d_FLAG_COMPUTATION;
-      SetComputedMode(Standard_True);
-    } else if( MyAnimationFlags & V3d_FLAG_DEGENERATION ) {
-      Update();
-    }
-  }
-#else
-  MyView->SetAnimationModeOff();
-#endif
-}
-
-Standard_Boolean V3d_View::AnimationModeIsOn () const
-{
-  return MyView->AnimationModeIsOn();
-}
-
-#ifdef G003
-void V3d_View :: SetAnimationMode
-(
- const Standard_Boolean anAnimationFlag,
- const Standard_Boolean aDegenerationFlag
- )
-{
-  if ( anAnimationFlag )
-    MyAnimationFlags |= V3d_FLAG_ANIMATION;
-  else
-    MyAnimationFlags &= ~V3d_FLAG_ANIMATION;
-
-  if ( aDegenerationFlag )
-    MyAnimationFlags |= V3d_FLAG_DEGENERATION;
-  else
-    MyAnimationFlags &= ~V3d_FLAG_DEGENERATION;
-
-}  // end V3d_View :: SetAnimationMode
-
-Standard_Boolean V3d_View::AnimationMode( Standard_Boolean& isDegenerate ) const
-{
-  isDegenerate = MyAnimationFlags & V3d_FLAG_DEGENERATION;
-  return MyAnimationFlags & V3d_FLAG_ANIMATION;
-}
-#endif
-
-void V3d_View::SetDegenerateModeOn()
-{
-#ifdef G003
-  SetComputedMode(Standard_False);
-#else
-  MyView->SetDegenerateModeOn();
-  ImmediateUpdate();
-#endif
-}
-
-void V3d_View::SetDegenerateModeOff()
-{
-#ifdef G003
-  SetComputedMode(Standard_True);
-#else
-  if(myComputedMode) {
-    MyView->SetDegenerateModeOff();
-    ImmediateUpdate();
-  }
-#endif
-}
-
-Standard_Boolean V3d_View::DegenerateModeIsOn() const
-{
-#ifdef G003
-  return !ComputedMode();
-#else
-  return MyView->DegenerateModeIsOn();
-#endif
-}
-
-#ifdef G003
 void V3d_View :: SetComputedMode ( const Standard_Boolean aMode )
 {
   if( aMode ) {
@@ -3210,7 +3089,6 @@ V3d_TypeOfBackfacingModel V3d_View :: BackFacingModel () const
 {
   return V3d_TypeOfBackfacingModel(MyView -> BackFacingModel ());
 }
-#endif
 
 Standard_Boolean V3d_View::TransientManagerBeginDraw(const Standard_Boolean DoubleBuffer,const Standard_Boolean RetainMode) const
 {
@@ -3230,16 +3108,9 @@ Standard_Boolean V3d_View::TransientManagerBeginAddDraw() const
 void V3d_View::Init()
 {
   myComputedMode = MyViewer->ComputedMode();
-#ifdef G003
   if( !myComputedMode || !MyViewer->DefaultComputedMode() ) {
     SetComputedMode(Standard_False);
   }
-#else
-  if(!myComputedMode)
-    MyView->SetDegenerateModeOn();
-  else
-    if(!MyViewer->DefaultComputedMode()) MyView->SetDegenerateModeOn();
-#endif
 
 #ifdef IMP240100
   OSD_Environment env_walkthrow("CSF_WALKTHROUGH");
@@ -3260,42 +3131,6 @@ void V3d_View::Plot()
   MyView->Plot(MyPlotter);
 }
 
-Standard_Real V3d_View::Tumble (const Standard_Integer NbImages, const Standard_Boolean AnimationMode)
-{
-  FullTimer.Reset ();
-  FullTimer.Start ();
-
-  if (AnimationMode) MyView->SetAnimationModeOn();
-  Standard_Integer i;
-  Standard_Real delta = 0.01;
-  Standard_Real xangle, yangle;
-  xangle = yangle = delta*int(NbImages/3);
-
-  Rotate (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Standard_True);
-  for (i=1; i<=int(NbImages/3); i++)
-    Rotate (delta*i, 0.0, 0.0, 0.0, 0.0, 0.0, Standard_False);
-  for (i=1; i<=int(NbImages/3); i++)
-    Rotate (xangle, delta*i, 0.0, 0.0, 0.0, 0.0, Standard_False);
-  for (i=1; i<=int(NbImages/3); i++)
-    Rotate (xangle, yangle, delta*i, 0.0, 0.0, 0.0, Standard_False);
-  if (AnimationMode) MyView->SetAnimationModeOff();
-
-  FullTimer.Stop ();
-  cout << "For " << NbImages << " Images : " << endl;
-  FullTimer.Show (cout);
-  cout << flush;
-
-  Standard_Real Seconds, CPUtime;
-  Standard_Integer Minutes, Hours;
-
-  FullTimer.Show (Seconds, Minutes, Hours, CPUtime);
-  cout << "Result " << (AnimationMode ? "with " : "without ")
-    << "display list : " << NbImages/CPUtime << " images/Second."
-    << endl;
-
-  return NbImages/CPUtime;
-}
-
 #include <Aspect.hxx>
 #include <Visual3d_Layer.hxx>
 
index 764af74..02a9f7c 100755 (executable)
@@ -106,8 +106,6 @@ is
              --          This limitation might be addressed in some future OCCT releases.
         raises BadValue from V3d ;
         ---Purpose:        If the size of the view is <= 0
-        --      if ComputedMode is false, only the degenerate mode will be used.
-        --
         --  Warning: Client must creates a graphic driver
 
         CreateView (me: mutable) returns mutable View from V3d;
index 76e2e2d..6b5cf25 100755 (executable)
@@ -113,7 +113,6 @@ Handle(V3d_Viewer) ViewerTest_Tool::MakeViewer (const Standard_CString theTitle)
 
   // View
   Handle (V3d_View) V = a3DViewer->CreateView();
-  V->SetDegenerateModeOn();
   V->SetWindow(window);
   V->SetZClippingDepth(0.5);
   V->SetZClippingWidth(ZCLIPWIDTH/2.);
index 07c7b85..fb85961 100755 (executable)
@@ -129,7 +129,7 @@ static Handle(Graphic3d_GraphicDriver)& GetGraphicDriver()
   return aGraphicDriver;
 }
 
-static Standard_Boolean DegenerateMode = Standard_True;
+static Standard_Boolean MyHLRIsOn = Standard_False;
 
 #define ZCLIPWIDTH 1.
 
@@ -280,9 +280,6 @@ void ViewerTest::ViewerInit (const Standard_Integer thePxLeft,  const Standard_I
     a3DViewer->SetDefaultBackgroundColor(Quantity_NOC_BLACK);
 
     Handle (V3d_View) V = ViewerTest::CurrentView();
-
-    V->SetDegenerateModeOn();
-    DegenerateMode = V->DegenerateModeIsOn();
     //    V->SetWindow(VT_GetWindow(), NULL, MyViewProc, NULL);
 
     V->SetZClippingDepth(0.5);
@@ -352,10 +349,8 @@ void VT_ProcessKeyPress (const char* buf_ret)
   else if ( !strcasecmp(buf_ret, "H") ) {
     // HLR
     cout << "HLR" << endl;
-
-    if (aView->DegenerateModeIsOn()) ViewerTest::CurrentView()->SetDegenerateModeOff();
-    else aView->SetDegenerateModeOn();
-    DegenerateMode = aView->DegenerateModeIsOn();
+    aView->SetComputedMode (!aView->ComputedMode());
+    MyHLRIsOn = aView->ComputedMode();
   }
   else if ( !strcasecmp(buf_ret, "S") ) {
     // SHADING
@@ -557,7 +552,10 @@ void VT_ProcessButton1Release (Standard_Boolean theIsShift)
 void VT_ProcessButton3Press()
 {
   Start_Rot = 1;
-  ViewerTest::CurrentView()->SetDegenerateModeOn();
+  if (MyHLRIsOn)
+  {
+    ViewerTest::CurrentView()->SetComputedMode (Standard_False);
+  }
   ViewerTest::CurrentView()->StartRotation( X_ButtonPress, Y_ButtonPress );
 }
 
@@ -570,7 +568,10 @@ void VT_ProcessButton3Release()
   if (Start_Rot)
   {
     Start_Rot = 0;
-    if (!DegenerateMode) ViewerTest::CurrentView()->SetDegenerateModeOff();
+    if (MyHLRIsOn)
+    {
+      ViewerTest::CurrentView()->SetComputedMode (Standard_True);
+    }
   }
 }
 
index 21755f2..73a738f 100755 (executable)
@@ -29,7 +29,6 @@
 --              22-09-98; BGN: S3989 (anciennement S3819): report
 --                             dans Aspect des TypeOfTriedron*
 --      14-01-00; GG : IMP140100 Add ViewManager pointer
---      25-01-00; EUG: G003 Add backfacing model enum.
 -- Purpose: Specifications definitives
 
 package Visual3d
index fc7e549..fb6b0a6 100755 (executable)
 --             13-09-99: GG; GER61454 Adds LightLimit() and PlaneLimit() methods
 --             10-11-99: GG; Add PRO19603 Redraw( area ) method
 --             14-01-00: GG; Add IMP140100 ViewManager() method
---             25-01-00: EUG: G003
---                       -> Add backfacing management methods
---                            SetBackfacingModel() & BackfacingModel().
---                       -> Change SetAnimationModeIsOn() adding degenerate flag
---                       -> SetDegenerateModeOn() and Off() become private.
---                            Use instead SetComputedMode() for managing
---                             HLR in the view.
 --             THA  - 17/08/00 Thomas HARTL <t-hartl@muenchen.matra-dtv.fr>
 --                             -> Add Print methods (works only under Windows).-
 --             GG - RIC120302 Add NEW SetWindow method.
@@ -458,63 +451,6 @@ is
        --          orientation saved by the SetViewOrientationDefaut method.
        ---Category: Methods to modify the class definition
 
-       ---------------------------------------------------
-       -- Category: Methods to modify the class definition
-       --           Animation Mode
-       ---------------------------------------------------
-
-       SetAnimationModeOn ( me : mutable;
-               degenerate : Boolean from Standard = Standard_False )
-               is static;
-       ---Level: Advanced
-       ---Purpose: Activates animation mode with an optional degeneration
-       --      according to the TypeOfDegenerateModel of each graphic structure
-       --      When the animation mode is activated in the view,
-       --      all Graphic3d_Structure are stored in a graphic object.
-       --  Warning: only ONE view may have animation mode turned on
-       --      at same time.
-       ---Category: Methods to modify the class definition
-
-       SetAnimationModeOff ( me        : mutable )
-               is static;
-       ---Level: Advanced
-       ---Purpose: Deactivates the animation mode.
-       ---Category: Methods to modify the class definition
-
-       AnimationModeIsOn ( me )
-               returns Boolean from Standard
-               is static;
-       ---Level: Advanced
-       ---Purpose: Returns the activity of the animation mode.
-       ---Category: Inquire methods
-
-       ---------------------------------------------------
-       -- Category: Methods to modify the class definition
-       --           Degenerate Mode
-       ---------------------------------------------------
-
-       SetDegenerateModeOn ( me        : mutable )
-               is static private;
-       ---Level: Advanced
-       ---Purpose: Activates degenerate mode.
-       --      When the degenerate mode is activated in the view,
-       --      all Graphic3d_Structure with the type TOS_COMPUTED
-       --      displayed in this view are not computed.
-       ---Category: Methods to modify the class definition
-
-       SetDegenerateModeOff ( me       : mutable )
-               is static private;
-       ---Level: Advanced
-       ---Purpose: Deactivates the degenerate mode.
-       ---Category: Methods to modify the class definition
-
-       DegenerateModeIsOn ( me )
-               returns Boolean from Standard
-               is static;
-       ---Level: Advanced
-       ---Purpose: Returns the activity of the degenerate mode.
-       ---Category: Inquire methods
-
        SetComputedMode ( me : mutable; aMode : Boolean from Standard ) is static;
        ---Level: Advanced
        ---Purpose: Switches computed HLR mode in the view
index e667120..10b6f5b 100755 (executable)
@@ -48,7 +48,6 @@
       ??-11-97  : CAL ; Retrait de la dependance avec math. Calcul developpe.
       ??-11-97  : CAL ; Ajout de NumberOfDisplayedStructures
       07-08-97  : PCT ; ajout support texture mapping
-      05-01-98  : CAL ; Ajout de AnimationMode
       15-01-98  : FMN ; FRA60019 calcul Ratio pour MyViewMappingReset
       15-01-98  : CAL ; Ajout de la transformation d'une TOS_COMPUTED
       26-01-98  : CAL ; Ajout de la methode HaveTheSameOwner
@@ -85,9 +84,6 @@
 
 #define GER61454        //GG 14-09-99 Activates model clipping planes
 
-#define G003            //EUG 30-09-00 Degeneration management
-//                                     Backfacing management
-
 #define RIC120302       //GG Add a NEW SetWindow method which enable
 //                      to connect a graphic widget and context to OGL.
 
@@ -276,16 +272,9 @@ Standard_Real um, vm, uM, vM;
         MyMatOfMapIsEvaluated   = Standard_False;
         MyMatOfOriIsEvaluated   = Standard_False;
 
-        DegenerateModeIsActive  = Standard_False;
-        AnimationModeIsActive   = Standard_False;
-
         IsInitialized = Standard_False;
-#ifdef G003
-        MyCView.IsDegenerates     = 0;
-        MyCView.IsDegeneratesPrev = 0;
         ComputedModeIsActive      = Standard_False;
         MyCView.Backfacing        = 0;
-#endif  // G003
 
         MyCView.ptrUnderLayer = 0;
         MyCView.ptrOverLayer = 0;
@@ -415,12 +404,7 @@ Standard_Real um, vm, uM, vM;
         MyMatOfOriIsEvaluated   = Standard_False;
 
         IsInitialized = Standard_False;
-#ifdef G003
-        AnimationModeIsActive     = Standard_False;
-        MyCView.IsDegenerates     = 0;
-        MyCView.IsDegeneratesPrev = 0;
         ComputedModeIsActive      = Standard_False;
-#endif  // G003
 
         MyCView.ptrUnderLayer = 0;
         MyCView.ptrOverLayer = 0;
@@ -1935,11 +1919,7 @@ void Visual3d_View::ChangeDisplayPriority (const Handle(Graphic3d_Structure)& AS
         if (! IsDisplayed (AStructure)) return;
 
 Standard_Integer Index = IsComputed (AStructure);
-#ifdef G003
-        if (  Index != 0 && ComputedMode () && !DegenerateModeIsOn ()  )
-#else
-        if ((Index != 0) && (! DegenerateModeIsOn ()))
-#endif  // G003
+        if (Index != 0 && ComputedMode())
         {
 #ifdef TRACE
        Standard_Integer StructId = MyCOMPUTEDSequence.Value (Index)->Identification ();
@@ -2120,14 +2100,10 @@ Standard_Integer Index = IsComputed (AStructure);
                 return;
         }
 
-        // Mode degenerated active
-#ifdef G003
-        if (  !ComputedMode () || DegenerateModeIsOn ()  )
-                                        Answer = Visual3d_TOA_YES;
-#else
-        if (DegenerateModeIsOn ()) Answer = Visual3d_TOA_YES;
-;
-#endif  // G003
+        if (!ComputedMode())
+        {
+          Answer = Visual3d_TOA_YES;
+        }
 
         if (Answer == Visual3d_TOA_YES ) {
 #ifdef TRACE_DISPLAY
@@ -2364,13 +2340,10 @@ Standard_Integer StructId;
         if (IsDisplayed (AStructure)) {
 Visual3d_TypeOfAnswer Answer = AcceptDisplay (AStructure);
 
-                // Degenerated mode is active
-#ifdef G003
-                if (  !ComputedMode () || DegenerateModeIsOn ()  )
-                                        Answer = Visual3d_TOA_YES;
-#else
-                if (DegenerateModeIsOn ()) Answer = Visual3d_TOA_YES;
-#endif  // G003
+                if (!ComputedMode())
+                {
+                  Answer = Visual3d_TOA_YES;
+                }
 
                 if (Answer != Visual3d_TOA_COMPUTE) {
                         MyGraphicDriver->EraseStructure (
@@ -2387,12 +2360,8 @@ Standard_Integer Index = IsComputed (AStructure);
         cout << "Index : " << Index << "\n";
         cout << flush;
 #endif
-#ifdef G003
-                    if (  Index != 0 && ComputedMode () &&
-                                                !DegenerateModeIsOn ()  )
-#else
-                    if ((Index != 0) && (! DegenerateModeIsOn ()))
-#endif  // G003
+
+                    if (Index != 0 && ComputedMode())
                     {
                         StructId =
                         MyCOMPUTEDSequence.Value (Index)->Identification ();
@@ -3021,12 +2990,10 @@ Standard_Integer Length = MyCOMPUTEDSequence.Length ();
         for (i=1; i<=Length; i++)
             (MyCOMPUTEDSequence.Value (i))->SetHLRValidation (Standard_False);
 
-        // if the degenerated node is active, nothing is recomputed
-#ifdef G003
-        if (  DegenerateModeIsOn () || !ComputedMode ()  ) return;
-#else
-        if (DegenerateModeIsOn ()) return;
-#endif  // G003
+        if (!ComputedMode())
+        {
+          return;
+        }
 
         /*
          * Force HLRValidation to False on all structures
@@ -3046,10 +3013,6 @@ Standard_Integer Length = MyCOMPUTEDSequence.Length ();
          * Remove structures that were calculated for the
          * previous orientation.
          * Recalculation of new structures.
-         * Passage of the degenerated mode ON to OFF =>
-         * Remove structures that were calculated before
-         * the degenerated mode passed to ON.
-         * Recalculate new structures.
          */
 Graphic3d_MapIteratorOfMapOfStructure S1Iterator (MyDisplayedStructure);
 Visual3d_TypeOfAnswer Answer;
@@ -3085,11 +3048,7 @@ Graphic3d_SequenceOfStructure FooSequence;
 }
 
 void Visual3d_View::ReCompute (const Handle(Graphic3d_Structure)& AStructure) {
-#ifdef G003
-        if ( DegenerateModeIsOn () || !ComputedMode () ) return;
-#else
-        if (DegenerateModeIsOn()) return;
-#endif  // G003
+        if (!ComputedMode()) return;
 
         if (IsDeleted ()) return;
 
@@ -3231,330 +3190,23 @@ Standard_Boolean ComputeShading = ((ViewType == Visual3d_TOV_SHADING) &&
 
 }
 
-void
-#ifdef G003
-Visual3d_View::SetAnimationModeOn ( const Standard_Boolean degenerate ) {
-#else
-Visual3d_View::SetAnimationModeOn () {
-#endif
-
-        if (AnimationModeIsOn ()) return;
-
-        AnimationModeIsActive   = Standard_True;
-#ifdef G003
-        if ( degenerate )
-          SetDegenerateModeOn ();
-        else
-          SetDegenerateModeOff ();
-#endif  // G003
-        MyGraphicDriver->BeginAnimation (MyCView);
-
-}
-
-void Visual3d_View::SetAnimationModeOff () {
-
-        if (! AnimationModeIsOn ()) return;
-
-        AnimationModeIsActive   = Standard_False;
-#ifdef G003
-        SetDegenerateModeOff ();
-#endif  // G003
-        MyGraphicDriver->EndAnimation (MyCView);
-
-}
-
-Standard_Boolean Visual3d_View::AnimationModeIsOn () const {
-
-        return AnimationModeIsActive;
-
-}
-
-void Visual3d_View::SetDegenerateModeOn () {
-
-#ifdef TRACE
-        cout << "Visual3d_View" << MyCView.ViewId
-             << "::SetDegenerateModeOn ();\n";
-        cout << flush;
-#endif
-
-        // If the degenerated mode is already active, nothing is recalculated
-        if (DegenerateModeIsOn ()) return;
-        DegenerateModeIsActive = Standard_True;
-
-#ifdef G003
-        MyCView.IsDegenerates  = 1;
-#else
-        /*
-         * Change of activity of the degenerated mode
-         * Remove structures that were calculated
-         * and displayed when the mode was off.
-         * Display of non-calculated structures.
-         */
-Graphic3d_MapIteratorOfMapOfStructure S1Iterator (MyDisplayedStructure);
-Visual3d_TypeOfAnswer Answer;
-Standard_Integer StructId;
-
-        while (S1Iterator.More ()) {
-
-                Answer  = AcceptDisplay (S1Iterator.Key ());
-                // If the structure was calculated, the previous one is
-                // removed and the new one is displayed
-                // (This is the role of passage into degenerated mode)
-
-                if (Answer == Visual3d_TOA_COMPUTE) {
-Standard_Integer Index = IsComputed (S1Iterator.Key ());
-                    if (Index != 0) {
-                        StructId =
-                        MyCOMPUTEDSequence.Value (Index)->Identification ();
-#ifdef TRACE_COMP
-        cout << "Structure " << S1Iterator.Key ()->Identification ()
-             << " calculated, in the view "
-             << Identification () << ", by structure "
-             << StructId << " passes in degenerated mode.\n";
-        cout << "Remove" << StructId << " then display "
-             << S1Iterator.Key ()->Identification () << "\n";
-        cout << flush;
-#endif
-                        MyGraphicDriver->EraseStructure
-                                (MyCView, *(Graphic3d_CStructure *)MyCOMPUTEDSequence.Value (Index)->CStructure ());
-                        MyGraphicDriver->DisplayStructure (
-                                MyCView,
-                                *(Graphic3d_CStructure *)S1Iterator.Key ()->CStructure (),
-                                int (S1Iterator.Key ()->DisplayPriority ())
-                        );
-                    }
-                    else {
-                        // Else is impossible)
-                        // If the mode was not degenerated previously, the
-                        // calculated structure associated to S1Iterator.Key ()
-                        // really exists and Index != 0
-                    }
-                }
-
-                // S1Iterator.Next () is located on the next structure
-                S1Iterator.Next ();
-        }
-#endif  //G003
-}
-
-void Visual3d_View::SetDegenerateModeOff () {
-
-#ifdef TRACE
-        cout << "Visual3d_View" << MyCView.ViewId
-             << "::SetDegenerateModeOff ();\n";
-        cout << flush;
-#endif
-
-        // If the degenerated mode is already inactive, nothing is recalculated
-        if (! DegenerateModeIsOn ()) return;
-
-        DegenerateModeIsActive  = Standard_False;
-
-#ifdef G003
-        MyCView.IsDegenerates  = 0;
-#else
-        /*
-         * Change of activity of degenerated mode
-         * Remove structures that were displayed
-         * when the mode was on.
-         * Calculation of structures.
-         */
-Graphic3d_MapIteratorOfMapOfStructure S1Iterator (MyDisplayedStructure);
-Visual3d_TypeOfAnswer Answer;
-Standard_Integer StructId;
-
-        Standard_Integer i      = MyDisplayedStructure.Extent ();
-
-        while (S1Iterator.More ()) {
-
-                Answer  = AcceptDisplay (S1Iterator.Key ());
-                // If the structure was calculated, the previous one is
-                // removed and the new one is displayed
-                // (This is the role of passage into degenerated mode)
-
-                if (Answer == Visual3d_TOA_COMPUTE) {
-Standard_Integer Index = IsComputed (S1Iterator.Key ());
-                    if (Index != 0) {
-                        StructId =
-                        MyCOMPUTEDSequence.Value (Index)->Identification ();
-#ifdef TRACE_COMP
-        cout << "Structure " << S1Iterator.Key ()->Identification ()
-             << " calculated, in the view "
-             << Identification () << ", by the structure "
-             << StructId << " passes into normal mode.\n";
-        cout << "Remove " << S1Iterator.Key ()->Identification ()
-             << " then display " << StructId << "\n";
-        cout << flush;
-#endif
-                        MyGraphicDriver->EraseStructure
-                                (MyCView,
-                                *(Graphic3d_CStructure *)S1Iterator.Key ()->CStructure ());
-                        MyGraphicDriver->DisplayStructure (
-                                MyCView,
-                                *(Graphic3d_CStructure *)MyCOMPUTEDSequence.Value (Index)->CStructure (),
-                                int (S1Iterator.Key ()->DisplayPriority ())
-                        );
-
-                        Display (S1Iterator.Key (), Aspect_TOU_WAIT);
-
-                        if ((S1Iterator.Key ())->IsHighlighted()) {
-                           if (! (MyCOMPUTEDSequence.Value (Index))->IsHighlighted()) {
-                                (MyCOMPUTEDSequence.Value (Index))->SetHighlightColor
-                                        ((S1Iterator.Key ())->HighlightColor ());
-                                (MyCOMPUTEDSequence.Value (Index))->GraphicHighlight (Aspect_TOHM_COLOR);
-                            }
-                        }
-                    }
-                    else {
-                        // Else is impossible
-                        // Degenerated mode was activated before display of the
-                        // structure. So the structure was displayed in the
-                        // degenerated mode, but the calculated structure didn't exist.
-                        // It is calculated.
-
-        // Compute + Validation
-Handle(Graphic3d_Structure) AStructure = (S1Iterator.Key ());
-#ifdef OLD
-Handle(Graphic3d_Structure) TheStructure = AStructure->Compute (this);
-#else
-Handle(Graphic3d_Structure) TheStructure;
-TColStd_Array2OfReal ATrsf (0, 3, 0, 3);
-        AStructure->Transform (ATrsf);
-        if (Index != 0) {
-TColStd_Array2OfReal Ident (0, 3, 0, 3);
-Standard_Integer ii, jj;
-        for (ii=0; ii<=3; ii++)
-            for (jj=0; jj<=3; jj++)
-                Ident (ii, jj) = (ii == jj ? 1.0 : 0.0);
-            TheStructure = MyCOMPUTEDSequence.Value (Index);
-            TheStructure->SetTransform (Ident, Graphic3d_TOC_REPLACE);
-            if (AStructure->IsTransformed ()) {
-                AStructure->Compute (this, ATrsf, TheStructure);
-            }
-            else {
-                AStructure->Compute (this, TheStructure);
-            }
-        }
-        else {
-            if (AStructure->IsTransformed ()) {
-                TheStructure = AStructure->Compute (this, ATrsf);
-            }
-            else {
-                TheStructure = AStructure->Compute (this);
-            }
-        }
-#endif
-        TheStructure->SetHLRValidation (Standard_True);
-
-// Return type of visualisation of the view
-Visual3d_TypeOfVisualization ViewType = MyContext.Visualization ();
-
-// Of which type will be the computed ?
-Standard_Boolean ComputeWireframe = ((ViewType == Visual3d_TOV_WIREFRAME) &&
-        ((S1Iterator.Key ())->ComputeVisual () != Graphic3d_TOS_SHADING));
-
-Standard_Boolean ComputeShading = ((ViewType == Visual3d_TOV_SHADING) &&
-        ((S1Iterator.Key ())->ComputeVisual () != Graphic3d_TOS_WIREFRAME));
-
-                        if (ComputeWireframe)
-                            TheStructure->SetVisual (Graphic3d_TOS_WIREFRAME);
-                        if (ComputeShading)
-                            TheStructure->SetVisual (Graphic3d_TOS_SHADING);
-
-                        if ((S1Iterator.Key ())->IsHighlighted()) {
-                            TheStructure->SetHighlightColor
-                                ((S1Iterator.Key ())->HighlightColor ());
-                            TheStructure->GraphicHighlight (Aspect_TOHM_COLOR);
-                        }
-
-                        // Make range
-Standard_Integer Result = 0;
-Standard_Integer Length = MyTOCOMPUTESequence.Length ();
-                        // Find structure <S1Iterator.Key ()>
-                        // in the sequence of structures to be calculated
-                        StructId = (S1Iterator.Key ())->Identification ();
-                        for (i=1; i<=Length && Result==0; i++)
-                          if ((MyTOCOMPUTESequence.Value (i))->Identification () ==
-                            StructId) Result    = i;
-                        if (Result != 0)
-                          MyCOMPUTEDSequence.ChangeValue (Result) = TheStructure;
-                        else {
-                          // hlhsr and the associated new compute are added
-#ifdef TRACE_LENGTH
-        if (MyTOCOMPUTESequence.Length () != MyCOMPUTEDSequence.Length ()) {
-                cout << "In Visual3d_View::SetDegenerateModeOff, ";
-                cout << "TOCOMPUTE " << MyTOCOMPUTESequence.Length ()
-                     << " != COMPUTED " << MyCOMPUTEDSequence.Length ()
-                     << "\n" << flush;
-        }
-#endif
-                          MyTOCOMPUTESequence.Append (S1Iterator.Key ());
-                          MyCOMPUTEDSequence.Append (TheStructure);
-#ifdef TRACE_LENGTH
-        if (MyTOCOMPUTESequence.Length () != MyCOMPUTEDSequence.Length ())
-                cout << "\tTOCOMPUTE " << MyTOCOMPUTESequence.Length ()
-                     << " != COMPUTED " << MyCOMPUTEDSequence.Length ()
-                     << "\n" << flush;
-#endif
-                        }
-
-                        // The degenerated is removed and the calculated is displayed
-                        MyGraphicDriver->EraseStructure
-                                (MyCView,
-                                *(Graphic3d_CStructure *)(S1Iterator.Key ()->CStructure ()));
-                        MyGraphicDriver->DisplayStructure (
-                                MyCView,
-                                *(Graphic3d_CStructure *)TheStructure->CStructure (),
-                                int (S1Iterator.Key ()->DisplayPriority ())
-                        );
-                    }
-                }
-
-                // S1Iterator.Next () is located on the next structure
-                S1Iterator.Next ();
-        }
-
-        if (MyViewManager->UpdateMode () == Aspect_TOU_ASAP) Update ();
-#endif  //G003
-}
-
-Standard_Boolean Visual3d_View::DegenerateModeIsOn () const {
-
-        return DegenerateModeIsActive;
-
-}
-
 const Handle(Graphic3d_GraphicDriver)& Visual3d_View::GraphicDriver () const {
 
         return MyGraphicDriver;
 
 }
 
-void Visual3d_View::Plot (const Handle(Graphic3d_Plotter)& APlotter) const {
-
-Graphic3d_MapIteratorOfMapOfStructure S1Iterator (MyDisplayedStructure);
-
-        while (S1Iterator.More ()) {
-
-                if (DegenerateModeIsOn ())
-                        // As the  mode is degenerated the displayed structure
-                        // is plotted without taking into account if it is calculated or not
-                        (S1Iterator.Key ())->Plot (APlotter);
-                else {
-Standard_Integer Index = IsComputed (S1Iterator.Key ());
-                        // As the  mode is not degenerated the displayed structure
-                        // is plotted as if it was not calculated, otherwise the
-                        // associated calculated structure is plotted.
-                        if (Index == 0)
-                            (S1Iterator.Key ())->Plot (APlotter);
-                        else
-                            (MyCOMPUTEDSequence.Value (Index))->Plot (APlotter);
-                }
-
-                // S1Iterator.Next () is located on the next structure
-                S1Iterator.Next ();
-        }
-
+void Visual3d_View::Plot (const Handle(Graphic3d_Plotter)& thePlotter) const
+{
+  for (Graphic3d_MapIteratorOfMapOfStructure S1Iterator (MyDisplayedStructure); S1Iterator.More(); S1Iterator.Next())
+  {
+    Standard_Integer Index = IsComputed (S1Iterator.Key ());
+    // displayed structure is plotted as if it was not calculated
+    if (Index == 0)
+      (S1Iterator.Key ())->Plot (thePlotter);
+    else
+      (MyCOMPUTEDSequence.Value (Index))->Plot (thePlotter);
+  }
 }
 
 Standard_Integer Visual3d_View::HaveTheSameOwner (const Handle(Graphic3d_Structure)& AStructure) const {
@@ -3924,13 +3576,13 @@ Handle(Visual3d_ViewManager) Visual3d_View::ViewManager() const
   return MyPtrViewManager;
 }
 
-#ifdef G003
-void Visual3d_View :: SetComputedMode ( const Standard_Boolean aMode ) {
-
- if (  (  (aMode &&  ComputedModeIsActive) ||
-         (!aMode && !ComputedModeIsActive)
-       ) || DegenerateModeIsOn ()
- ) return;
+void Visual3d_View :: SetComputedMode ( const Standard_Boolean aMode )
+{
+  if ((aMode &&  ComputedModeIsActive) ||
+     (!aMode && !ComputedModeIsActive))
+  {
+    return;
+  }
 
  Graphic3d_MapIteratorOfMapOfStructure S1Iterator ( MyDisplayedStructure );
  Visual3d_TypeOfAnswer                 Answer;
@@ -4175,7 +3827,6 @@ Visual3d_TypeOfBackfacingModel Visual3d_View :: BackFacingModel () const {
  return Visual3d_TOBM_DISABLE;
 
 }  // end Visual3d_View :: BackFacingModel
-#endif  // G003
 
 void Visual3d_View::EnableDepthTest( const Standard_Boolean enable ) const
 {
index 30fff80..6dade6f 100755 (executable)
 // purpose or non-infringement. Please see the License for the specific terms
 // and conditions governing the rights and limitations under the License.
 
-
 #ifndef VIEW_PXX_INCLUDED
 #define VIEW_PXX_INCLUDED
 
-#define G003   // EUG Manage computed mode activation flag
-
 // views identifiers : possible range
 #define View_IDMIN     1
 #define View_IDMAX     10000
@@ -30,8 +27,6 @@
 
 #define MyMatOfMapIsEvaluated   MyCBitFields.bool1
 #define MyMatOfOriIsEvaluated   MyCBitFields.bool2
-#define DegenerateModeIsActive  MyCBitFields.bool3
-#define AnimationModeIsActive   MyCBitFields.bool4
 #define IsInitialized           MyCBitFields.bool5
 #define ComputedModeIsActive    MyCBitFields.bool6
 
diff --git a/tests/bugs/vis/buc60753 b/tests/bugs/vis/buc60753
deleted file mode 100755 (executable)
index a526247..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-puts "========"
-puts "BUC60753"
-puts "========"
-puts ""
-
-restore [locate_data_file buc60753.brep] a
-checkshape a
-
-tclean a
-vinit
-vdisplay a
-vsetdispmode a 1
-vfit
-
-set TypeOfDegenerateModel 2
-set Ratio 0.5
-
-BUC60753 ${TypeOfDegenerateModel} ${Ratio}
-
-set only_screen 1