aGroup->AddElement(anElem);
// invalidate bounding box of the scene
- thePrsMgr->StructureManager()->Update (thePrsMgr->StructureManager()->UpdateMode());
+ thePrsMgr->StructureManager()->Update();
}
~~~~~
UpdateSelected, AddOrRemoveSelected, HilightSelected, UnhilightSelected, ClearSelected, ResetOriginalState,
SubIntensityOn, SubIntensityOff, FitSelected, EraseGlobal, ClearGlobal, ClearGlobalPrs.
+In addition, the API for immediate viewer update has been removed from V3d_View and Graphic3d_StructureManager classes
+(enumerations *Aspect_TypeOfUpdate* and *V3d_TypeOfUpdate*):
+ V3d::SetUpdateMode(), V3d::UpdateMode(), Graphic3d_StructureManager::SetUpdateMode(), Graphic3d_StructureManager::UpdateMode().
+
+The argument theUpdateMode has been removed from methods Graphic3d_CView::Display(), ::Erase(), ::Update().
+Method Graphic3d_CView::Update() does not redraw the view and does not re-compute structures anymore.
+
@subsection upgrade_720_Result_Of_BOP_On_Containers Result of Boolean operations on containers
* The result of Boolean operations on arguments of collection types (WIRE/SHELL/COMPSOLID) is now filtered from duplicating containers.
@subsubsection occt_visu_4_4_2 A programming example
-This sample TEST program for the *V3d* Package uses primary packages *Xw* and *Graphic3d* and secondary packages *Visual3d, Aspect, Quantity, Phigs* and *math*.
-
-~~~~~
-//Create a default display connection
-Handle(Aspect_DisplayConnection) aDisplayConnection = new Aspect_DisplayConnection();
-
-//Create a Graphic Driver from the default Aspect_DisplayConnection
-Handle(OpenGl_GraphicDriver) GD = new OpenGl_GraphicDriver (aDisplayConnection);
-
-//Create a Viewer to this Driver
-Handle(V3d_Viewer) VM = new V3d_Viewer(GD, 400.,
- // Space size
- V3d_Xpos,
- // Default projection
- Quantity_NOC_DARKVIOLET,
- // Default background
- V3d_ZBUFFER,
- // Type of visualization
- V3d_GOURAUD,
- // Shading model
- V3d_WAIT);
- // Update mode
-// Create a structure in this Viewer
-Handle(Graphic3d_Structure) S = new Graphic3d_Structure(VM->Viewer()) ;
-
-// Type of structure
-S->SetVisual (Graphic3d_TOS_SHADING);
+This sample TEST program for the *V3d* Package uses primary packages *Xw* and *Graphic3d* and secondary packages *Visual3d, Aspect, Quantity* and *math*.
+
+~~~~~
+// Create a default display connection
+Handle(Aspect_DisplayConnection) aDispConnection = new Aspect_DisplayConnection();
+
+// Create a Graphic Driver from the default Aspect_DisplayConnection
+Handle(OpenGl_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver (aDispConnection);
+
+// Create a Viewer to this Driver
+Handle(V3d_Viewer) VM = new V3d_Viewer (aGraphicDriver);
+VM->SetDefaultBackgroundColor (Quantity_NOC_DARKVIOLET);
+VM->SetDefaultViewProj (V3d_Xpos);
+// Create a structure in this Viewer
+Handle(Graphic3d_Structure) aStruct = new Graphic3d_Structure (VM->Viewer());
+
+// Type of structure
+aStruct->SetVisual (Graphic3d_TOS_SHADING);
// Create a group of primitives in this structure
-Handle(Graphic3d_Group) G = new Graphic3d_Group(S) ;
+Handle(Graphic3d_Group) aPrsGroup = new Graphic3d_Group (aStruct);
-// Fill this group with one polygon of size 100
-Graphic3d_Array1OfVertex Points(0,3) ;
-Points(0).SetCoord(-100./2.,-100./2.,-100./2.) ;
-Points(1).SetCoord(-100./2., 100./2.,-100./2.) ;
-Points(2).SetCoord( 100./2., 100./2.,-100./2.) ;
-Points(3).SetCoord( 100./2.,-100./2.,-100./2.) ;
-Normal.SetCoord(0.,0.,1.) ;
-G->Polygon(Points,Normal) ;
+// Fill this group with one quad of size 100
+Handle(Graphic3d_ArrayOfTriangleStrips) aTriangles = new Graphic3d_ArrayOfTriangleStrips (4);
+aTriangles->AddVertex (-100./2., -100./2., 0.0);
+aTriangles->AddVertex (-100./2., 100./2., 0.0);
+aTriangles->AddVertex ( 100./2., -100./2., 0.0);
+aTriangles->AddVertex ( 100./2., 100./2., 0.0);
+aPrsGroup->Polygon (aTriangles);
// Create Ambient and Infinite Lights in this Viewer
-Handle(V3d_AmbientLight) L1 = new V3d_AmbientLight
- (VM,Quantity_NOC_GRAY50) ;
-Handle(V3d_DirectionalLight) L2 = new V3d_DirectionalLight
- (VM,V3d_XnegYnegZneg,Quantity_NOC_WHITE) ;
+Handle(V3d_AmbientLight) aLight1 = new V3d_AmbientLight (VM, Quantity_NOC_GRAY50);
+Handle(V3d_DirectionalLight) aLight2 = new V3d_DirectionalLight (VM, V3d_XnegYnegZneg, Quantity_NOC_WHITE);
// Create a 3D quality Window with the same DisplayConnection
-Handle(Xw_Window) W = new Xw_Window(aDisplayConnection,"Test V3d",0.5,0.5,0.5,0.5) ;
+Handle(Xw_Window) aWindow = new Xw_Window (aDispConnection, "Test V3d", 0.5, 0.5, 0.5, 0.5);
-// Map this Window to this screen
-W->Map() ;
+// Map this Window to this screen
+aWindow->Map();
// Create a Perspective View in this Viewer
-Handle(V3d_View) aView = new V3d_View(VM);
+Handle(V3d_View) aView = new V3d_View (VM);
aView->Camera()->SetProjectionType (Graphic3d_Camera::Projection_Perspective);
// Associate this View with the Window
-aView ->SetWindow(W);
+aView ->SetWindow (aWindow);
// Display ALL structures in this View
VM->Viewer()->Display();
// Finally update the Visualization in this View
+++ /dev/null
-// 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
Aspect_TypeOfResize.hxx
Aspect_TypeOfStyleText.hxx
Aspect_TypeOfTriedronPosition.hxx
-Aspect_TypeOfUpdate.hxx
Aspect_Units.hxx
Aspect_WidthOfLine.hxx
Aspect_Window.cxx
if (anAnswer == Graphic3d_TOA_YES
|| anAnswer == Graphic3d_TOA_COMPUTE)
{
- Display (aStruct, Aspect_TOU_WAIT);
+ Display (aStruct);
}
}
}
- Update (myStructureManager->UpdateMode());
+ Update();
}
// =======================================================================
if (anAnswer == Graphic3d_TOA_YES
|| anAnswer == Graphic3d_TOA_COMPUTE)
{
- Erase (aStruct, Aspect_TOU_WAIT);
+ Erase (aStruct);
}
}
- Update (myStructureManager->UpdateMode());
+ Update();
myIsActive = Standard_False;
}
}
for (Graphic3d_MapIteratorOfMapOfStructure aStructIter (aDisplayedStructs); aStructIter.More(); aStructIter.Next())
{
- Erase (aStructIter.Value(), Aspect_TOU_WAIT);
+ Erase (aStructIter.Value());
}
myStructsToCompute.Clear();
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);
displayStructure (aCompStruct->CStructure(), aStruct->DisplayPriority());
}
}
- Update (myStructureManager->UpdateMode());
+ Update();
}
// =======================================================================
// 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();
- }
}
// =======================================================================
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())
for (NCollection_Sequence<Handle(Graphic3d_Structure)>::Iterator aStructIter (aStructsSeq); aStructIter.More(); aStructIter.Next())
{
- Display (aStructIter.ChangeValue(), Aspect_TOU_WAIT);
+ Display (aStructIter.ChangeValue());
}
}
// 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())
{
theStructure->CalculateBoundBox();
displayStructure (theStructure->CStructure(), theStructure->DisplayPriority());
- Update (theUpdateMode, theStructure->GetZLayer());
+ Update (theStructure->GetZLayer());
return;
}
else if (anAnswer != Graphic3d_TOA_COMPUTE)
}
displayStructure (anOldStruct->CStructure(), theStructure->DisplayPriority());
- Update (theUpdateMode, anOldStruct->GetZLayer());
+ Update (anOldStruct->GetZLayer());
return;
}
else
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
myStructsDisplayed.Add (theStructure);
displayStructure (aStruct->CStructure(), theStructure->DisplayPriority());
- Update (theUpdateMode, aStruct->GetZLayer());
+ Update (aStruct->GetZLayer());
}
// =======================================================================
// 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))
{
}
}
myStructsDisplayed.Remove (theStructure);
- Update (theUpdateMode, theStructure->GetZLayer());
+ Update (theStructure->GetZLayer());
}
// =======================================================================
#include <Aspect_Handle.hxx>
#include <Aspect_RenderingContext.hxx>
-#include <Aspect_TypeOfUpdate.hxx>
#include <Aspect_Window.hxx>
#include <Graphic3d_BufferType.hxx>
#include <Graphic3d_Camera.hxx>
//! 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;
//! 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);
//! 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);
return;
}
- myStructure->StructureManager()->Update (myStructure->StructureManager()->UpdateMode());
+ myStructure->StructureManager()->Update();
}
// =======================================================================
}
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();
}
}
return;
}
- myStructureManager->Update (myStructureManager->UpdateMode(),
- theUpdateLayer ? myCStructure->ZLayer() : Graphic3d_ZLayerId_UNKNOWN);
+ myStructureManager->Update (theUpdateLayer ? myCStructure->ZLayer() : Graphic3d_ZLayerId_UNKNOWN);
}
//=============================================================================
// ========================================================================
Graphic3d_StructureManager::Graphic3d_StructureManager (const Handle(Graphic3d_GraphicDriver)& theDriver)
: myViewGenId (0, 31),
- myUpdateMode (Aspect_TOU_WAIT),
myGraphicDriver (theDriver)
{
//
// 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);
}
}
#include <Aspect_GenId.hxx>
#include <Aspect_TypeOfHighlightMethod.hxx>
-#include <Aspect_TypeOfUpdate.hxx>
#include <Graphic3d_CView.hxx>
#include <Graphic3d_MapOfObject.hxx>
#include <Graphic3d_MapOfStructure.hxx>
//! 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();
protected:
Aspect_GenId myViewGenId;
- Aspect_TypeOfUpdate myUpdateMode;
Graphic3d_MapOfStructure myDisplayedStructure;
Graphic3d_MapOfStructure myHighlightedStructure;
Graphic3d_MapOfObject myRegisteredObjects;
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);
}
//=======================================================================
V3d_TypeOfPickLight.hxx
V3d_TypeOfRepresentation.hxx
V3d_TypeOfShadingModel.hxx
-V3d_TypeOfUpdate.hxx
V3d_TypeOfView.hxx
V3d_TypeOfVisualization.hxx
V3d_UnMapped.hxx
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)
Pres = theTPres;
Handle(V3d_Viewer) TheViewer = theView->Viewer();
- UpdSov = TheViewer->UpdateMode();
- TheViewer->SetUpdateMode(V3d_WAIT);
if (!myGraphicStructure.IsNull()) {
myGraphicStructure->Disconnect(myGraphicStructure1);
myGraphicStructure->Clear();
// cout << "MyGraphicStructure exploration \n" << flush; MyGraphicStructure->Exploration();
myTypeOfRepresentation = Pres;
myGraphicStructure->Display();
- TheViewer->SetUpdateMode(UpdSov);
}
// =======================================================================
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)
Pres = theTPres;
Handle(V3d_Viewer) TheViewer = theView->Viewer();
- UpdSov = TheViewer->UpdateMode();
- TheViewer->SetUpdateMode(V3d_WAIT);
if (!myGraphicStructure.IsNull()) {
myGraphicStructure->Disconnect(myGraphicStructure1);
myGraphicStructure->Clear();
myGraphicStructure->Connect(myGraphicStructure1,Graphic3d_TOC_DESCENDANT);
myTypeOfRepresentation = Pres;
myGraphicStructure->Display();
- TheViewer->SetUpdateMode(UpdSov);
}
// =======================================================================
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)
Pres = theRepresentation;
Handle(V3d_Viewer) TheViewer = theView->Viewer();
- UpdSov = TheViewer->UpdateMode();
- TheViewer->SetUpdateMode(V3d_WAIT);
if (!myGraphicStructure.IsNull()) {
myGraphicStructure->Disconnect(myGraphicStructure1);
myGraphicStructure->Clear();
myGraphicStructure->Connect(myGraphicStructure1,Graphic3d_TOC_DESCENDANT);
myTypeOfRepresentation = Pres;
myGraphicStructure->Display();
- TheViewer->SetUpdateMode(UpdSov);
}
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)
Pres = theTPres;
Handle(V3d_Viewer) TheViewer = theView->Viewer();
- UpdSov = TheViewer->UpdateMode();
- TheViewer->SetUpdateMode(V3d_WAIT);
if (!myGraphicStructure.IsNull()) {
myGraphicStructure->Disconnect(myGraphicStructure1);
myGraphicStructure->Clear();
myGraphicStructure->Connect(myGraphicStructure1,Graphic3d_TOC_DESCENDANT);
myTypeOfRepresentation = Pres;
myGraphicStructure->Display();
- TheViewer->SetUpdateMode(UpdSov);
}
+++ /dev/null
-// 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
return;
}
- myView->Update (Aspect_TOU_ASAP);
+ myView->Update();
+ myView->Compute();
+ myView->Redraw();
}
//=============================================================================
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),
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);
}
// ========================================================================
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 :
#include <V3d_ListOfView.hxx>
#include <V3d_TypeOfOrientation.hxx>
#include <V3d_TypeOfShadingModel.hxx>
-#include <V3d_TypeOfUpdate.hxx>
#include <V3d_TypeOfView.hxx>
#include <V3d_TypeOfVisualization.hxx>
//! 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.
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);
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,