1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0029947: Visualization - SelectMgr_SelectableObject::GetSelectPresentation() should copy object clipping planes

Methods SelectMgr_SelectableObject::GetHilightPresentation(), ::GetSelectPresentation() and ::UpdateClipping()
have been corrected to copy clipping planes of the object into highlighting and selection presentations.
This commit is contained in:
kgv
2018-07-11 15:52:02 +03:00
committed by bugmaster
parent 73e403b8c6
commit e2aba8ebf3
3 changed files with 42 additions and 0 deletions

View File

@@ -348,6 +348,7 @@ Handle(Prs3d_Presentation) SelectMgr_SelectableObject::GetHilightPresentation (c
{
myHilightPrs = new Prs3d_Presentation (theMgr->StructureManager());
myHilightPrs->SetTransformPersistence (TransformPersistence());
myHilightPrs->SetClipPlanes (myClipPlanes);
}
return myHilightPrs;
@@ -364,6 +365,7 @@ Handle(Prs3d_Presentation) SelectMgr_SelectableObject::GetSelectPresentation (co
{
mySelectionPrs = new Prs3d_Presentation (theMgr->StructureManager());
mySelectionPrs->SetTransformPersistence (TransformPersistence());
mySelectionPrs->SetClipPlanes (myClipPlanes);
}
return mySelectionPrs;
@@ -428,6 +430,23 @@ void SelectMgr_SelectableObject::SetZLayer (const Graphic3d_ZLayerId theLayerId)
}
}
//=======================================================================
//function : UpdateClipping
//purpose :
//=======================================================================
void SelectMgr_SelectableObject::UpdateClipping()
{
PrsMgr_PresentableObject::UpdateClipping();
if (!mySelectionPrs.IsNull())
{
mySelectionPrs->SetClipPlanes (myClipPlanes);
}
if (!myHilightPrs.IsNull())
{
myHilightPrs->SetClipPlanes (myClipPlanes);
}
}
//=======================================================================
//function : updateSelection
//purpose : Sets update status FULL to selections of the object. Must be

View File

@@ -198,6 +198,9 @@ protected:
myGlobalSelMode = theMode > 0 ? theMode : 0;
}
//! Update clipping planes state.
Standard_EXPORT virtual void UpdateClipping() Standard_OVERRIDE;
Standard_EXPORT virtual void updateSelection (const Standard_Integer theMode);
protected: