1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0028407: Visualization - remove ::UpdateMode() from Graphic3d_StructureManager

This commit is contained in:
kgv
2017-01-30 13:09:22 +03:00
committed by apn
parent b0d96eb753
commit cfece3ef2e
21 changed files with 73 additions and 264 deletions

View File

@@ -1,29 +0,0 @@
// 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 _Aspect_TypeOfUpdate_HeaderFile
#define _Aspect_TypeOfUpdate_HeaderFile
//! Definition of screen refresh mode
//!
//! TOU_ASAP as soon as possible
//! TOU_WAIT on demand (Update)
enum Aspect_TypeOfUpdate
{
Aspect_TOU_ASAP,
Aspect_TOU_WAIT
};
#endif // _Aspect_TypeOfUpdate_HeaderFile

View File

@@ -53,7 +53,6 @@ Aspect_TypeOfPrimitive.hxx
Aspect_TypeOfResize.hxx
Aspect_TypeOfStyleText.hxx
Aspect_TypeOfTriedronPosition.hxx
Aspect_TypeOfUpdate.hxx
Aspect_Units.hxx
Aspect_WidthOfLine.hxx
Aspect_Window.cxx

View File

@@ -86,12 +86,12 @@ void Graphic3d_CView::Activate()
if (anAnswer == Graphic3d_TOA_YES
|| anAnswer == Graphic3d_TOA_COMPUTE)
{
Display (aStruct, Aspect_TOU_WAIT);
Display (aStruct);
}
}
}
Update (myStructureManager->UpdateMode());
Update();
}
// =======================================================================
@@ -122,11 +122,11 @@ void Graphic3d_CView::Deactivate()
if (anAnswer == Graphic3d_TOA_YES
|| anAnswer == Graphic3d_TOA_COMPUTE)
{
Erase (aStruct, Aspect_TOU_WAIT);
Erase (aStruct);
}
}
Update (myStructureManager->UpdateMode());
Update();
myIsActive = Standard_False;
}
}
@@ -146,7 +146,7 @@ void Graphic3d_CView::Remove()
for (Graphic3d_MapIteratorOfMapOfStructure aStructIter (aDisplayedStructs); aStructIter.More(); aStructIter.Next())
{
Erase (aStructIter.Value(), Aspect_TOU_WAIT);
Erase (aStructIter.Value());
}
myStructsToCompute.Clear();
@@ -212,7 +212,7 @@ void Graphic3d_CView::SetComputedMode (const Standard_Boolean theMode)
eraseStructure (aStruct->CStructure());
displayStructure (myStructsComputed.Value (anIndex)->CStructure(), aStruct->DisplayPriority());
Display (aStruct, Aspect_TOU_WAIT);
Display (aStruct);
if (aStruct->IsHighlighted())
{
const Handle(Graphic3d_Structure)& aCompStruct = myStructsComputed.Value (anIndex);
@@ -262,7 +262,7 @@ void Graphic3d_CView::SetComputedMode (const Standard_Boolean theMode)
displayStructure (aCompStruct->CStructure(), aStruct->DisplayPriority());
}
}
Update (myStructureManager->UpdateMode());
Update();
}
// =======================================================================
@@ -347,16 +347,9 @@ void Graphic3d_CView::ReCompute (const Handle(Graphic3d_Structure)& theStruct)
// function : Update
// purpose :
// =======================================================================
void Graphic3d_CView::Update (const Aspect_TypeOfUpdate theUpdateMode,
const Graphic3d_ZLayerId theLayerId)
void Graphic3d_CView::Update (const Graphic3d_ZLayerId theLayerId)
{
InvalidateZLayerBoundingBox (theLayerId);
if (theUpdateMode == Aspect_TOU_ASAP)
{
Compute();
Redraw();
}
}
// =======================================================================
@@ -589,10 +582,9 @@ Graphic3d_TypeOfAnswer Graphic3d_CView::acceptDisplay (const Graphic3d_TypeOfStr
void Graphic3d_CView::Compute()
{
// force HLRValidation to False on all structures calculated in the view
const Standard_Integer aNbCompStructs = myStructsComputed.Length();
for (Standard_Integer aStructIter = 1; aStructIter <= aNbCompStructs; ++aStructIter)
for (Graphic3d_SequenceOfStructure::Iterator aStructIter (myStructsComputed); aStructIter.More(); aStructIter.Next())
{
myStructsComputed.Value (aStructIter)->SetHLRValidation (Standard_False);
aStructIter.Value()->SetHLRValidation (Standard_False);
}
if (!ComputedMode())
@@ -615,7 +607,7 @@ void Graphic3d_CView::Compute()
for (NCollection_Sequence<Handle(Graphic3d_Structure)>::Iterator aStructIter (aStructsSeq); aStructIter.More(); aStructIter.Next())
{
Display (aStructIter.ChangeValue(), Aspect_TOU_WAIT);
Display (aStructIter.ChangeValue());
}
}
@@ -676,16 +668,6 @@ void Graphic3d_CView::Disconnect (const Handle(Graphic3d_Structure)& theMother,
// purpose :
// =======================================================================
void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure)
{
Display (theStructure, myStructureManager->UpdateMode());
}
// =======================================================================
// function : Display
// purpose :
// =======================================================================
void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure,
const Aspect_TypeOfUpdate theUpdateMode)
{
if (!IsActive())
{
@@ -725,7 +707,7 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure,
theStructure->CalculateBoundBox();
displayStructure (theStructure->CStructure(), theStructure->DisplayPriority());
Update (theUpdateMode, theStructure->GetZLayer());
Update (theStructure->GetZLayer());
return;
}
else if (anAnswer != Graphic3d_TOA_COMPUTE)
@@ -746,7 +728,7 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure,
}
displayStructure (anOldStruct->CStructure(), theStructure->DisplayPriority());
Update (theUpdateMode, anOldStruct->GetZLayer());
Update (anOldStruct->GetZLayer());
return;
}
else
@@ -769,7 +751,7 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure,
const Handle(Graphic3d_Structure)& aNewStruct = myStructsComputed.Value (aNewIndex);
myStructsComputed.SetValue (anIndex, aNewStruct);
displayStructure (aNewStruct->CStructure(), theStructure->DisplayPriority());
Update (theUpdateMode, aNewStruct->GetZLayer());
Update (aNewStruct->GetZLayer());
return;
}
else
@@ -849,7 +831,7 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure,
myStructsDisplayed.Add (theStructure);
displayStructure (aStruct->CStructure(), theStructure->DisplayPriority());
Update (theUpdateMode, aStruct->GetZLayer());
Update (aStruct->GetZLayer());
}
// =======================================================================
@@ -857,16 +839,6 @@ void Graphic3d_CView::Display (const Handle(Graphic3d_Structure)& theStructure,
// purpose :
// =======================================================================
void Graphic3d_CView::Erase (const Handle(Graphic3d_Structure)& theStructure)
{
Erase (theStructure, myStructureManager->UpdateMode());
}
// =======================================================================
// function : Erase
// purpose :
// =======================================================================
void Graphic3d_CView::Erase (const Handle(Graphic3d_Structure)& theStructure,
const Aspect_TypeOfUpdate theUpdateMode)
{
if (!IsDisplayed (theStructure))
{
@@ -893,7 +865,7 @@ void Graphic3d_CView::Erase (const Handle(Graphic3d_Structure)& theStructure,
}
}
myStructsDisplayed.Remove (theStructure);
Update (theUpdateMode, theStructure->GetZLayer());
Update (theStructure->GetZLayer());
}
// =======================================================================

View File

@@ -16,7 +16,6 @@
#include <Aspect_Handle.hxx>
#include <Aspect_RenderingContext.hxx>
#include <Aspect_TypeOfUpdate.hxx>
#include <Aspect_Window.hxx>
#include <Graphic3d_BufferType.hxx>
#include <Graphic3d_Camera.hxx>
@@ -106,10 +105,11 @@ public:
//! Computes the new presentation of the structure displayed in this view with the type Graphic3d_TOS_COMPUTED.
Standard_EXPORT void ReCompute (const Handle(Graphic3d_Structure)& theStructure);
//! Updates screen in function of modifications of the structures
//! and invalidates bounding box of specified ZLayerId.
Standard_EXPORT void Update (const Aspect_TypeOfUpdate theUpdateMode,
const Graphic3d_ZLayerId theLayerId = Graphic3d_ZLayerId_UNKNOWN);
//! Invalidates bounding box of specified ZLayerId.
Standard_EXPORT void Update (const Graphic3d_ZLayerId theLayerId = Graphic3d_ZLayerId_UNKNOWN);
//! Computes the new presentation of the structures displayed in this view with the type Graphic3d_TOS_COMPUTED.
Standard_EXPORT void Compute();
//! Returns Standard_True if one of the structures displayed in the view contains Polygons, Triangles or Quadrangles.
Standard_EXPORT Standard_Boolean ContainsFacet() const;
@@ -158,9 +158,6 @@ private:
//! Is it possible to display the structure in the view?
Standard_EXPORT Graphic3d_TypeOfAnswer acceptDisplay (const Graphic3d_TypeOfStructure theStructType) const;
//! Computes the new presentation of the structures displayed in this view with the type Graphic3d_TOS_COMPUTED.
Standard_EXPORT void Compute();
//! Clears the structure in this view.
Standard_EXPORT void Clear (const Handle(Graphic3d_Structure)& theStructure, const Standard_Boolean theWithDestruction);
@@ -175,17 +172,9 @@ private:
//! Displays the structure in the view.
Standard_EXPORT void Display (const Handle(Graphic3d_Structure)& theStructure);
//! Display the structure in the view.
Standard_EXPORT void Display (const Handle(Graphic3d_Structure)& theStructure,
const Aspect_TypeOfUpdate theUpdateMode);
//! Erases the structure from the view.
Standard_EXPORT void Erase (const Handle(Graphic3d_Structure)& theStructure);
//! Erases the structure from the view.
Standard_EXPORT void Erase (const Handle(Graphic3d_Structure)& theStructure,
const Aspect_TypeOfUpdate theUpdateMode);
//! Highlights the structure in the view.
Standard_EXPORT void Highlight (const Handle(Graphic3d_Structure)& theStructure);

View File

@@ -208,7 +208,7 @@ void Graphic3d_Group::Update() const
return;
}
myStructure->StructureManager()->Update (myStructure->StructureManager()->UpdateMode());
myStructure->StructureManager()->Update();
}
// =======================================================================

