mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0025695: Visualization, AIS_InteractiveContext - define default HilightMode
AIS_InteractiveContext - removed the following unused properties: - PreSelectionColor(), DefaultColor(), WasCurrentTouched(), ZDetection(). AIS_InteractiveObject - removed unused property SelectionPriority(). Prs3d_Drawer - removed properties HighlightStyle() and SelectionStyle(). Graphic3d_HighlightStyle has been superseded by Prs3d_Drawer inheriting from new class Graphic3d_PresentationAttributes. Graphic3d_PresentationAttributes (as Graphic3d_HighlightStyle replacement) has been extended with new properties: - ZLayer() defining Z-Layer for highlighting presentation. - DisplayMode() defining display mode for highlighting. StdSelect_BRepSelectionTool methods have been corrected to take SelectMgr_EntityOwner instead of StdSelect_BRepOwner. StdSelect_Shape - duplicated field myDrawer has been dropped. AIS_InteractiveObject - myDrawer->Color() is now used instead of myOwnColor, myDrawer->Transparency() instead of myTransparency and myDrawer->ZLayer() instead of myZLayer. PrsMgr_PresentationManager::Unhighlight() now unhighlight all modes. The method taking Mode as argument has been marked deprecated. New enumeration Prs3d_TypeOfHighlight has been introduced defining different highlight types. AIS_InteractiveObject::HighlightStyle() now takes enumeration argument and defines different styles for Global and Local selection. ComesFromDecomposition() property has been moved from StdSelect_BRepOwner to SelectMgr_EntityOwner.
This commit is contained in:
@@ -48,15 +48,18 @@ namespace
|
||||
}
|
||||
|
||||
//! Selectable() method modified to return myAssembly.
|
||||
virtual Handle(SelectMgr_SelectableObject) Selectable() const;
|
||||
virtual Handle(SelectMgr_SelectableObject) Selectable() const Standard_OVERRIDE
|
||||
{
|
||||
return myAssembly;
|
||||
}
|
||||
|
||||
Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& PM,const Standard_Integer aMode) const;
|
||||
virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& PM,const Standard_Integer aMode) const Standard_OVERRIDE;
|
||||
|
||||
void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
|
||||
const Handle(Graphic3d_HighlightStyle)& theStyle,
|
||||
const Standard_Integer theMode);
|
||||
virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
|
||||
const Handle(Prs3d_Drawer)& theStyle,
|
||||
const Standard_Integer theMode) Standard_OVERRIDE;
|
||||
|
||||
void Unhilight (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer aMode);
|
||||
virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer aMode) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
@@ -77,15 +80,6 @@ SelectMgr_AssemblyEntityOwner::SelectMgr_AssemblyEntityOwner (const Handle(Selec
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Selectable
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(SelectMgr_SelectableObject) SelectMgr_AssemblyEntityOwner::Selectable() const
|
||||
{
|
||||
return myAssembly;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsHilighted
|
||||
//purpose :
|
||||
@@ -106,7 +100,7 @@ Standard_Boolean SelectMgr_AssemblyEntityOwner::IsHilighted (const Handle(PrsMgr
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SelectMgr_AssemblyEntityOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
|
||||
const Handle(Graphic3d_HighlightStyle)& theStyle,
|
||||
const Handle(Prs3d_Drawer)& theStyle,
|
||||
const Standard_Integer theMode)
|
||||
{
|
||||
if (HasSelectable())
|
||||
@@ -126,12 +120,12 @@ void SelectMgr_AssemblyEntityOwner::HilightWithColor (const Handle(PrsMgr_Presen
|
||||
//function : Unhilight
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SelectMgr_AssemblyEntityOwner::Unhilight (const Handle(PrsMgr_PresentationManager)& PM,
|
||||
const Standard_Integer aMode)
|
||||
void SelectMgr_AssemblyEntityOwner::Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
|
||||
const Standard_Integer )
|
||||
{
|
||||
if (HasSelectable())
|
||||
{
|
||||
PM->Unhighlight (myAssembly, aMode);
|
||||
thePrsMgr->Unhighlight (myAssembly);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +140,6 @@ AIS_MultipleConnectedInteractive::AIS_MultipleConnectedInteractive()
|
||||
{
|
||||
myHasOwnPresentations = Standard_False;
|
||||
myAssemblyOwner = NULL;
|
||||
SetHilightMode (0);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Reference in New Issue
Block a user