1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0024394: Visualization - implement more general way for rendering of immediate objects

Move OpenGl_Structure::myZLayer to base class Graphic3d_CStructure.
Graphic3d_ZLayerId - introduce new pre-defined ZLayers.
Do not clear Depth buffer twice for default ZLayer.

AIS_InteractiveContext::Display() - add new argument AIS_DisplayStatus to specify displaying status.

Drop unused Graphic3d_CPick and related methods.
Drop OpenGl_Structure::myNamedStatus - use flags from parent class Graphic3d_CStructure directly.
OpenGl_LayerList ::ChangeLayer(), ::ChangePriority - fix structure remove from unexpected layer.
Merge class OpenGl_PriorityList into OpenGl_Layer.

PrsMgr_PresentationManager::mySelectionColor - store selection color as field of Presentation Manager.
PrsMgr_Presentation class - do not declare private methods as virtual.
PrsMgr_Presentation::Highlight() - extend method syntax and drop methods ::Color() and ::BoundBox().

PrsMgr_PresentableObject - store ZLayer in presentable object
to display object presentations in required layer directly
(without displaying it in wrong layer first).

test/mesh/end - force re-displaying the shape to compute mesh anew

Test-case for issue
This commit is contained in:
kgv
2015-01-22 17:29:37 +03:00
committed by bugmaster
parent 92e24f9d36
commit a195430212
72 changed files with 1590 additions and 1958 deletions

View File

@@ -30,7 +30,7 @@ namespace
State_Visible
};
static BeforeHighlightState StructureState(const Handle(PrsMgr_Prs) theStructure)
static BeforeHighlightState StructureState(const Handle(PrsMgr_Prs)& theStructure)
{
return !theStructure->IsDisplayed() ?
State_Empty : !theStructure->IsVisible() ?
@@ -61,15 +61,15 @@ PrsMgr_Presentation::PrsMgr_Presentation (const Handle(PrsMgr_PresentationManage
//=======================================================================
void PrsMgr_Presentation::Display()
{
Display (Standard_False);
display (Standard_False);
myBeforeHighlightState = State_Visible;
}
//=======================================================================
//function : Display
//function : display
//purpose :
//=======================================================================
void PrsMgr_Presentation::Display (const Standard_Boolean theIsHighlight)
void PrsMgr_Presentation::display (const Standard_Boolean theIsHighlight)
{
if (!myStructure->IsDisplayed())
{
@@ -116,15 +116,16 @@ void PrsMgr_Presentation::SetVisible (const Standard_Boolean theValue)
//function : Highlight
//purpose :
//=======================================================================
void PrsMgr_Presentation::Highlight()
void PrsMgr_Presentation::Highlight (const Aspect_TypeOfHighlightMethod theMethod,
const Quantity_Color& theColor)
{
if (!IsHighlighted())
{
myBeforeHighlightState = StructureState (myStructure);
}
Display (Standard_True);
myStructure->Highlight();
display (Standard_True);
myStructure->Highlight (theMethod, theColor);
}
//=======================================================================
@@ -169,30 +170,6 @@ void PrsMgr_Presentation::Clear()
myStructure->RemoveAll();
}
//=======================================================================
//function : Color
//purpose :
//=======================================================================
void PrsMgr_Presentation::Color (const Quantity_NameOfColor theColor)
{
if (!IsHighlighted())
{
myBeforeHighlightState = StructureState (myStructure);
}
Display (Standard_True);
myStructure->Color (theColor);
}
//=======================================================================
//function : BoundBox
//purpose :
//=======================================================================
void PrsMgr_Presentation::BoundBox() const
{
myStructure->BoundBox();
}
//=======================================================================
//function : IsDisplayed
//purpose :