#include <UnitsAPI.hxx>
#include <V3d_View.hxx>
#include <V3d_Viewer.hxx>
-#include <Visual3d_View.hxx>
-#include <Visual3d_ViewManager.hxx>
//#include <AIS_DataMapIteratorOfDataMapOfInteractiveInteger.hxx>
namespace
AIS_InteractiveContext::AIS_InteractiveContext(const Handle(V3d_Viewer)& MainViewer):
mgrSelector(new SelectMgr_SelectionManager()),
-myMainPM(new PrsMgr_PresentationManager3d(MainViewer->Viewer())),
+myMainPM(new PrsMgr_PresentationManager3d(MainViewer->StructureManager())),
myMainVwr(MainViewer),
myMainSel(new StdSelect_ViewerSelector3d()),
myWasLastMain(Standard_False),
const Standard_Boolean theIsVisibleInView,
const AIS_DisplayStatus theStatus) const
{
- const Graphic3d_CView* aCView = reinterpret_cast<const Graphic3d_CView* >(theView->View()->CView());
- const Standard_Integer aViewId = aCView->ViewId;
+ Handle(Graphic3d_CView) aViewImpl = theView->View();
+ const Standard_Integer aViewId = aViewImpl->Identification();
for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
{
if (theStatus != AIS_DS_None
continue;
}
- Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->Viewer()->ObjectAffinity (anObjIter.Key());
+ Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->StructureManager()->ObjectAffinity (anObjIter.Key());
const Standard_Boolean isVisible = anAffinity->IsVisible (aViewId);
if (isVisible == theIsVisibleInView)
{
return;
}
- Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->Viewer()->ObjectAffinity (theIObj);
- const Graphic3d_CView* aCView = reinterpret_cast<const Graphic3d_CView* >(theView->View()->CView());
- anAffinity->SetVisible (aCView->ViewId, theIsVisible == Standard_True);
+ Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->StructureManager()->ObjectAffinity (theIObj);
+ Handle(Graphic3d_CView) aViewImpl = theView->View();
+ anAffinity->SetVisible (aViewImpl->Identification(), theIsVisible == Standard_True);
if (theIsVisible)
{
theView->View()->ChangeHiddenObjects()->Remove (theIObj.get());
{
Handle(AIS_GlobalStatus) aStatus = new AIS_GlobalStatus (AIS_DS_Displayed, theDispMode, theSelectionMode);
myObjects.Bind (theIObj, aStatus);
- Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->Viewer()->RegisterObject (theIObj);
+ Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->StructureManager()->RegisterObject (theIObj);
myMainPM->Display(theIObj, theDispMode);
if (theSelectionMode != -1)
{
Standard_Boolean isFound = Standard_False;
Handle(AIS_Selection) aSelIter = AIS_Selection::Selection(myCurrentName.ToCString());
- for (aSelIter->Init(); aSelIter->More(); aSelIter->Next())
+
+ aSelIter->Init();
+ while (aSelIter->More())
{
- Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (aSelIter->Value());
+ Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (aSelIter->Value());
+ Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
+
Erase (anObj, Standard_False);
isFound = Standard_True;
+
+ aSelIter->Init();
}
if (isFound && theToUpdateViewer)
//=======================================================================
void AIS_InteractiveContext::SetDeviationAngle (const Standard_Real theAngle)
{
- myDefaultDrawer->SetDeviationCoefficient (theAngle);
+ myDefaultDrawer->SetDeviationAngle (theAngle);
}
//=======================================================================
mgrSelector->Remove (anObj);
myObjects.UnBind (theIObj);
- myMainVwr->Viewer()->UnregisterObject (theIObj);
+ myMainVwr->StructureManager()->UnregisterObject (theIObj);
for (myMainVwr->InitDefinedViews(); myMainVwr->MoreDefinedViews(); myMainVwr->NextDefinedViews())
{
myMainVwr->DefinedView()->View()->ChangeHiddenObjects()->Remove (theIObj.get());