1 // Created on: 1997-01-29
2 // Created by: Robert COUBLANC
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <AIS_InteractiveContext.jxx>
19 #include <AIS_LocalContext.hxx>
21 #include <AIS_GlobalStatus.hxx>
22 #include <TColStd_ListIteratorOfListOfInteger.hxx>
24 #include <AIS_DataMapIteratorOfDataMapOfIOStatus.hxx>
25 #include <AIS_DataMapIteratorOfDataMapOfILC.hxx>
26 #include <Graphic3d_StructureManager.hxx>
27 #include <Graphic3d_Structure.hxx>
28 #include <Graphic3d_MapOfStructure.hxx>
29 #include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
30 #include <AIS_Selection.hxx>
32 #include <StdSelect_ViewerSelector3d.hxx>
34 //=======================================================================
35 //function : OpenLocalContext
37 //=======================================================================
39 Standard_Integer AIS_InteractiveContext::
40 OpenLocalContext(const Standard_Boolean UseDisplayedObjects,
41 const Standard_Boolean AllowShapeDecomposition,
42 const Standard_Boolean AcceptEraseOfTemporary,
43 const Standard_Boolean /*BothViewers*/)
46 // the entities eventually detected just before the context was opened are unhighlighted...
47 if(!IsCurrent(myLastPicked)){
48 if(!myLastPicked.IsNull()){
49 Standard_Integer HiMod = myLastPicked->HasHilightMode()?myLastPicked->HilightMode():0;
50 myMainPM->Unhighlight(myLastPicked,HiMod);
53 if(!mylastmoveview.IsNull()){
55 myLocalContexts(myCurLocalIndex)->UnhilightLastDetected(mylastmoveview);
58 // entities connected to dynamic selection at neutral point are set to 0.
60 myLastinMain.Nullify();
61 myLastPicked.Nullify();
62 myWasLastMain = Standard_True;
64 myCurLocalIndex = HighestIndex() + 1;
66 Handle(AIS_LocalContext) NewLocal= new AIS_LocalContext(this,myCurLocalIndex,
68 AllowShapeDecomposition,
69 AcceptEraseOfTemporary);
70 // the AIS_LocalContext bind itself to myLocalContexts
71 // because procedures performed in AIS_LocalContext constructor
72 // already may access myLocalContexts(myCurLocalIndex) (like methods AIS_LocalContext::IsSelected()).
75 cout<<"\tOpen Local Context No "<<myCurLocalIndex<<endl;
76 if(UseDisplayedObjects){
77 cout<<"\t\tObjects from Neutral Point loaded"<<endl;
78 if(AllowShapeDecomposition)
79 cout<<"\t\tDecomposition Authorized for Loaded Shapes"<<endl;
81 cout<<"\t\tNo Decomposition Authorized for Loaded Shapes"<<endl;
84 cout<<"\t\tNo Objects Were Loaded "<<endl;
86 return myCurLocalIndex;
89 //=======================================================================
90 //function : CloseLocalContext
92 //=======================================================================
94 void AIS_InteractiveContext::CloseLocalContext(const Standard_Integer Index,
95 const Standard_Boolean updateviewer)
98 Standard_Boolean debugmode(Standard_False);
100 debugmode = Standard_True;
103 Standard_Integer GoodIndex = (Index ==-1) ? myCurLocalIndex : Index;
105 if(debugmode) cout<<"Call to CloseLocalContext - Index "<<GoodIndex<<endl;
106 if(!HasOpenedContext()){
107 if(debugmode) cout<<"\t But No Local Context is opened"<<endl;
110 if(!myLocalContexts.IsBound(GoodIndex)) {
111 if(debugmode) cout<<" Attempt to Close a non-existent Local Context"<<endl;
115 // the only open local context is closed...
116 if(myLocalContexts.Extent()==1 && GoodIndex == myCurLocalIndex){
118 myLocalContexts(myCurLocalIndex)->Terminate( updateviewer );
119 myLocalContexts.UnBind(myCurLocalIndex);
122 ResetOriginalState(Standard_False);
124 cout<<"No More Opened Local Context "<<endl;
127 // Otherwise the local context will be still open after the current is closed
129 Handle(StdSelect_ViewerSelector3d) VS = myLocalContexts(GoodIndex)->MainSelector();
130 myLocalContexts(GoodIndex)->Terminate();
131 myLocalContexts.UnBind(GoodIndex);
132 // the current is closed...
133 if(GoodIndex==myCurLocalIndex){
134 myCurLocalIndex = HighestIndex();
137 cout<<"a No Current Local Context WasClosed"<<endl;
139 if(debugmode) cout<<"Index Of CurrentLocalContext:"<<myCurLocalIndex<<endl;
144 if(updateviewer) myMainVwr->Update();
147 //=======================================================================
148 //function : CloseAllContexts
150 //=======================================================================
152 void AIS_InteractiveContext::CloseAllContexts(const Standard_Boolean updateviewer)
155 while(!myLocalContexts.IsEmpty()){
156 CloseLocalContext(myCurLocalIndex,Standard_False);
159 ResetOriginalState(Standard_False);
161 if(updateviewer) myMainVwr->Update();
164 //=======================================================================
165 //function : IndexOfCurrentLocal
167 //=======================================================================
169 Standard_Integer AIS_InteractiveContext::IndexOfCurrentLocal() const
171 return myCurLocalIndex;
174 //=======================================================================
175 //function : ClearLocalContext
177 //=======================================================================
179 void AIS_InteractiveContext::ClearLocalContext(const AIS_ClearMode aMode)
181 if (!HasOpenedContext()) return;
182 myLocalContexts(myCurLocalIndex)->Clear(aMode);
186 //=======================================================================
187 //function : HighestIndex
189 //=======================================================================
191 Standard_Integer AIS_InteractiveContext::HighestIndex() const
193 AIS_DataMapIteratorOfDataMapOfILC It(myLocalContexts);
194 Standard_Integer HiInd = 0;
195 for(;It.More();It.Next())
196 HiInd = (It.Key()>HiInd) ? It.Key() : HiInd;
202 //=======================================================================
203 //function : Activate
205 //=======================================================================
207 void AIS_InteractiveContext::
208 Activate(const Handle(AIS_InteractiveObject)& anIObj,
209 const Standard_Integer aMode,
210 const Standard_Boolean theIsForce)
212 if(!HasOpenedContext()){
213 if(!myObjects.IsBound(anIObj)) return;
214 const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
215 if(STAT->GraphicStatus()==AIS_DS_Displayed || theIsForce)
216 mgrSelector->Activate(anIObj,aMode,myMainSel);
217 STAT ->AddSelectionMode(aMode);
220 myLocalContexts(myCurLocalIndex)->ActivateMode(anIObj,aMode);
224 //=======================================================================
225 //function : LocalSelector
227 //=======================================================================
228 Handle( StdSelect_ViewerSelector3d ) AIS_InteractiveContext::LocalSelector() const
230 if( !HasOpenedContext() )
231 return Handle( StdSelect_ViewerSelector3d )();
233 return myLocalContexts( myCurLocalIndex )->MainSelector();
237 //=======================================================================
238 //function : DeActivate
240 //=======================================================================
241 void AIS_InteractiveContext::
242 Deactivate(const Handle(AIS_InteractiveObject)& anIObj)
244 if(!HasOpenedContext()){
245 if(!myObjects.IsBound(anIObj)) return;
246 TColStd_ListIteratorOfListOfInteger ItL;
247 for(ItL.Initialize(myObjects(anIObj)->SelectionModes());
250 if(myObjects(anIObj)->GraphicStatus() == AIS_DS_Displayed)
251 mgrSelector->Deactivate(anIObj,ItL.Value(),myMainSel);
253 myObjects(anIObj)->ClearSelectionModes();
256 const Handle(AIS_LocalContext)& LC = myLocalContexts(myCurLocalIndex);
257 LC->Deactivate(anIObj);
261 //=======================================================================
262 //function : Deactivate
264 //=======================================================================
266 void AIS_InteractiveContext::Deactivate(const Handle(AIS_InteractiveObject)& anIObj,
267 const Standard_Integer aMode)
269 if(!HasOpenedContext()){
270 if(!myObjects.IsBound(anIObj)) return;
271 const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
273 if(STAT->GraphicStatus() == AIS_DS_Displayed)
274 mgrSelector->Deactivate(anIObj,aMode,myMainSel);
275 STAT->RemoveSelectionMode(aMode);
278 myLocalContexts(myCurLocalIndex)->DeactivateMode(anIObj,aMode);
282 //=======================================================================
283 //function : ActivatedModes
285 //=======================================================================
287 void AIS_InteractiveContext::
288 ActivatedModes(const Handle(AIS_InteractiveObject)& anIObj,
289 TColStd_ListOfInteger& theList) const
291 TColStd_ListIteratorOfListOfInteger ItL;
292 if(!HasOpenedContext()){
293 if(myObjects.IsBound(anIObj)){
294 for(ItL.Initialize(myObjects(anIObj)->SelectionModes());
297 theList.Append(ItL.Value());
302 if(myLocalContexts(myCurLocalIndex)->IsIn(anIObj)){
303 for(ItL.Initialize(myLocalContexts(myCurLocalIndex)->SelectionModes(anIObj));
306 theList.Append(ItL.Value());
311 //=======================================================================
312 //function : SetShapeDecomposition
314 //=======================================================================
316 void AIS_InteractiveContext::SetShapeDecomposition(const Handle(AIS_InteractiveObject)& anIObj,
317 const Standard_Boolean StdModeSensitive)
319 if(!HasOpenedContext()) return;
320 myLocalContexts(myCurLocalIndex)->SetShapeDecomposition(anIObj,StdModeSensitive);
323 //=======================================================================
324 //function : SetTemporaryAttributes
326 //=======================================================================
328 void AIS_InteractiveContext::
329 SetTemporaryAttributes(const Handle(AIS_InteractiveObject)& /*anObj*/,
330 const Handle(Prs3d_Drawer)& /*aDrawer*/,
331 const Standard_Boolean /*updateviewer*/)
335 //=======================================================================
336 //function : SubIntensityOn
338 //=======================================================================
339 void AIS_InteractiveContext::
340 SubIntensityOn(const Handle(AIS_InteractiveObject)& anIObj,
341 const Standard_Boolean updateviewer)
343 if(!HasOpenedContext()){
344 if(!myObjects.IsBound(anIObj))
346 const Handle(AIS_GlobalStatus)& GB=myObjects(anIObj);
347 if(GB->IsSubIntensityOn())
349 GB->SubIntensityOn();
350 Standard_Boolean UpdMain(Standard_False);
352 for(TColStd_ListIteratorOfListOfInteger It(GB->DisplayedModes());It.More();It.Next()){
353 if (GB->GraphicStatus()==AIS_DS_Displayed)
355 myMainPM->Color(anIObj,mySubIntensity,It.Value());
356 UpdMain = Standard_True;
365 if(myObjects.IsBound(anIObj)){
366 const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
367 STAT->SubIntensityOn();
368 TColStd_ListIteratorOfListOfInteger ItL;
369 for (ItL.Initialize(STAT->DisplayedModes());ItL.More();ItL.Next())
370 myMainPM->Color(anIObj,mySubIntensity,ItL.Value());
373 myLocalContexts(myCurLocalIndex)->SubIntensityOn(anIObj);
375 if(updateviewer) myMainVwr->Update();
378 //=======================================================================
379 //function : SubIntensityOff
381 //=======================================================================
383 void AIS_InteractiveContext::
384 SubIntensityOff(const Handle(AIS_InteractiveObject)& anIObj,
385 const Standard_Boolean updateviewer)
387 if(!HasOpenedContext()){
388 if(!myObjects.IsBound(anIObj))
390 const Handle(AIS_GlobalStatus)& GB=myObjects(anIObj);
391 if(!GB->IsSubIntensityOn())
393 GB->SubIntensityOff();
394 Standard_Boolean UpdMain(Standard_False);
396 for(TColStd_ListIteratorOfListOfInteger It(GB->DisplayedModes());It.More();It.Next()){
397 if(GB->GraphicStatus()==AIS_DS_Displayed)
399 myMainPM->Unhighlight(anIObj,It.Value());
400 UpdMain = Standard_True;
404 Standard_Integer DM,HM,SM;
405 GetDefModes(anIObj,DM,HM,SM);
406 if(AIS_Selection::IsSelected(anIObj))
407 myMainPM->Highlight(anIObj,HM);
415 if(myObjects.IsBound(anIObj)){
416 const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
417 STAT->SubIntensityOff();
418 TColStd_ListIteratorOfListOfInteger ItL;
419 for (ItL.Initialize(STAT->DisplayedModes());ItL.More();ItL.Next())
420 myMainPM->Unhighlight(anIObj,ItL.Value());
421 if(STAT->IsHilighted())
425 myLocalContexts(myCurLocalIndex)->SubIntensityOff(anIObj);
426 if(IsSelected(anIObj))
429 if(updateviewer) myMainVwr->Update();
433 //=======================================================================
434 //function : SubIntensityOn
435 //purpose : ALL THE DISPLAYED OBJECTS HAVE SUBINTENSITY...
436 //=======================================================================
438 void AIS_InteractiveContext::SubIntensityOn(const Standard_Boolean updateviewer)
440 if(!HasOpenedContext()) return;
442 AIS_DataMapIteratorOfDataMapOfIOStatus It (myObjects);
443 TColStd_ListIteratorOfListOfInteger ItM;
444 for(;It.More();It.Next()){
445 const Handle(AIS_GlobalStatus)& STAT = It.Value();
446 if(STAT->GraphicStatus()==AIS_DS_Displayed)
448 STAT->SubIntensityOn();
449 for(ItM.Initialize(STAT->DisplayedModes());ItM.More();ItM.Next())
450 {myMainPM->Color(It.Key(),mySubIntensity,ItM.Value());}
453 if(updateviewer) myMainVwr->Update();
456 //=======================================================================
457 //function : SubIntensityOff
459 //=======================================================================
460 void AIS_InteractiveContext::SubIntensityOff(const Standard_Boolean updateviewer)
462 if(!HasOpenedContext()) return;
464 AIS_DataMapIteratorOfDataMapOfIOStatus It (myObjects);
465 TColStd_ListIteratorOfListOfInteger ItL;
466 for(;It.More();It.Next()){
467 const Handle(AIS_GlobalStatus)& STAT = It.Value();
468 if(STAT->IsSubIntensityOn())
469 STAT->SubIntensityOff();
470 for(ItL.Initialize(STAT->DisplayedModes());ItL.More();ItL.Next())
471 myMainPM->Unhighlight(It.Key());
474 if(updateviewer) myMainVwr->Update();
477 //=======================================================================
478 //function : AddFilter
480 //=======================================================================
481 void AIS_InteractiveContext::AddFilter(const Handle(SelectMgr_Filter)& aFilter)
483 if(HasOpenedContext())
484 myLocalContexts(myCurLocalIndex)->AddFilter(aFilter);
486 myFilters->Add(aFilter);
489 //=======================================================================
490 //function : ActivateStandardMode
492 //=======================================================================
493 void AIS_InteractiveContext::ActivateStandardMode(const TopAbs_ShapeEnum aStandardActivation)
495 if(!HasOpenedContext()) return;
496 myLocalContexts(myCurLocalIndex)->ActivateStandardMode (aStandardActivation);
499 //=======================================================================
500 //function : DeActivateStandardMode
502 //=======================================================================
503 void AIS_InteractiveContext::DeactivateStandardMode(const TopAbs_ShapeEnum aStandardActivation)
505 if(!HasOpenedContext()) return;
506 myLocalContexts(myCurLocalIndex)->DeactivateStandardMode (aStandardActivation);
509 //=======================================================================
510 //function : RemoveFilter
512 //=======================================================================
513 void AIS_InteractiveContext::RemoveFilter(const Handle(SelectMgr_Filter)& aFilter)
515 if(HasOpenedContext())
516 myLocalContexts(myCurLocalIndex)->RemoveFilter (aFilter);
518 myFilters->Remove(aFilter);
521 //=======================================================================
522 //function : RemoveFilters
524 //=======================================================================
526 void AIS_InteractiveContext::RemoveFilters()
528 if(!HasOpenedContext())
531 myLocalContexts(myCurLocalIndex)->Clear(AIS_CM_Filters);
534 //=======================================================================
535 //function : ActivatedStandardModes
537 //=======================================================================
538 const TColStd_ListOfInteger& AIS_InteractiveContext::ActivatedStandardModes() const
540 return myLocalContexts(myCurLocalIndex)->StandardModes();
543 //=======================================================================
546 //=======================================================================
547 const SelectMgr_ListOfFilter& AIS_InteractiveContext::Filters() const
549 if(HasOpenedContext())
550 return myLocalContexts(myCurLocalIndex)->ListOfFilter();
551 return myFilters->StoredFilters();
554 //=======================================================================
555 //function : DisplayActiveSensitive
557 //=======================================================================
558 void AIS_InteractiveContext::DisplayActiveSensitive(const Handle(V3d_View)& aviou)
560 if(HasOpenedContext())
561 myLocalContexts(myCurLocalIndex)->DisplaySensitive(aviou);
563 myMainSel->DisplaySensitive(aviou);
565 //=======================================================================
566 //function : DisplayActiveSensitive
568 //=======================================================================
570 void AIS_InteractiveContext::DisplayActiveSensitive(const Handle(AIS_InteractiveObject)& anIObj,
571 const Handle(V3d_View)& aviou)
573 TColStd_ListIteratorOfListOfInteger It;
574 Handle(StdSelect_ViewerSelector3d) VS;
575 if(HasOpenedContext()){
576 const Handle(AIS_LocalContext)& LC = myLocalContexts(myCurLocalIndex);
577 if(!LC->IsIn(anIObj)) return;
578 It.Initialize(LC->SelectionModes(anIObj));
579 VS = LC->MainSelector();
582 if(!myObjects.IsBound(anIObj)) return;
583 It.Initialize(myObjects(anIObj)->SelectionModes());
588 for(;It.More();It.Next()){
589 const Handle(SelectMgr_Selection)& Sel = anIObj->Selection(It.Value());
590 VS->DisplaySensitive(Sel,anIObj->Transformation(), aviou,Standard_False);
595 //=======================================================================
596 //function : ClearActiveSensitive
598 //=======================================================================
599 void AIS_InteractiveContext::ClearActiveSensitive(const Handle(V3d_View)& aviou)
602 if(HasOpenedContext())
603 myLocalContexts(myCurLocalIndex)->ClearSensitive(aviou);
605 myMainSel->ClearSensitive(aviou);
608 //=======================================================================
609 //function : SetAutomaticHilight
611 //=======================================================================
612 void AIS_InteractiveContext::SetAutomaticHilight(const Standard_Boolean aStatus)
615 if(HasOpenedContext())
616 myLocalContexts(myCurLocalIndex)->SetAutomaticHilight(aStatus);
619 //=======================================================================
620 //function : AutomaticHilight
622 //=======================================================================
623 Standard_Boolean AIS_InteractiveContext::AutomaticHilight() const
625 if(HasOpenedContext())
626 return myLocalContexts(myCurLocalIndex)->AutomaticHilight();
627 return Standard_True;
630 //=======================================================================
631 //function : UseDisplayedObjects
633 //=======================================================================
635 void AIS_InteractiveContext::UseDisplayedObjects()
637 if(HasOpenedContext())
638 myLocalContexts(myCurLocalIndex)->LoadContextObjects();
641 //=======================================================================
642 //function : NotUseDisplayedObjects
644 //=======================================================================
646 void AIS_InteractiveContext::NotUseDisplayedObjects()
648 if(HasOpenedContext())
649 myLocalContexts(myCurLocalIndex)->UnloadContextObjects();
655 //=======================================================================
656 //function : PurgeDisplay
658 //=======================================================================
660 Standard_Integer AIS_InteractiveContext::PurgeDisplay()
662 if(HasOpenedContext()) return 0;
664 Standard_Integer NbStr = PurgeViewer(myMainVwr);
671 //=======================================================================
672 //function : PurgeViewer
674 //=======================================================================
675 Standard_Integer AIS_InteractiveContext::PurgeViewer(const Handle(V3d_Viewer)& Vwr)
677 Handle(Graphic3d_StructureManager) GSM = Vwr->Viewer();
678 Standard_Integer NbCleared(0);
679 Graphic3d_MapOfStructure SOS;
680 GSM->DisplayedStructures(SOS);
682 Handle(Graphic3d_Structure) G;
683 for(Graphic3d_MapIteratorOfMapOfStructure It(SOS); It.More();It.Next()){
685 Standard_Address Add = G->Owner();
688 G->Clear();// it means that it is not referenced as a presentation of InterfactiveObject...
691 Handle(AIS_InteractiveObject) IO = (AIS_InteractiveObject*)Add;
692 if(!myObjects.IsBound(IO)){
700 //=======================================================================
701 //function : IsImmediateModeOn
703 //=======================================================================
705 Standard_Boolean AIS_InteractiveContext::IsImmediateModeOn() const
707 if(!HasOpenedContext()) return Standard_False;
708 return myLocalContexts(myCurLocalIndex)->IsImmediateModeOn();
711 //=======================================================================
712 //function : BeginImmediateDraw
714 //=======================================================================
716 Standard_Boolean AIS_InteractiveContext::BeginImmediateDraw()
718 return HasOpenedContext()
719 && myLocalContexts (myCurLocalIndex)->BeginImmediateDraw();
722 //=======================================================================
723 //function : ImmediateAdd
725 //=======================================================================
727 Standard_Boolean AIS_InteractiveContext::ImmediateAdd (const Handle(AIS_InteractiveObject)& theObj,
728 const Standard_Integer theMode)
730 return HasOpenedContext()
731 && myLocalContexts (myCurLocalIndex)->ImmediateAdd (theObj, theMode);
734 //=======================================================================
735 //function : EndImmediateDraw
737 //=======================================================================
739 Standard_Boolean AIS_InteractiveContext::EndImmediateDraw (const Handle(V3d_View)& theView)
741 return HasOpenedContext()
742 && myLocalContexts (myCurLocalIndex)->EndImmediateDraw (theView);
745 //=======================================================================
746 //function : EndImmediateDraw
748 //=======================================================================
750 Standard_Boolean AIS_InteractiveContext::EndImmediateDraw()
752 if (!HasOpenedContext())
754 return Standard_False;
757 myMainVwr->InitActiveViews();
758 if (!myMainVwr->MoreActiveViews())
760 return Standard_False;
763 Handle(V3d_View) aView = myMainVwr->ActiveView();
764 return myLocalContexts (myCurLocalIndex)->EndImmediateDraw (aView);
768 //=======================================================================
769 //function : ResetOriginalState
771 //=======================================================================
773 void AIS_InteractiveContext::ResetOriginalState(const Standard_Boolean updateviewer)
775 Standard_Boolean upd_main(Standard_False);
776 TColStd_ListIteratorOfListOfInteger itl;
777 myMainSel->ResetSelectionActivationStatus();
779 for (AIS_DataMapIteratorOfDataMapOfIOStatus it(myObjects);it.More();it.Next()){
780 const Handle(AIS_InteractiveObject)& iobj = it.Key();
781 const Handle(AIS_GlobalStatus)& STAT = it.Value();
782 switch(STAT->GraphicStatus()){
783 case AIS_DS_Displayed:{
784 upd_main = Standard_True;
787 for(itl.Initialize(STAT->DisplayedModes());itl.More();itl.Next())
788 myMainPM->Display(iobj,itl.Value());
789 if(STAT->IsHilighted()){
790 if(STAT->HilightColor()!=Quantity_NOC_WHITE)
791 HilightWithColor(iobj,STAT->HilightColor(),Standard_False);
793 Hilight(iobj,Standard_False);
796 for(itl.Initialize(STAT->SelectionModes());itl.More();itl.Next()){
798 mgrSelector->Activate(iobj,itl.Value(),myMainSel);
803 EraseGlobal(iobj,Standard_False);
816 //=======================================================================
817 //function : SetZDetection
819 //=======================================================================
820 void AIS_InteractiveContext::SetZDetection(const Standard_Boolean aStatus)
822 myZDetectionFlag = aStatus;
825 //=======================================================================
826 //function : ZDetection
828 //=======================================================================
829 Standard_Boolean AIS_InteractiveContext::ZDetection() const
831 return myZDetectionFlag;