View File

@@ -619,24 +619,10 @@ void Graphic3d_Structure::SetVisual (const Graphic3d_TypeOfStructure theVisual)
}
else
{
Aspect_TypeOfUpdate anUpdateMode = myStructureManager->UpdateMode();
if (anUpdateMode == Aspect_TOU_WAIT)
{
Erase();
myVisual = theVisual;
SetComputeVisual (theVisual);
Display();
}
else {
// To avoid calling method : Update ()
// Not useful and can be costly.
myStructureManager->SetUpdateMode (Aspect_TOU_WAIT);
Erase();
myVisual = theVisual;
SetComputeVisual (theVisual);
myStructureManager->SetUpdateMode (anUpdateMode);
Display();
}
Erase();
myVisual = theVisual;
SetComputeVisual (theVisual);
Display();
}
}
@@ -1254,8 +1240,7 @@ void Graphic3d_Structure::Update (const bool theUpdateLayer) const
return;
}
myStructureManager->Update (myStructureManager->UpdateMode(),
theUpdateLayer ? myCStructure->ZLayer() : Graphic3d_ZLayerId_UNKNOWN);
myStructureManager->Update (theUpdateLayer ? myCStructure->ZLayer() : Graphic3d_ZLayerId_UNKNOWN);
}
//=============================================================================

