]> OCCT Git - occt.git/commitdiff
Get rid of unused V3d_View::Visualization()
authorkgv <kgv@opencascade.com>
Tue, 14 Dec 2021 12:29:58 +0000 (15:29 +0300)
committerkgv <kgv@opencascade.com>
Tue, 14 Dec 2021 13:36:06 +0000 (16:36 +0300)
12 files changed:
src/Graphic3d/FILES
src/Graphic3d/Graphic3d_CView.cxx
src/Graphic3d/Graphic3d_CView.hxx
src/Graphic3d/Graphic3d_Structure.cxx
src/Graphic3d/Graphic3d_Structure.hxx
src/Graphic3d/Graphic3d_TypeOfAnswer.hxx [deleted file]
src/Graphic3d/Graphic3d_TypeOfStructure.hxx
src/Graphic3d/Graphic3d_TypeOfVisualization.hxx [deleted file]
src/V3d/V3d_View.cxx
src/V3d/V3d_View.hxx
src/V3d/V3d_Viewer.cxx
src/V3d/V3d_Viewer.hxx

index 71ca2e7dff694d5e3aa5edce3fed2805685f3a7d..67245faee8f1f8cf03f318b2e106170c2f7dafa0 100755 (executable)
@@ -177,7 +177,6 @@ Graphic3d_TransformPersScaledAbove.hxx
 Graphic3d_TransformPersScaledAbove.cxx
 Graphic3d_TransformUtils.hxx
 Graphic3d_TransModeFlags.hxx
-Graphic3d_TypeOfAnswer.hxx
 Graphic3d_TypeOfBackfacingModel.hxx
 Graphic3d_TypeOfBackground.hxx
 Graphic3d_TypeOfConnection.hxx
@@ -192,7 +191,6 @@ Graphic3d_TypeOfStructure.hxx
 Graphic3d_TypeOfTexture.hxx
 Graphic3d_TypeOfTextureFilter.hxx
 Graphic3d_TypeOfTextureMode.hxx
-Graphic3d_TypeOfVisualization.hxx
 Graphic3d_Vec.hxx
 Graphic3d_Vec2.hxx
 Graphic3d_Vec3.hxx
index 91544a662bbe903a8bce458fb2c216764c464cc9..cf9ccf64892d72ecc69ae2509111ed04fd1fc19b 100644 (file)
@@ -34,7 +34,6 @@ Graphic3d_CView::Graphic3d_CView (const Handle(Graphic3d_StructureManager)& theM
   myIsActive               (Standard_False),
   myIsRemoved              (Standard_False),
   myBackfacing             (Graphic3d_TypeOfBackfacingModel_Auto),
-  myVisualization          (Graphic3d_TOV_WIREFRAME),
   myUnitFactor             (1.0)
 {
   myId = myStructureManager->Identification (this);
@@ -79,13 +78,7 @@ void Graphic3d_CView::Activate()
         continue;
       }
 
-      // If the structure can be displayed in the new context of the view, it is displayed.
-      const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (aStruct->Visual());
-      if (anAnswer == Graphic3d_TOA_YES
-       || anAnswer == Graphic3d_TOA_COMPUTE)
-      {
-        Display (aStruct);
-      }
+      Display (aStruct);
     }
   }
 
@@ -116,12 +109,7 @@ void Graphic3d_CView::Deactivate()
         continue;
       }
 
-      const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (aStruct->Visual());
-      if (anAnswer == Graphic3d_TOA_YES
-       || anAnswer == Graphic3d_TOA_COMPUTE)
-      {
-        Erase (aStruct);
-      }
+      Erase (aStruct);
     }
 
     Update();
