mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00: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:
@@ -242,8 +242,8 @@ void OpenGl_Structure::highlightWithBndBox (const Handle(Graphic3d_Structure)& t
|
||||
// function : GraphicHighlight
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void OpenGl_Structure::GraphicHighlight (const Handle(Graphic3d_HighlightStyle)& theStyle,
|
||||
const Handle(Graphic3d_Structure)& theStruct)
|
||||
void OpenGl_Structure::GraphicHighlight (const Handle(Graphic3d_PresentationAttributes)& theStyle,
|
||||
const Handle(Graphic3d_Structure)& theStruct)
|
||||
{
|
||||
if (!myHighlightStyle.IsNull()
|
||||
&& myHighlightStyle->Method() == Aspect_TOHM_BOUNDBOX
|
||||
@@ -485,7 +485,7 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con
|
||||
// Render named status
|
||||
if (highlight && myHighlightBox.IsNull())
|
||||
{
|
||||
theWorkspace->SetHighlight (true);
|
||||
theWorkspace->SetHighlightStyle (myHighlightStyle);
|
||||
}
|
||||
|
||||
// Apply local transformation
|
||||
@@ -543,11 +543,6 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con
|
||||
aCtx->core11fwd->glFrontFace (GL_CW);
|
||||
}
|
||||
|
||||
// Apply highlight color
|
||||
const OpenGl_Vec4* aHighlightColor = theWorkspace->HighlightColor;
|
||||
if (!myHighlightStyle.IsNull())
|
||||
theWorkspace->HighlightColor = myHighlightStyle->ColorFltPtr();
|
||||
|
||||
// Collect clipping planes of structure scope
|
||||
aCtx->ChangeClipping().SetLocalPlanes (aCtx, myClipPlanes);
|
||||
|
||||
@@ -683,9 +678,6 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con
|
||||
aCtx->WorldViewState.Pop();
|
||||
}
|
||||
|
||||
// Restore highlight color
|
||||
theWorkspace->HighlightColor = aHighlightColor;
|
||||
|
||||
// Restore aspects
|
||||
theWorkspace->SetAspectLine (aPrevAspectLine);
|
||||
theWorkspace->SetAspectFace (aPrevAspectFace);
|
||||
@@ -695,11 +687,12 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con
|
||||
// Apply highlight box
|
||||
if (!myHighlightBox.IsNull())
|
||||
{
|
||||
theWorkspace->SetHighlightStyle (myHighlightStyle);
|
||||
myHighlightBox->Render (theWorkspace);
|
||||
}
|
||||
|
||||
// Restore named status
|
||||
theWorkspace->SetHighlight (false);
|
||||
theWorkspace->SetHighlightStyle (Handle(Graphic3d_PresentationAttributes)());
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
|
Reference in New Issue
Block a user