View File

@@ -30,7 +30,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_StructureManager,MMgt_TShared)
// ========================================================================
Graphic3d_StructureManager::Graphic3d_StructureManager (const Handle(Graphic3d_GraphicDriver)& theDriver)
: myViewGenId (0, 31),
myUpdateMode (Aspect_TOU_WAIT),
myGraphicDriver (theDriver)
{
//
@@ -51,12 +50,11 @@ Graphic3d_StructureManager::~Graphic3d_StructureManager()
// function : Update
// purpose :
// ========================================================================
void Graphic3d_StructureManager::Update (const Aspect_TypeOfUpdate theMode,
const Graphic3d_ZLayerId theLayerId) const
void Graphic3d_StructureManager::Update (const Graphic3d_ZLayerId theLayerId) const
{
for (Graphic3d_IndexedMapOfView::Iterator aViewIt (myDefinedViews); aViewIt.More(); aViewIt.Next())
{
aViewIt.Value()->Update (theMode, theLayerId);
aViewIt.Value()->Update (theLayerId);
}
}

View File

@@ -19,7 +19,6 @@
#include <Aspect_GenId.hxx>
#include <Aspect_TypeOfHighlightMethod.hxx>
#include <Aspect_TypeOfUpdate.hxx>
#include <Graphic3d_CView.hxx>
#include <Graphic3d_MapOfObject.hxx>
#include <Graphic3d_MapOfStructure.hxx>
@@ -66,31 +65,8 @@ public:
//! Deletes the manager <me>.
Standard_EXPORT ~Graphic3d_StructureManager();
//! Modifies the screen update mode.
//!
//! TOU_ASAP - as soon as possible
//! TOU_WAIT - on demand (with the Update function)
//! Note : Dynamic Operations and Update Mode
//! Use SetUpdateMode to control when changes to
//! the display are made. Use one of the following
//! functions to update one or more views:
//! - Update all views of the viewer: Graphic3d_StructureManager::Update()
//! - Update one view of the viewer: Graphic3d_View::Update()
//! Use one of the following functions to update the entire display:
//! - Redraw all structures in all views: Graphic3d_StructureManager::Redraw()
//! - Redraw all structures in one view: Graphic3d_View::Redraw()
void SetUpdateMode (const Aspect_TypeOfUpdate theType) { myUpdateMode = theType; }
//! Returns the screen update mode.
//!
//! TOU_ASAP as soon as possible
//! TOU_WAIT on demand (Update)
Aspect_TypeOfUpdate UpdateMode() const { return myUpdateMode; }
//! Updates screen in function of modifications of the structures
//! and invalidates bounding box of specified ZLayerId.
Standard_EXPORT virtual void Update (const Aspect_TypeOfUpdate theMode = Aspect_TOU_ASAP,
const Graphic3d_ZLayerId theLayerId = Graphic3d_ZLayerId_UNKNOWN) const;
//! Invalidates bounding box of specified ZLayerId.
Standard_EXPORT virtual void Update (const Graphic3d_ZLayerId theLayerId = Graphic3d_ZLayerId_UNKNOWN) const;
//! Deletes and erases the 3D structure manager.
Standard_EXPORT virtual void Remove();
@@ -193,7 +169,6 @@ protected:
protected:
Aspect_GenId myViewGenId;
Aspect_TypeOfUpdate myUpdateMode;
Graphic3d_MapOfStructure myDisplayedStructure;
Graphic3d_MapOfStructure myHighlightedStructure;
Graphic3d_MapOfObject myRegisteredObjects;

View File

@@ -799,8 +799,8 @@ void OpenGl_View::changeZLayer (const Handle(Graphic3d_CStructure)& theStructure
const Graphic3d_ZLayerId anOldLayer = theStructure->ZLayer();
const OpenGl_Structure* aStruct = reinterpret_cast<const OpenGl_Structure*> (theStructure.operator->());
myZLayers.ChangeLayer (aStruct, anOldLayer, theNewLayerId);
Update (Aspect_TOU_WAIT, anOldLayer);
Update (Aspect_TOU_WAIT, theNewLayerId);
Update (anOldLayer);
Update (theNewLayerId);
}
//=======================================================================

View File

@@ -35,7 +35,6 @@ V3d_TypeOfPickCamera.hxx
V3d_TypeOfPickLight.hxx
V3d_TypeOfRepresentation.hxx
V3d_TypeOfShadingModel.hxx
V3d_TypeOfUpdate.hxx
V3d_TypeOfView.hxx
V3d_TypeOfVisualization.hxx
V3d_UnMapped.hxx

View File

@@ -274,7 +274,6 @@ void V3d_DirectionalLight::Display (const Handle(V3d_View)& theView,
Standard_Real DXRef,DYRef,DZRef,DXini,DYini,DZini;
Standard_Real R1,G1,B1;
V3d_TypeOfRepresentation Pres;
V3d_TypeOfUpdate UpdSov;
// Creation of a structure of markable elements (position of the
// light, and the domain of lighting represented by a circle)
@@ -283,8 +282,6 @@ void V3d_DirectionalLight::Display (const Handle(V3d_View)& theView,
Pres = theTPres;
Handle(V3d_Viewer) TheViewer = theView->Viewer();
UpdSov = TheViewer->UpdateMode();
TheViewer->SetUpdateMode(V3d_WAIT);
if (!myGraphicStructure.IsNull()) {
myGraphicStructure->Disconnect(myGraphicStructure1);
myGraphicStructure->Clear();
@@ -369,7 +366,6 @@ void V3d_DirectionalLight::Display (const Handle(V3d_View)& theView,
// cout << "MyGraphicStructure exploration \n" << flush; MyGraphicStructure->Exploration();
myTypeOfRepresentation = Pres;
myGraphicStructure->Display();
TheViewer->SetUpdateMode(UpdSov);
}
// =======================================================================

View File

@@ -171,7 +171,6 @@ void V3d_PositionLight::Display (const Handle(V3d_View)& theView, const V3d_Type
Standard_Real DXRef,DYRef,DZRef,DXini,DYini,DZini;
Standard_Real R1,G1,B1;
V3d_TypeOfRepresentation Pres;
V3d_TypeOfUpdate UpdSov;
// Creation of a structure of markable elements (position of the
// light, and the domain of lighting represented by a circle)
@@ -180,8 +179,6 @@ void V3d_PositionLight::Display (const Handle(V3d_View)& theView, const V3d_Type
Pres = theTPres;
Handle(V3d_Viewer) TheViewer = theView->Viewer();
UpdSov = TheViewer->UpdateMode();
TheViewer->SetUpdateMode(V3d_WAIT);
if (!myGraphicStructure.IsNull()) {
myGraphicStructure->Disconnect(myGraphicStructure1);
myGraphicStructure->Clear();
@@ -289,7 +286,6 @@ void V3d_PositionLight::Display (const Handle(V3d_View)& theView, const V3d_Type
myGraphicStructure->Connect(myGraphicStructure1,Graphic3d_TOC_DESCENDANT);
myTypeOfRepresentation = Pres;
myGraphicStructure->Display();
TheViewer->SetUpdateMode(UpdSov);
}
// =======================================================================

View File

@@ -233,7 +233,6 @@ void V3d_PositionalLight::Display (const Handle(V3d_View)& theView,
Standard_Real DXRef,DYRef,DZRef,DXini,DYini,DZini;
Standard_Real R1,G1,B1;
V3d_TypeOfRepresentation Pres;
V3d_TypeOfUpdate UpdSov;
// Creation of a structure slight of markable elements (position of the
// light, and the domain of lighting represented by a circle)
@@ -242,8 +241,6 @@ void V3d_PositionalLight::Display (const Handle(V3d_View)& theView,
Pres = theRepresentation;
Handle(V3d_Viewer) TheViewer = theView->Viewer();
UpdSov = TheViewer->UpdateMode();
TheViewer->SetUpdateMode(V3d_WAIT);
if (!myGraphicStructure.IsNull()) {
myGraphicStructure->Disconnect(myGraphicStructure1);
myGraphicStructure->Clear();
@@ -347,5 +344,4 @@ void V3d_PositionalLight::Display (const Handle(V3d_View)& theView,
myGraphicStructure->Connect(myGraphicStructure1,Graphic3d_TOC_DESCENDANT);
myTypeOfRepresentation = Pres;
myGraphicStructure->Display();
TheViewer->SetUpdateMode(UpdSov);
}

View File

@@ -271,7 +271,6 @@ void V3d_SpotLight::Display (const Handle(V3d_View)& theView,
Standard_Real DXRef,DYRef,DZRef,DXini,DYini,DZini;
Standard_Real R1,G1,B1;
V3d_TypeOfRepresentation Pres;
V3d_TypeOfUpdate UpdSov;
// Creation of a structure slight of markable elements (position of the
// light, and the domain of lighting represented by a circle)
@@ -280,8 +279,6 @@ void V3d_SpotLight::Display (const Handle(V3d_View)& theView,
Pres = theTPres;
Handle(V3d_Viewer) TheViewer = theView->Viewer();
UpdSov = TheViewer->UpdateMode();
TheViewer->SetUpdateMode(V3d_WAIT);
if (!myGraphicStructure.IsNull()) {
myGraphicStructure->Disconnect(myGraphicStructure1);
myGraphicStructure->Clear();
@@ -385,5 +382,4 @@ void V3d_SpotLight::Display (const Handle(V3d_View)& theView,
myGraphicStructure->Connect(myGraphicStructure1,Graphic3d_TOC_DESCENDANT);
myTypeOfRepresentation = Pres;
myGraphicStructure->Display();
TheViewer->SetUpdateMode(UpdSov);
}

View File

@@ -1,29 +0,0 @@
// Created on: 1992-11-13
// Created by: GG
// Copyright (c) 1992-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 _V3d_TypeOfUpdate_HeaderFile
#define _V3d_TypeOfUpdate_HeaderFile
//! Determines the type of update of the view
//! - V3d_ASAP: as soon as possible. The view is updated immediately after a modification.
//! - V3d_WAIT: deferred. The view is updated when the Update function is called.
enum V3d_TypeOfUpdate
{
V3d_ASAP,
V3d_WAIT
};
#endif // _V3d_TypeOfUpdate_HeaderFile

View File

@@ -218,7 +218,9 @@ void V3d_View::Update() const
return;
}
myView->Update (Aspect_TOU_ASAP);
myView->Update();
myView->Compute();
myView->Redraw();
}
//=============================================================================

View File

@@ -70,7 +70,6 @@ V3d_Viewer::V3d_Viewer (const Handle(Graphic3d_GraphicDriver)& theDriver,
const Quantity_NameOfColor theViewBackground,
const V3d_TypeOfVisualization theVisualization,
const V3d_TypeOfShadingModel theShadingModel,
const V3d_TypeOfUpdate theUpdateMode,
const Standard_Boolean theComputedMode,
const Standard_Boolean theDefaultComputedMode)
: myDriver (theDriver),
@@ -94,7 +93,6 @@ V3d_Viewer::V3d_Viewer (const Handle(Graphic3d_GraphicDriver)& theDriver,
myRGrid = new V3d_RectangularGrid (this, Quantity_Color (Quantity_NOC_GRAY50), Quantity_Color (Quantity_NOC_GRAY70));
myCGrid = new V3d_CircularGrid (this, Quantity_Color (Quantity_NOC_GRAY50), Quantity_Color (Quantity_NOC_GRAY70));
SetDefaultViewSize (theViewSize);
SetUpdateMode (theUpdateMode);
}
// ========================================================================
@@ -237,24 +235,6 @@ void V3d_Viewer::SetDefaultViewSize (const Standard_Real theSize)
myViewSize = theSize;
}
// ========================================================================
// function : SetUpdateMode
// purpose :
// ========================================================================
void V3d_Viewer::SetUpdateMode (const V3d_TypeOfUpdate theMode)
{
myStructureManager->SetUpdateMode (static_cast<Aspect_TypeOfUpdate> (theMode));
}
// ========================================================================
// function : UpdateMode
// purpose :
// ========================================================================
V3d_TypeOfUpdate V3d_Viewer::UpdateMode() const
{
return static_cast<V3d_TypeOfUpdate> (myStructureManager->UpdateMode());
}
// ========================================================================
// function : IfMoreViews
// purpose :

View File

@@ -47,7 +47,6 @@
#include <V3d_ListOfView.hxx>
#include <V3d_TypeOfOrientation.hxx>
#include <V3d_TypeOfShadingModel.hxx>
#include <V3d_TypeOfUpdate.hxx>
#include <V3d_TypeOfView.hxx>
#include <V3d_TypeOfVisualization.hxx>
@@ -194,15 +193,6 @@ public:
//! Gives the default type of SHADING.
void SetDefaultShadingModel (const V3d_TypeOfShadingModel theType) { myShadingModel = theType; }
//! Returns the regeneration mode of views in the viewer.
Standard_EXPORT V3d_TypeOfUpdate UpdateMode() const;
//! Defines the mode of regenerating the views making
//! up the viewer. This can be immediate <ASAP> or
//! deferred <WAIT>. In this latter case, the views are
//! updated when the method Update(me) is called.
Standard_EXPORT void SetUpdateMode (const V3d_TypeOfUpdate theMode);
void SetDefaultTypeOfView (const V3d_TypeOfView theType) { myDefaultTypeOfView = theType; }
//! Returns the default background colour object.
@@ -447,7 +437,6 @@ public: //! @name deprecated methods
const Quantity_NameOfColor theViewBackground = Quantity_NOC_GRAY30,
const V3d_TypeOfVisualization theVisualization = V3d_ZBUFFER,
const V3d_TypeOfShadingModel theShadingModel = V3d_GOURAUD,
const V3d_TypeOfUpdate theUpdateMode = V3d_WAIT,
const Standard_Boolean theComputedMode = Standard_True,
const Standard_Boolean theDefaultComputedMode = Standard_True);

View File

@@ -136,7 +136,7 @@ void VUserDrawObj::Compute(const Handle(PrsMgr_PresentationManager3d)& thePrsMgr
aGroup->AddElement(anElem);
// invalidate bounding box of the scene
thePrsMgr->StructureManager()->Update (thePrsMgr->StructureManager()->UpdateMode());
thePrsMgr->StructureManager()->Update();
}
void VUserDrawObj::ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,