1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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:
kgv
2016-11-02 17:36:18 +03:00
committed by apn
parent 404c893694
commit f838dac48b
106 changed files with 1624 additions and 2273 deletions

View File

@@ -90,7 +90,6 @@ AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependant),
myInitAng(0.)
{
Set (shap);
SetHilightMode(0);
}
//=======================================================================
@@ -523,7 +522,7 @@ void AIS_Shape::setColor (const Handle(Prs3d_Drawer)& theDrawer,
void AIS_Shape::SetColor (const Quantity_Color& theColor)
{
setColor (myDrawer, theColor);
myOwnColor = theColor;
myDrawer->SetColor (theColor);
hasOwnColor = Standard_True;
// modify shading presentation without re-computation
@@ -903,8 +902,8 @@ void AIS_Shape::UnsetMaterial()
}
if (HasColor())
{
myDrawer->ShadingAspect()->SetColor (myOwnColor, myCurrentFacingModel);
myDrawer->ShadingAspect()->SetTransparency (myTransparency, myCurrentFacingModel);
myDrawer->ShadingAspect()->SetColor (myDrawer->Color(), myCurrentFacingModel);
myDrawer->ShadingAspect()->SetTransparency (myDrawer->Transparency(), myCurrentFacingModel);
}
}
else
@@ -968,7 +967,7 @@ void AIS_Shape::setTransparency (const Handle(Prs3d_Drawer)& theDrawer,
void AIS_Shape::SetTransparency (const Standard_Real theValue)
{
setTransparency (myDrawer, theValue);
myTransparency = theValue;
myDrawer->SetTransparency ((Standard_ShortReal )theValue);
// modify shading presentation without re-computation
const PrsMgr_Presentations& aPrsList = Presentations();
@@ -1004,7 +1003,7 @@ void AIS_Shape::SetTransparency (const Standard_Real theValue)
void AIS_Shape::UnsetTransparency()
{
myTransparency = 0.0;
myDrawer->SetTransparency (0.0f);
if (!myDrawer->HasOwnShadingAspect())
{
return;