@@ -176,9 +164,8 @@ void Graphic3d_CView::SetComputedMode (const Standard_Boolean theMode)
   {
     for (Graphic3d_ViewStructureMap::Iterator aStructIter (myStructsDisplayed); aStructIter.More(); aStructIter.Next())
     {
-      const Handle(Graphic3d_Structure)& aStruct  = aStructIter.Key();
-      const Graphic3d_TypeOfAnswer        anAnswer = acceptDisplay (aStruct->Visual());
-      if (anAnswer != Graphic3d_TOA_COMPUTE)
+      const Handle(Graphic3d_Structure)& aStruct = aStructIter.Key();
+      if (aStruct->Visual() != Graphic3d_TOS_COMPUTED)
       {
         continue;
       }
@@ -197,9 +184,8 @@ void Graphic3d_CView::SetComputedMode (const Standard_Boolean theMode)
 
   for (Graphic3d_ViewStructureMap::Iterator aDispStructIter (myStructsDisplayed); aDispStructIter.More(); aDispStructIter.Next())
   {
-    Handle(Graphic3d_Structure) aStruct  = aDispStructIter.Key();
-    const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (aStruct->Visual());
-    if (anAnswer != Graphic3d_TOA_COMPUTE)
+    Handle(Graphic3d_Structure) aStruct = aDispStructIter.Key();
+    if (aStruct->Visual() != Graphic3d_TOS_COMPUTED)
     {
       continue;
     }
@@ -229,13 +215,7 @@ void Graphic3d_CView::SetComputedMode (const Standard_Boolean theMode)
         continue;
       }
       aCompStruct->SetHLRValidation (Standard_True);
-
-      const Standard_Boolean toComputeWireframe = myVisualization == Graphic3d_TOV_WIREFRAME
-                                                && aStruct->ComputeVisual() != Graphic3d_TOS_SHADING;
-      const Standard_Boolean toComputeShading   = myVisualization == Graphic3d_TOV_SHADING
-                                                && aStruct->ComputeVisual() != Graphic3d_TOS_WIREFRAME;
-      if (toComputeWireframe) aCompStruct->SetVisual (Graphic3d_TOS_WIREFRAME);
-      if (toComputeShading  ) aCompStruct->SetVisual (Graphic3d_TOS_SHADING);
+      aCompStruct->SetVisual (Graphic3d_TOS_ALL);
 
       if (aStruct->IsHighlighted())
       {
@@ -284,15 +264,14 @@ void Graphic3d_CView::ReCompute (const Handle(Graphic3d_Structure)& theStruct)
     InvalidateBVHData (aLayerId);
   }
 
-  if (!ComputedMode()
+  if (!myIsInComputedMode
    || !IsActive()
    || !theStruct->IsDisplayed())
   {
     return;
   }
 
-  const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (theStruct->Visual());
-  if (anAnswer != Graphic3d_TOA_COMPUTE)
+  if (theStruct->Visual() != Graphic3d_TOS_COMPUTED)
   {
     return;
   }
@@ -314,22 +293,9 @@ void Graphic3d_CView::ReCompute (const Handle(Graphic3d_Structure)& theStruct)
   }
 
   aCompStruct->SetHLRValidation (Standard_True);
+  aCompStruct->SetVisual (Graphic3d_TOS_ALL);
   aCompStruct->CalculateBoundBox();
 
-  // of which type will be the computed?
-  const Standard_Boolean toComputeWireframe = myVisualization == Graphic3d_TOV_WIREFRAME
-                                           && theStruct->ComputeVisual() != Graphic3d_TOS_SHADING;
-  const Standard_Boolean toComputeShading   = myVisualization == Graphic3d_TOV_SHADING
-                                           && theStruct->ComputeVisual() != Graphic3d_TOS_WIREFRAME;
-  if (toComputeWireframe)
-  {
-    aCompStruct->SetVisual (Graphic3d_TOS_WIREFRAME);
-  }
-  else if (toComputeShading)
-  {
-    aCompStruct->SetVisual (Graphic3d_TOS_SHADING);
-  }
-
   if (theStruct->IsHighlighted())
   {
     aCompStruct->Highlight (theStruct->HighlightStyle(), Standard_False);
@@ -519,40 +485,6 @@ Bnd_Box Graphic3d_CView::MinMaxValues (const Graphic3d_MapOfStructure& theSet,
   return aResult;
 }
 
-// =======================================================================
-// function : acceptDisplay
-// purpose  :
-// =======================================================================
-Graphic3d_TypeOfAnswer Graphic3d_CView::acceptDisplay (const Graphic3d_TypeOfStructure theStructType) const
-{
-  switch (theStructType)
-  {
-    case Graphic3d_TOS_ALL:
-    {
-      return Graphic3d_TOA_YES; // The structure accepts any type of view
-    }
-    case Graphic3d_TOS_SHADING:
-    {
-      return myVisualization == Graphic3d_TOV_SHADING
-           ? Graphic3d_TOA_YES
-           : Graphic3d_TOA_NO;
-    }
-    case Graphic3d_TOS_WIREFRAME:
-    {
-      return myVisualization == Graphic3d_TOV_WIREFRAME
-           ? Graphic3d_TOA_YES
-           : Graphic3d_TOA_NO;
-    }
-    case Graphic3d_TOS_COMPUTED:
-    {
-      return (myVisualization == Graphic3d_TOV_SHADING || myVisualization == Graphic3d_TOV_WIREFRAME)
-           ?  Graphic3d_TOA_COMPUTE
-           :  Graphic3d_TOA_NO;
-    }
-  }
-  return Graphic3d_TOA_NO;
-}
-
 // =======================================================================
 // function : Compute
 // purpose  :
@@ -565,7 +497,7 @@ void Graphic3d_CView::Compute()
     aStructIter.Value()->SetHLRValidation (Standard_False);
   }
 
-  if (!ComputedMode())
+  if (!myIsInComputedMode)
   {
     return;
   }
@@ -576,10 +508,10 @@ void Graphic3d_CView::Compute()
   NCollection_Sequence<Handle(Graphic3d_Structure)> aStructsSeq;
   for (Graphic3d_ViewStructureMap::Iterator aStructIter (myStructsDisplayed); aStructIter.More(); aStructIter.Next())
   {
-    const Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (aStructIter.Key()->Visual());
-    if (anAnswer == Graphic3d_TOA_COMPUTE)
+    const Handle(Graphic3d_Structure)& aStruct = aStructIter.Key();
+    if (aStruct->Visual() == Graphic3d_TOS_COMPUTED)
     {
-      aStructsSeq.Append (aStructIter.Key()); // if the structure was calculated, it is recalculated
+      aStructsSeq.Append (aStruct); // if the structure was calculated, it is recalculated
     }
   }
 
@@ -665,19 +597,9 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure)
     anIndex = 0;
   }
 
