1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 /***********************************************************************
19 Classe Visual3d_ViewManager.cxx :
21 Declaration of variables specific to visualisers
23 HISTORIQUE DES MODIFICATIONS :
24 --------------------------------
25 Mars 1992 : NW,JPB,CAL ; Creation.
26 19-06-96 : FMN ; Suppression variables inutiles
27 04-02-97 : FMN ; Suppression de PSOutput, XWDOutput ...
28 06-05-97 : CAL ; Ajout du Clear sur les TOS_COMPUTED.
29 19-09-97 : CAL ; Remplacement de Window->Position par Window->Size;
30 24-10-97 : CAL ; Retrait de DownCast.
31 20-11-97 : CAL ; Disparition de la dependance avec math
32 01-12-97 : CAL ; Retrait du test IsActive sur l'Update et le Redraw
33 31-12-97 : CAL ; Disparition de MathGra
34 16-01-98 : CAL ; Ajout du SetTransform sur une TOS_COMPUTED
35 11-03-98 : CAL ; Visual3d_ViewManager::Remove ()
36 20-05-98 : CAL ; Perfs. Connection entre structures COMPUTED.
37 10-06-98 : CAL ; Modification des signatures de xxProjectRaster.
38 10-06-98 : CAL ; Modification de la signature de ViewExists.
39 01-12-98 : CAL ; S4062. Ajout des layers.
40 02-12-98 : CAL ; Remove () ne detruit plus les vues.
42 ************************************************************************/
44 /*----------------------------------------------------------------------*/
52 /*----------------------------------------------------------------------*/
58 #include <Visual3d_ViewManager.ixx>
59 #include <Visual3d_ViewManager.pxx>
61 #include <Standard_ErrorHandler.hxx>
64 #include <Aspect_IdentDefinitionError.hxx>
66 #include <Graphic3d_GraphicDriver.hxx>
67 #include <Graphic3d_MapOfStructure.hxx>
68 #include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
70 #include <Visual3d_PickPath.hxx>
71 #include <Visual3d_SetIteratorOfSetOfView.hxx>
73 #if defined (_WIN32) || defined(__WIN32__)
74 # include <WNT_Window.hxx>
75 #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
76 # include <Cocoa_Window.hxx>
78 # include <Xw_Window.hxx>
83 //-Global data definitions
85 // -- les vues definies
86 // MyDefinedView : SetOfView;
88 // -- le generateur d'identificateurs de vues
89 // MyViewGenId : GenId;
93 Visual3d_ViewManager::Visual3d_ViewManager (const Handle(Graphic3d_GraphicDriver)& theDriver):
94 Graphic3d_StructureManager (theDriver),
96 MyViewGenId (View_IDMIN+((View_IDMIN+View_IDMAX)/(Visual3d_ViewManager::Limit ()))*(Visual3d_ViewManager::CurrentId ()-1),View_IDMIN+((View_IDMIN+View_IDMAX)/(Visual3d_ViewManager::Limit ()))*Visual3d_ViewManager::CurrentId ()-1),
97 MyZBufferAuto (Standard_False),
98 MyTransparency (Standard_False)
100 // default layer is always presented in display layer sequence
101 // it can not be removed
103 myLayerSeq.Append (0);
105 MyGraphicDriver = theDriver;
110 void Visual3d_ViewManager::Destroy () {
113 cout << "Visual3d_ViewManager::Destroy (" << MyId << ")\n" << flush;
121 void Visual3d_ViewManager::Remove () {
124 cout << "Visual3d_ViewManager::Remove (" << MyId << ")\n" << flush;
128 // Destroy all defined views
132 cout << "The Manager " << MyId << " have " << Length << " defined views\n";
136 // clear all structures whilst views are alive for correct GPU memory management
137 MyDisplayedStructure.Clear();
138 MyHighlightedStructure.Clear();
139 MyPickStructure.Clear();
141 // clear list of managed views
142 MyDefinedView.Clear();
145 void Visual3d_ViewManager::ChangeDisplayPriority (const Handle(Graphic3d_Structure)& AStructure, const Standard_Integer OldPriority, const Standard_Integer NewPriority) {
148 cout << "Visual3d_ViewManager::ChangeDisplayPriority ("
149 << AStructure->Identification ()
150 << ", " << OldPriority << ", " << NewPriority << ")\n";
155 // Change structure priority in all defined views
157 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
159 while (MyIterator.More ()) {
160 (MyIterator.Value ())->ChangeDisplayPriority
161 (AStructure, OldPriority, NewPriority);
163 // MyIterator.Next () is located on the next view
169 void Visual3d_ViewManager::ReCompute (const Handle(Graphic3d_Structure)& AStructure) {
171 //Standard_Integer LengthD = MyDisplayedStructure.Extent() ();
173 // Even if physically the structure cannot
174 // be displayed (pb of visualisation type)
175 // it has status Displayed.
177 if (!MyDisplayedStructure.Contains(AStructure))
181 // Recompute structure in all activated views
183 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
185 while (MyIterator.More ()) {
186 (MyIterator.Value ())->ReCompute (AStructure);
188 // MyIterator.Next () is located on the next view
194 void Visual3d_ViewManager::ReCompute (const Handle(Graphic3d_Structure)& AStructure,
195 const Handle(Graphic3d_DataStructureManager)& AProjector)
198 if (! AProjector->IsKind (STANDARD_TYPE (Visual3d_View))) return;
201 Handle(Visual3d_View) theView = Handle(Visual3d_View)::DownCast (AProjector);
203 Handle(Visual3d_View) theView = *(Handle(Visual3d_View) *) &AProjector;
205 Standard_Integer ViewId = theView->Identification ();
207 // Even if physically the structure cannot
208 // be displayed (pb of visualisation type)
209 // it has status Displayed.
210 if (!MyDisplayedStructure.Contains(AStructure))
214 // Recompute structure in all activated views
216 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
218 while (MyIterator.More ()) {
219 if ((MyIterator.Value ())->Identification () == ViewId)
220 theView->ReCompute (AStructure);
222 // MyIterator.Next () is located on the next view
228 void Visual3d_ViewManager::Clear (const Handle(Graphic3d_Structure)& AStructure, const Standard_Boolean WithDestruction) {
230 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
232 while (MyIterator.More ()) {
233 (MyIterator.Value ())->Clear (AStructure, WithDestruction);
235 // MyIterator.Next () is located on the next view
241 void Visual3d_ViewManager::Connect (const Handle(Graphic3d_Structure)& AMother, const Handle(Graphic3d_Structure)& ADaughter) {
243 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
245 while (MyIterator.More ()) {
246 (MyIterator.Value ())->Connect (AMother, ADaughter);
248 // MyIterator.Next () is located on the next view
254 void Visual3d_ViewManager::Disconnect (const Handle(Graphic3d_Structure)& AMother, const Handle(Graphic3d_Structure)& ADaughter) {
256 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
258 while (MyIterator.More ()) {
259 (MyIterator.Value ())->Disconnect (AMother, ADaughter);
261 // MyIterator.Next () is located on the next view
267 void Visual3d_ViewManager::Display (const Handle(Graphic3d_Structure)& AStructure) {
270 // Even if physically the structure cannot
271 // be displayed (pb of visualisation type)
272 // it has status Displayed.
274 MyDisplayedStructure.Add(AStructure);
277 // Display structure in all activated views
279 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
281 while (MyIterator.More ()) {
282 (MyIterator.Value ())->Display (AStructure);
284 // MyIterator.Next () is located on the next view
290 void Visual3d_ViewManager::Erase (const Handle(Graphic3d_Structure)& AStructure) {
293 // Even if physically the structure cannot
294 // be displayed (pb of visualisation type)
295 // it has status Displayed.
297 MyDisplayedStructure.Remove(AStructure);
302 // Erase structure in all defined views
304 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
306 while (MyIterator.More ()) {
307 (MyIterator.Value ())->Erase (AStructure);
309 // MyIterator.Next () is located on the next view
313 MyHighlightedStructure.Remove (AStructure);
314 MyPickStructure.Remove (AStructure);
318 void Visual3d_ViewManager::Erase () {
320 Graphic3d_MapIteratorOfMapOfStructure it( MyDisplayedStructure);
322 for (; it.More(); it.Next()) {
323 Handle(Graphic3d_Structure) SG = it.Key();
329 void Visual3d_ViewManager::Highlight (const Handle(Graphic3d_Structure)& AStructure, const Aspect_TypeOfHighlightMethod AMethod) {
331 MyHighlightedStructure.Add(AStructure);
334 // Highlight in all activated views
336 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
338 while (MyIterator.More ()) {
339 (MyIterator.Value ())->Highlight (AStructure, AMethod);
341 // MyIterator.Next () is located on the next view
347 void Visual3d_ViewManager::SetTransform (const Handle(Graphic3d_Structure)& AStructure, const TColStd_Array2OfReal& ATrsf) {
349 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
351 while (MyIterator.More ()) {
352 (MyIterator.Value ())->SetTransform (AStructure, ATrsf);
354 // MyIterator.Next () is located on the next view
360 void Visual3d_ViewManager::UnHighlight () {
362 Graphic3d_MapIteratorOfMapOfStructure it(MyHighlightedStructure);
364 for (; it.More(); it.Next()) {
365 Handle(Graphic3d_Structure) SG = it.Key();
372 void Visual3d_ViewManager::UnHighlight (const Handle(Graphic3d_Structure)& AStructure) {
374 MyHighlightedStructure.Remove(AStructure);
378 // UnHighlight in all activated views
380 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
382 while (MyIterator.More ()) {
383 (MyIterator.Value ())->UnHighlight (AStructure);
385 // MyIterator.Next () is located on the next view
391 void Visual3d_ViewManager::Redraw () const {
393 Standard_Integer MaxDx, MaxDy;
394 Standard_Integer Dx, Dy;
395 MaxDx = MaxDy = IntegerFirst ();
398 // Redraw all activated views
400 Standard_Integer j = MyDefinedView.Extent ();
402 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
404 if (! MyUnderLayer.IsNull () || ! MyOverLayer.IsNull ()) {
405 while (MyIterator.More ()) {
406 (MyIterator.Value ())->Window ()->Size (Dx, Dy);
407 if (Dx > MaxDx) MaxDx = Dx;
408 if (Dy > MaxDy) MaxDy = Dy;
410 // MyIterator.Next () is located on the next view
413 if (! MyUnderLayer.IsNull ())
414 MyUnderLayer->SetViewport (MaxDx, MaxDy);
415 if (! MyOverLayer.IsNull ())
416 MyOverLayer->SetViewport (MaxDx, MaxDy);
419 if (! MyUnderLayer.IsNull () || ! MyOverLayer.IsNull ())
420 MyIterator.Initialize (MyDefinedView);
421 while (MyIterator.More ()) {
422 (MyIterator.Value ())->Redraw (MyUnderLayer, MyOverLayer);
424 // MyIterator.Next () is located on the next view
430 void Visual3d_ViewManager::Update () const {
433 // Update all activated views
435 Standard_Integer j = MyDefinedView.Extent ();
437 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
439 while (MyIterator.More ()) {
440 (MyIterator.Value ())->Update (MyUnderLayer, MyOverLayer);
442 // MyIterator.Next () is located on the next view
448 Handle(Visual3d_HSetOfView) Visual3d_ViewManager::ActivatedView () const {
450 Handle (Visual3d_HSetOfView) SG = new Visual3d_HSetOfView ();
452 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
454 while (MyIterator.More ()) {
455 if ((MyIterator.Value ())->IsActive ())
456 SG->Add (MyIterator.Value ());
458 // MyIterator.Next () is located on the next view
467 Standard_Boolean Visual3d_ViewManager::ContainsComputedStructure () const {
469 Standard_Boolean Result = Standard_False;
472 // Check all activated views
474 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
476 Standard_Integer i = MyDefinedView.Extent ();
478 while ((! Result) && (MyIterator.More ())) {
479 if ((MyIterator.Value ())->IsActive ())
481 (MyIterator.Value ())->ContainsComputedStructure ();
483 // MyIterator.Next () is located on the next view
491 Handle(Visual3d_HSetOfView) Visual3d_ViewManager::DefinedView () const {
493 Handle (Visual3d_HSetOfView) SG = new Visual3d_HSetOfView ();
495 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
497 while (MyIterator.More ()) {
498 SG->Add (MyIterator.Value ());
500 // MyIterator.Next () is located on the next view
508 Standard_Boolean Visual3d_ViewManager::ViewExists (const Handle(Aspect_Window)& AWindow, Graphic3d_CView& TheCView) const {
510 Standard_Boolean Exist = Standard_False;
512 // Parse the list of views to find
513 // a view with the specified window
514 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
516 #if defined(_WIN32) || defined(__WIN32__)
517 const Handle(WNT_Window) THEWindow = Handle(WNT_Window)::DownCast (AWindow);
518 Aspect_Handle TheSpecifiedWindowId = THEWindow->HWindow ();
519 #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
520 const Handle(Cocoa_Window) THEWindow = Handle(Cocoa_Window)::DownCast (AWindow);
521 NSView* TheSpecifiedWindowId = THEWindow->HView();
523 const Handle(Xw_Window) THEWindow = Handle(Xw_Window)::DownCast (AWindow);
524 int TheSpecifiedWindowId = int (THEWindow->XWindow ());
527 while ((! Exist) && (MyIterator.More ())) {
529 if ( ((MyIterator.Value ())->IsDefined ()) &&
530 ((MyIterator.Value ())->IsActive ()) ) {
532 const Handle(Aspect_Window) AspectWindow = (MyIterator.Value ())->Window ();
533 #if defined(_WIN32) || defined(__WIN32__)
534 const Handle(WNT_Window) theWindow = Handle(WNT_Window)::DownCast (AspectWindow);
535 Aspect_Handle TheWindowIdOfView = theWindow->HWindow ();
536 #elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
537 const Handle(Cocoa_Window) theWindow = Handle(Cocoa_Window)::DownCast (AspectWindow);
538 NSView* TheWindowIdOfView = theWindow->HView();
540 const Handle(Xw_Window) theWindow = Handle(Xw_Window)::DownCast (AspectWindow);
541 int TheWindowIdOfView = int (theWindow->XWindow ());
543 // Comparaison on window IDs
544 if (TheWindowIdOfView == TheSpecifiedWindowId) {
545 Exist = Standard_True;
546 TheCView = *(Graphic3d_CView* )(MyIterator.Value())->CView();
548 } /* if ((MyIterator.Value ())->IsDefined ()) */
550 // MyIterator.Next () is located on the next view
558 void Visual3d_ViewManager::Activate () {
561 // Activates all deactivated views
563 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
565 while (MyIterator.More ()) {
566 if (! (MyIterator.Value ())->IsActive ())
567 (MyIterator.Value ())->Activate ();
569 // MyIterator.Next () is located on the next view
575 void Visual3d_ViewManager::Deactivate () {
578 // Deactivates all activated views
580 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
582 while (MyIterator.More ()) {
583 if ((MyIterator.Value ())->IsActive ())
584 (MyIterator.Value ())->Deactivate ();
586 // MyIterator.Next () is located on the next view
592 Standard_Integer Visual3d_ViewManager::MaxNumOfViews () const {
594 // Retourne the planned of definable views for the current
595 // Visual3d_ViewManager.
597 (Standard_Integer ((View_IDMAX-View_IDMIN+1)/Visual3d_ViewManager::Limit ()));
601 Handle(Graphic3d_Structure) Visual3d_ViewManager::Identification (const Standard_Integer AId) const {
603 return (Graphic3d_StructureManager::Identification (AId));
607 Standard_Integer Visual3d_ViewManager::Identification () const {
609 return (Graphic3d_StructureManager::Identification ());
613 Standard_Integer Visual3d_ViewManager::Identification (const Handle(Visual3d_View)& AView) {
615 MyDefinedView.Add (AView);
616 return (MyViewGenId.Next ());
620 void Visual3d_ViewManager::UnIdentification (const Standard_Integer aViewId)
622 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
623 while (MyIterator.More())
625 if ((MyIterator.Value())->Identification () == aViewId)
627 const Handle(Visual3d_View)& theView = MyIterator.Value();
628 //remove the view from the list
629 MyDefinedView.Remove(theView);
635 MyViewGenId.Free(aViewId);
638 void Visual3d_ViewManager::SetTransparency (const Standard_Boolean AFlag) {
640 if (MyTransparency && AFlag) return;
641 if (! MyTransparency && ! AFlag) return;
643 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
644 while (MyIterator.More ()) {
645 (MyIterator.Value ())->SetTransparency (AFlag);
646 // MyIterator.Next () is located on the next view
650 MyTransparency = AFlag;
654 Standard_Boolean Visual3d_ViewManager::Transparency () const {
656 return (MyTransparency);
660 void Visual3d_ViewManager::SetZBufferAuto (const Standard_Boolean AFlag) {
662 if (MyZBufferAuto && AFlag) return;
663 if (! MyZBufferAuto && ! AFlag) return;
665 // if pass from False to True :
666 // no problem, at the next view update, it
667 // will properly ask questions to answer (SetVisualisation)
668 // if pass from True to False :
669 // it is necessary to modify ZBufferActivity at each view so that
670 // zbuffer could be active only if required by context.
671 // In this case -1 is passed so that the view ask itself the question
672 // Note : 0 forces the desactivation, 1 forces the activation
674 Visual3d_SetIteratorOfSetOfView MyIterator(MyDefinedView);
675 while (MyIterator.More ()) {
676 (MyIterator.Value ())->SetZBufferActivity (-1);
677 // MyIterator.Next () is located on the next view
681 MyZBufferAuto = AFlag;
685 Standard_Boolean Visual3d_ViewManager::ZBufferAuto () const {
687 return (MyZBufferAuto);
691 void Visual3d_ViewManager::SetLayer (const Handle(Visual3d_Layer)& ALayer) {
694 cout << "Visual3d_ViewManager::SetLayer\n" << flush;
697 if (ALayer->Type () == Aspect_TOL_OVERLAY) {
699 if (MyOverLayer.IsNull ())
700 cout << "MyOverLayer is defined" << endl;
702 cout << "MyOverLayer is redefined" << endl;
704 MyOverLayer = ALayer;
708 if (MyUnderLayer.IsNull ())
709 cout << "MyUnderLayer is defined" << endl;
711 cout << "MyUnderLayer is redefined" << endl;
713 MyUnderLayer = ALayer;
718 const Handle(Visual3d_Layer)& Visual3d_ViewManager::UnderLayer () const {
720 return (MyUnderLayer);
724 const Handle(Visual3d_Layer)& Visual3d_ViewManager::OverLayer () const {
726 return (MyOverLayer);
730 //=======================================================================
731 //function : ChangeZLayer
733 //=======================================================================
735 void Visual3d_ViewManager::ChangeZLayer (const Handle(Graphic3d_Structure)& theStructure,
736 const Standard_Integer theLayerId)
738 if (!myLayerIds.Contains (theLayerId))
741 // change display layer for structure in all views
742 if (MyDisplayedStructure.Contains (theStructure))
744 Visual3d_SetIteratorOfSetOfView aViewIt(MyDefinedView);
745 for ( ; aViewIt.More (); aViewIt.Next ())
746 (aViewIt.Value ())->ChangeZLayer (theStructure, theLayerId);
749 // tell graphic driver to update the structure's display layer
750 MyGraphicDriver->ChangeZLayer (*(theStructure->CStructure()), theLayerId);
753 //=======================================================================
754 //function : GetZLayer
756 //=======================================================================
758 Standard_Integer Visual3d_ViewManager::GetZLayer (const Handle(Graphic3d_Structure)& theStructure) const
760 return MyGraphicDriver->GetZLayer (*theStructure->CStructure ());
763 //=======================================================================
764 //function : AddZLayer
766 //=======================================================================
768 Standard_Boolean Visual3d_ViewManager::AddZLayer (Standard_Integer& theLayerId)
773 theLayerId = getZLayerGenId ().Next ();
774 myLayerIds.Add (theLayerId);
775 myLayerSeq.Append (theLayerId);
777 catch (Aspect_IdentDefinitionError)
779 // new index can't be generated
780 return Standard_False;
783 // tell all managed views to remove display layers
784 Visual3d_SetIteratorOfSetOfView aViewIt(MyDefinedView);
785 for ( ; aViewIt.More (); aViewIt.Next ())
786 (aViewIt.Value ())->AddZLayer (theLayerId);
788 return Standard_True;
791 //=======================================================================
792 //function : RemoveZLayer
794 //=======================================================================
796 Standard_Boolean Visual3d_ViewManager::RemoveZLayer (const Standard_Integer theLayerId)
798 if (!myLayerIds.Contains (theLayerId) || theLayerId == 0)
799 return Standard_False;
801 // tell all managed views to remove display layers
802 Visual3d_SetIteratorOfSetOfView aViewIt(MyDefinedView);
803 for ( ; aViewIt.More (); aViewIt.Next ())
804 (aViewIt.Value ())->RemoveZLayer (theLayerId);
806 MyGraphicDriver->UnsetZLayer (theLayerId);
809 for (int aIdx = 1; aIdx <= myLayerSeq.Length (); aIdx++)
810 if (myLayerSeq(aIdx) == theLayerId)
812 myLayerSeq.Remove (aIdx);
816 myLayerIds.Remove (theLayerId);
817 getZLayerGenId ().Free (theLayerId);
819 return Standard_True;
822 //=======================================================================
823 //function : GetAllZLayers
825 //=======================================================================
827 void Visual3d_ViewManager::GetAllZLayers (TColStd_SequenceOfInteger& theLayerSeq) const
829 theLayerSeq.Assign (myLayerSeq);
832 //=======================================================================
833 //function : getZLayerGenId
835 //=======================================================================
837 Aspect_GenId& Visual3d_ViewManager::getZLayerGenId ()
839 static Aspect_GenId aGenId (1, IntegerLast());
843 //=======================================================================
844 //function : InstallZLayers
846 //=======================================================================
848 void Visual3d_ViewManager::InstallZLayers(const Handle(Visual3d_View)& theView) const
850 if (!MyDefinedView.Contains (theView))
853 // erase and insert layers iteratively to provide the same layer order as
854 // in the view manager's sequence. This approach bases on the layer insertion
855 // order: the new layers are always appended to the end of the list
856 // inside of view, while layer remove operation doesn't affect the order.
857 // Starting from second layer : no need to change the default z layer.
858 for (Standard_Integer aSeqIdx = 2; aSeqIdx <= myLayerSeq.Length (); aSeqIdx++)
860 Standard_Integer aLayerID = myLayerSeq.Value (aSeqIdx);
861 theView->RemoveZLayer (aLayerID);
862 theView->AddZLayer (aLayerID);