From: kgv Date: Tue, 14 Dec 2021 12:29:58 +0000 (+0300) Subject: Get rid of unused V3d_View::Visualization() X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=bf36a1fb0c973cda1af4a69bdf6d2299ea86e261;p=occt.git Get rid of unused V3d_View::Visualization() --- diff --git a/src/Graphic3d/FILES b/src/Graphic3d/FILES index 71ca2e7dff..67245faee8 100755 --- a/src/Graphic3d/FILES +++ b/src/Graphic3d/FILES @@ -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 diff --git a/src/Graphic3d/Graphic3d_CView.cxx b/src/Graphic3d/Graphic3d_CView.cxx index 91544a662b..cf9ccf6489 100644 --- a/src/Graphic3d/Graphic3d_CView.cxx +++ b/src/Graphic3d/Graphic3d_CView.cxx @@ -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 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()) diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index a21abac485..54c52021c8 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -33,11 +33,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -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) diff --git a/src/Graphic3d/Graphic3d_Structure.cxx b/src/Graphic3d/Graphic3d_Structure.cxx index 92b56ada60..27b6400c3b 100644 --- a/src/Graphic3d/Graphic3d_Structure.cxx +++ b/src/Graphic3d/Graphic3d_Structure.cxx @@ -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) } diff --git a/src/Graphic3d/Graphic3d_Structure.hxx b/src/Graphic3d/Graphic3d_Structure.hxx index 905628df50..4647e4b255 100644 --- a/src/Graphic3d/Graphic3d_Structure.hxx +++ b/src/Graphic3d/Graphic3d_Structure.hxx @@ -383,8 +383,6 @@ public: && myCStructure->IsMutable; } - Graphic3d_TypeOfStructure ComputeVisual() const { return myComputeVisual; } - //! Clears the structure . 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 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 index 1f72e9a403..0000000000 --- a/src/Graphic3d/Graphic3d_TypeOfAnswer.hxx +++ /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 diff --git a/src/Graphic3d/Graphic3d_TypeOfStructure.hxx b/src/Graphic3d/Graphic3d_TypeOfStructure.hxx index 600f42e455..d9e9516fb2 100644 --- a/src/Graphic3d/Graphic3d_TypeOfStructure.hxx +++ b/src/Graphic3d/Graphic3d_TypeOfStructure.hxx @@ -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 index ec3cf0f7e9..0000000000 --- a/src/Graphic3d/Graphic3d_TypeOfVisualization.hxx +++ /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 diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index d248449657..a44612d439 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -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 (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 (myView->VisualizationType()); -} - //============================================================================= //function : IfWindow //purpose : diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index 14be5fc09e..ff74dfb3b7 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -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; } diff --git a/src/V3d/V3d_Viewer.cxx b/src/V3d/V3d_Viewer.cxx index ad6467fab4..867a420f69 100644 --- a/src/V3d/V3d_Viewer.cxx +++ b/src/V3d/V3d_Viewer.cxx @@ -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) diff --git a/src/V3d/V3d_Viewer.hxx b/src/V3d/V3d_Viewer.hxx index de405d822a..295e343a84 100644 --- a/src/V3d/V3d_Viewer.hxx +++ b/src/V3d/V3d_Viewer.hxx @@ -36,7 +36,6 @@ #include #include #include -#include #include 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;