-  Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (theStructure->Visual());
-  if (anAnswer == Graphic3d_TOA_NO)
-  {
-    return;
-  }
-
-  if (!ComputedMode())
-  {
-    anAnswer = Graphic3d_TOA_YES;
-  }
-
   const Standard_Integer anOldExtent = myStructsDisplayed.Extent();
-  if (anAnswer == Graphic3d_TOA_YES)
+  if (theStructure->Visual() != Graphic3d_TOS_COMPUTED
+  || !myIsInComputedMode)
   {
     const Standard_Integer aPrsIndex = myStructsDisplayed.Add (theStructure, Handle(Graphic3d_Structure)());
     if (aPrsIndex <= anOldExtent)
@@ -690,10 +612,6 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure)
     Update (theStructure->GetZLayer());
     return;
   }
-  else if (anAnswer != Graphic3d_TOA_COMPUTE)
-  {
-    return;
-  }
 
   if (anIndex != 0)
   {
@@ -761,6 +679,7 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure)
     return;
   }
   aStruct->SetHLRValidation (Standard_True);
+  aStruct->SetVisual (Graphic3d_TOS_ALL);
 
   // TOCOMPUTE and COMPUTED associated to sequences are added
   myStructsToCompute.Append (theStructure);
@@ -773,33 +692,11 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure)
     myStructsComputed .Remove (anIndex);
   }
 
