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

0022795: Make possible to display some presentable objects in overlay of others, groupped by display priority

This commit is contained in:
kgv
2012-03-06 15:03:34 +04:00
committed by bugmaster
parent f8b2ed3650
commit 59f45b7cef
43 changed files with 1596 additions and 40 deletions

View File

@@ -3147,3 +3147,54 @@ Standard_Boolean AIS_InteractiveContext::GetAutoActivateSelection() const
{
return myIsAutoActivateSelMode;
}
//=======================================================================
//function : SetZLayer
//purpose :
//=======================================================================
void AIS_InteractiveContext::SetZLayer (const Handle(AIS_InteractiveObject)& theIObj,
const Standard_Integer theLayerId)
{
if (theIObj.IsNull ())
return;
if (myObjects.IsBound (theIObj))
{
switch (myObjects (theIObj)->GraphicStatus ())
{
case AIS_DS_Displayed:
{
theIObj->SetZLayer (myMainPM, theLayerId);
break;
}
case AIS_DS_Erased:
{
theIObj->SetZLayer (myCollectorPM, theLayerId);
break;
}
default:
break;
}
}
else if (HasOpenedContext ())
{
myLocalContexts (myCurLocalIndex)->SetZLayer (theIObj, theLayerId);
}
}
//=======================================================================
//function : GetZLayer
//purpose :
//=======================================================================
Standard_Integer AIS_InteractiveContext::GetZLayer (const Handle(AIS_InteractiveObject)& theIObj) const
{
if (theIObj.IsNull ())
return -1;
if (myObjects.IsBound (theIObj))
return theIObj->GetZLayer (myMainPM);
return myLocalContexts (myCurLocalIndex)->GetZLayer (theIObj);
}