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

0028047: Visualization - support objects with customized highlighting in AIS_InteractiveContext

- SelectMgr_SelectableObject::ClearHighlighted method is added to remove dynamic highlight data;
- interactive context will pass processing of dynamic highlight erase to the object if the owner returns false in SelectMgr_EntityOwner::IsAutoHilight;
- if owner returns true in SelectMgr_EntityOwner::IsForcedHilight, selection presentation will be re-highlighted at each ::Select call;
- redundant logic related to old object-oriented highlight mechanism was removed from AIS_InteractiveContext::MoveTo.
This commit is contained in:
vpa
2016-12-28 15:52:31 +03:00
committed by apn
parent a8232603a0
commit 731c9b5bc0
5 changed files with 45 additions and 34 deletions

View File

@@ -309,6 +309,15 @@ void SelectMgr_SelectableObject::ClearSelected ()
mySelectionPrs->Clear();
}
//=======================================================================
//function : ClearDynamicHighlight
//purpose :
//=======================================================================
void SelectMgr_SelectableObject::ClearDynamicHighlight (const Handle(PrsMgr_PresentationManager3d)& theMgr)
{
theMgr->ClearImmediateDraw();
}
//=======================================================================
//function : HilightOwnerWithColor
//purpose :

View File

@@ -140,7 +140,14 @@ public:
//! Method which clear all selected owners belonging
//! to this selectable object ( for fast presentation draw )
Standard_EXPORT virtual void ClearSelected();
//! Method that needs to be implemented when the object
//! manages selection and dynamic highlighting on its own.
//! Clears or invalidates dynamic highlight presentation.
//! By default it clears immediate draw of given presentation
//! manager.
Standard_EXPORT virtual void ClearDynamicHighlight (const Handle(PrsMgr_PresentationManager3d)& theMgr);
//! Method which hilight an owner belonging to
//! this selectable object ( for fast presentation draw )
Standard_EXPORT virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,