-  // Of which type will be the computed?
-  const Standard_Boolean toComputeWireframe = myVisualization == Graphic3d_TOV_WIREFRAME
-                                           && theStructure->ComputeVisual() != Graphic3d_TOS_SHADING;
-  const Standard_Boolean toComputeShading   = myVisualization == Graphic3d_TOV_SHADING
-                                           && theStructure->ComputeVisual() != Graphic3d_TOS_WIREFRAME;
-  if (!toComputeShading && !toComputeWireframe)
-  {
-    anAnswer = Graphic3d_TOA_NO;
-  }
-  else
-  {
-    aStruct->SetVisual (toComputeWireframe ? Graphic3d_TOS_WIREFRAME : Graphic3d_TOS_SHADING);
-    anAnswer = acceptDisplay (aStruct->Visual());
-  }
-
   if (theStructure->IsHighlighted())
   {
     aStruct->Highlight (theStructure->HighlightStyle(), Standard_False);
   }
 
-  // It is displayed only if the calculated structure
-  // has a proper type corresponding to the one of the view.
-  if (anAnswer == Graphic3d_TOA_NO)
-  {
-    return;
-  }
-
   const Standard_Integer aPrsIndex = myStructsDisplayed.Add (theStructure, Handle(Graphic3d_Structure)());
   displayStructure (aStruct->CStructure(), theStructure->DisplayPriority());
 
@@ -817,8 +714,9 @@ void Graphic3d_CView::Erase (const Handle(Graphic3d_Structure)& theStructure)
     return;
   }
 
-  const Graphic3d_TypeOfAnswer anAnswer = myIsInComputedMode ? acceptDisplay (theStructure->Visual()) : Graphic3d_TOA_YES;
-  if (anAnswer != Graphic3d_TOA_COMPUTE)
+  const bool isComputedStruct = theStructure->Visual() == Graphic3d_TOS_COMPUTED
+                             && myIsInComputedMode;
+  if (!isComputedStruct)
   {
     eraseStructure (theStructure->CStructure());
   }
@@ -826,8 +724,7 @@ void Graphic3d_CView::Erase (const Handle(Graphic3d_Structure)& theStructure)
   const Standard_Integer anIndex = !myStructsToCompute.IsEmpty() ? IsComputed (theStructure) : 0;
   if (anIndex != 0)
   {
-    if (anAnswer == Graphic3d_TOA_COMPUTE
-     && myIsInComputedMode)
+    if (isComputedStruct)
     {
       const Handle(Graphic3d_Structure)& aCompStruct = myStructsComputed.ChangeValue (anIndex);
       eraseStructure (aCompStruct->CStructure());
@@ -1411,8 +1308,6 @@ void Graphic3d_CView::DumpJson (Standard_OStream& theOStream, Standard_Integer t
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsInComputedMode)
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsActive)
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsRemoved)
-  
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVisualization)
 
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBackXRCamera.get())
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBaseXRCamera.get())
index a21abac48562f5d004387b0ec23a01f7ad1c94f9..54c52021c8d7d06b9a767f284a29fd1b8af9719a 100644 (file)
 #include <Graphic3d_Structure.hxx>
 #include <Graphic3d_Texture2Dmanual.hxx>
 #include <Graphic3d_TextureEnv.hxx>
-#include <Graphic3d_TypeOfAnswer.hxx>
 #include <Graphic3d_TypeOfBackfacingModel.hxx>
 #include <Graphic3d_TypeOfBackground.hxx>
 #include <Graphic3d_TypeOfShadingModel.hxx>
-#include <Graphic3d_TypeOfVisualization.hxx>
 #include <Graphic3d_Vec3.hxx>
 #include <Graphic3d_ZLayerId.hxx>
 #include <Graphic3d_ZLayerSettings.hxx>
@@ -135,12 +133,6 @@ public:
   //! Sets backfacing model for the view.
   void SetBackfacingModel (const Graphic3d_TypeOfBackfacingModel theModel) { myBackfacing = theModel; }
 
-  //! Returns visualization type of the view.
-  Graphic3d_TypeOfVisualization VisualizationType() const { return myVisualization; }
-
-  //! Sets visualization type of the view.
-  void SetVisualizationType (const Graphic3d_TypeOfVisualization theType) { myVisualization = theType; }
-
   //! Switches computed HLR mode in the view
   Standard_EXPORT void SetComputedMode (const Standard_Boolean theMode);
 
@@ -192,9 +184,6 @@ public:
 
 private:
 
-  //! Is it possible to display the structure in the view?
-  Standard_EXPORT Graphic3d_TypeOfAnswer acceptDisplay (const Graphic3d_TypeOfStructure theStructType) const;
-
   //! Clears the structure in this view.
   Standard_EXPORT void Clear (Graphic3d_Structure* theStructure,
                               const Standard_Boolean theWithDestruction);
@@ -609,7 +598,6 @@ protected:
   Standard_Boolean myIsActive;
   Standard_Boolean myIsRemoved;
   Graphic3d_TypeOfBackfacingModel myBackfacing;
-  Graphic3d_TypeOfVisualization myVisualization;
 
   Handle(Aspect_XRSession) myXRSession;
   Handle(Graphic3d_Camera) myBackXRCamera;       //!< camera projection parameters to restore after closing XR session (FOV, aspect and similar)
index 92b56ada60ec4ae16b48e08ba692e8d071212449..27b6400c3b264b11fe3e16745a42f94db6ef5400 100644 (file)
@@ -41,8 +41,7 @@ Graphic3d_Structure::Graphic3d_Structure (const Handle(Graphic3d_StructureManage
                                           const Handle(Graphic3d_Structure)&        theLinkPrs)
 : myStructureManager(theManager.get()),
   myOwner           (NULL),
-  myVisual          (Graphic3d_TOS_ALL),
-  myComputeVisual   (Graphic3d_TOS_ALL)
+  myVisual          (Graphic3d_TOS_ALL)
 {
   if (!theLinkPrs.IsNull())
   {
@@ -51,7 +50,6 @@ Graphic3d_Structure::Graphic3d_Structure (const Handle(Graphic3d_StructureManage
     {
       myVisual = theLinkPrs->myVisual;
     }
-    myComputeVisual = theLinkPrs->myComputeVisual;
     myCStructure = theLinkPrs->myCStructure->ShadowLink (theManager);
   }
   else
@@ -385,13 +383,11 @@ void Graphic3d_Structure::SetVisual (const Graphic3d_TypeOfStructure theVisual)
   if (!myCStructure->stick)
   {
     myVisual = theVisual;
-    SetComputeVisual (theVisual);
   }
   else
   {
     erase();
     myVisual = theVisual;
-    SetComputeVisual (theVisual);
     Display();
   }
 }
@@ -1018,5 +1014,4 @@ void Graphic3d_Structure::DumpJson (Standard_OStream& theOStream, Standard_Integ
 
   OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner)
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVisual)
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myComputeVisual)
 }
index 905628df504231ee671d9282cdc179905fb31c08..4647e4b25548c476eeca2dc05e2fbdb668c06634 100644 (file)
@@ -383,8 +383,6 @@ public:
         && myCStructure->IsMutable;
   }
 
-  Graphic3d_TypeOfStructure ComputeVisual() const { return myComputeVisual; }
-
   //! Clears the structure <me>.
   Standard_EXPORT void GraphicClear (const Standard_Boolean WithDestruction);
 
@@ -415,16 +413,6 @@ public:
   Standard_EXPORT void Remove (Graphic3d_Structure* thePtr,
                                const Graphic3d_TypeOfConnection theType);
   
-  void SetComputeVisual (const Graphic3d_TypeOfStructure theVisual)
-  {
-    // The ComputeVisual is saved only if the structure is declared TOS_ALL, TOS_WIREFRAME or TOS_SHADING.
-    // This declaration permits to calculate proper representation of the structure calculated by Compute instead of passage to TOS_COMPUTED.
-    if (theVisual != Graphic3d_TOS_COMPUTED)
-    {
-      myComputeVisual = theVisual;
-    }
-  }
-  
   //! Transforms theX, theY, theZ with the transformation theTrsf.
   Standard_EXPORT static void Transforms (const gp_Trsf& theTrsf,
                                           const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ,
@@ -491,7 +479,6 @@ protected:
   NCollection_IndexedMap<Graphic3d_Structure*> myDescendants;
   Standard_Address              myOwner;
   Graphic3d_TypeOfStructure     myVisual;
-  Graphic3d_TypeOfStructure     myComputeVisual;
 
 };
 
diff --git a/src/Graphic3d/Graphic3d_TypeOfAnswer.hxx b/src/Graphic3d/Graphic3d_TypeOfAnswer.hxx
deleted file mode 100644 (file)
index 1f72e9a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// Created on: 1991-10-07
-// Created by: NW,JPB,CAL
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _Graphic3d_TypeOfAnswer_HeaderFile
-#define _Graphic3d_TypeOfAnswer_HeaderFile
-
-//! The answer of the method AcceptDisplay
-//! AcceptDisplay  means is it possible to display the
-//! specified structure in the specified view ?
-//! TOA_YES yes
-//! TOA_NO  no
-//! TOA_COMPUTE yes but we have to compute the representation
-enum Graphic3d_TypeOfAnswer
-{
-  Graphic3d_TOA_YES,
-  Graphic3d_TOA_NO,
-  Graphic3d_TOA_COMPUTE
-};
-
-#endif // _Graphic3d_TypeOfAnswer_HeaderFile
index 600f42e4559a36df2e300e564a205e64515e7bdb..d9e9516fb274029d341990e21756ba323bc2fa58 100644 (file)
@@ -21,8 +21,6 @@
 //! in wireframe, shadow mode, or both.
 enum Graphic3d_TypeOfStructure
 {
-Graphic3d_TOS_WIREFRAME,
-Graphic3d_TOS_SHADING,
 Graphic3d_TOS_COMPUTED,
 Graphic3d_TOS_ALL
 };
diff --git a/src/Graphic3d/Graphic3d_TypeOfVisualization.hxx b/src/Graphic3d/Graphic3d_TypeOfVisualization.hxx
deleted file mode 100644 (file)
index ec3cf0f..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Created on: 1991-10-07
-// Created by: NW,JPB,CAL
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _Graphic3d_TypeOfVisualization_HeaderFile
-#define _Graphic3d_TypeOfVisualization_HeaderFile
-
-//! Modes of visualisation of objects in a view
-//!
-//! TOV_WIREFRAME   wireframe visualisation
-//! TOV_SHADING     shaded visualisation
-enum Graphic3d_TypeOfVisualization
-{
-  Graphic3d_TOV_WIREFRAME,
-  Graphic3d_TOV_SHADING
-};
-
-#endif // _Graphic3d_TypeOfVisualization_HeaderFile
index d248449657230e33cf3cf6102f64957cdd0b96e5..a44612d439c912927da7350730db8b3ec2bd1aca 100644 (file)
@@ -95,7 +95,6 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th
   SetBackFacingModel (V3d_TOBM_AUTOMATIC);
   SetCamera (aCamera);
   SetAxis (0.,0.,0.,1.,1.,1.);
-  SetVisualization (theViewer->DefaultVisualization());
   SetTwist (0.);
   SetAt (0.,0.,0.);
   SetProj (theViewer->DefaultViewProj());
@@ -574,20 +573,6 @@ void V3d_View::SetTextureEnv (const Handle(Graphic3d_TextureEnv)& theTexture)
   }
 }
 
-//=============================================================================
-//function : SetVisualization
-//purpose  :
-//=============================================================================
-void V3d_View::SetVisualization (const V3d_TypeOfVisualization theType)
-{
-  myView->SetVisualizationType (static_cast <Graphic3d_TypeOfVisualization> (theType));
-
-  if (myImmediateUpdate)
-  {
-    Redraw();
-  }
-}
-
 //=============================================================================
 //function : SetFront
 //purpose  :
@@ -2206,15 +2191,6 @@ Handle(Graphic3d_TextureEnv) V3d_View::TextureEnv() const
   return myView->TextureEnv();
 }
 
-//=============================================================================
-//function : Visualization
-//purpose  :
-//=============================================================================
-V3d_TypeOfVisualization V3d_View::Visualization() const
-{
-  return static_cast<V3d_TypeOfVisualization> (myView->VisualizationType());
-}
-
 //=============================================================================
 //function : IfWindow
 //purpose  :
index 14be5fc09eef1474cc9c5c63d913b9a5ad5f6788..ff74dfb3b7fd2284cbe44b67f6cd277c28568e45 100644 (file)
@@ -248,9 +248,6 @@ public:
 
 public:
 
-  //! Defines the visualization type in the view.
-  Standard_EXPORT void SetVisualization (const V3d_TypeOfVisualization theType);
-
   //! Activates theLight in the view.
   Standard_EXPORT void SetLightOn (const Handle(V3d_Light)& theLight);
 
@@ -705,9 +702,6 @@ public:
 
   Standard_EXPORT Handle(Graphic3d_TextureEnv) TextureEnv() const;
 
-  //! Returns the current visualisation mode.
-  Standard_EXPORT V3d_TypeOfVisualization Visualization() const;
-
   //! Returns a list of active lights.
   const V3d_ListOfLight& ActiveLights() const { return myActiveLights; }
 
index ad6467fab4aaa21d4a55325b985f395f3f5b388f..867a420f6946921f1a5df565e59807df706b8224 100644 (file)
@@ -46,7 +46,6 @@ V3d_Viewer::V3d_Viewer (const Handle(Graphic3d_GraphicDriver)& theDriver)
   myBackground (Quantity_NOC_GRAY30),
   myViewSize (1000.0),
   myViewProj (V3d_XposYnegZpos),
-  myVisualization (V3d_ZBUFFER),
   myDefaultTypeOfView (V3d_ORTHOGRAPHIC),
   myComputedMode (Standard_True),
   myDefaultComputedMode (Standard_False),
@@ -902,7 +901,6 @@ void V3d_Viewer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDep
 
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myViewSize)
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myViewProj)
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVisualization)
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDefaultTypeOfView)
   
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myDefaultRenderingParams)
index de405d822ad59bd1a0625129d88a5ee668b75cce..295e343a843dd58d2d7b665831e5ae241d7eb8aa 100644 (file)
@@ -36,7 +36,6 @@
 #include <V3d_ListOfView.hxx>
 #include <V3d_TypeOfOrientation.hxx>
 #include <V3d_TypeOfView.hxx>
-#include <V3d_TypeOfVisualization.hxx>
 #include <Quantity_Color.hxx>
 
 class Aspect_Grid;
@@ -145,12 +144,6 @@ public:
   //! Sets the default projection for creating views in the viewer.
   void SetDefaultViewProj (const V3d_TypeOfOrientation theOrientation) { myViewProj = theOrientation; }
 
-  //! Returns the default type of Visualization.
-  V3d_TypeOfVisualization DefaultVisualization() const { return myVisualization; }
-
-  //! Gives the default visualization mode.
-  void SetDefaultVisualization (const V3d_TypeOfVisualization theType) { myVisualization = theType; }
-
   //! Returns the default type of Shading; Graphic3d_TypeOfShadingModel_Phong by default.
   Graphic3d_TypeOfShadingModel DefaultShadingModel() const { return myDefaultRenderingParams.ShadingModel; }
 
@@ -500,7 +493,6 @@ private:
   Aspect_GradientBackground myGradientBackground;
   Standard_Real myViewSize;
   V3d_TypeOfOrientation myViewProj;
-  V3d_TypeOfVisualization myVisualization;
   V3d_TypeOfView myDefaultTypeOfView;
   Graphic3d_RenderingParams myDefaultRenderingParams;