mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031431: Visualization, PrsMgr_PresentableObject - simplify HLR computing interface
Multiple PrsMgr_PresentableObject::Compute() methods have been replaced by single one PrsMgr_PresentableObject::computeHLR(). Dummy implementations of previously declared methods have been removed from AIS classes not implementng HLR presentation. Class Prs3d_Projector has been removed and Graphic3d_Camera is now passed directly, so that redundant dependency from HLRAlgo_Projector in Prs3d interfaces has been eliminated. StdPrs_HLRShape and StdPrs_HLRPolyShape now implement common interface StdPrs_HLRShapeI.
This commit is contained in:
@@ -43,7 +43,6 @@
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_IsoAspect.hxx>
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
#include <Prs3d_Projector.hxx>
|
||||
#include <Prs3d_Root.hxx>
|
||||
#include <Prs3d_ShadingAspect.hxx>
|
||||
#include <StdPrs_BndBox.hxx>
|
||||
@@ -224,7 +223,7 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
|
||||
//function : computeHlrPresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_Shape::computeHlrPresentation (const Handle(Prs3d_Projector)& theProjector,
|
||||
void AIS_Shape::computeHlrPresentation (const Handle(Graphic3d_Camera)& theProjector,
|
||||
const Handle(Prs3d_Presentation)& thePrs,
|
||||
const TopoDS_Shape& theShape,
|
||||
const Handle(Prs3d_Drawer)& theDrawer)
|
||||
@@ -282,12 +281,18 @@ void AIS_Shape::computeHlrPresentation (const Handle(Prs3d_Projector)& theProjec
|
||||
switch (theDrawer->TypeOfHLR())
|
||||
{
|
||||
case Prs3d_TOH_Algo:
|
||||
StdPrs_HLRShape::Add (thePrs, theShape, theDrawer, theProjector);
|
||||
{
|
||||
StdPrs_HLRShape aBuilder;
|
||||
aBuilder.ComputeHLR (thePrs, theShape, theDrawer, theProjector);
|
||||
break;
|
||||
}
|
||||
case Prs3d_TOH_PolyAlgo:
|
||||
default:
|
||||
StdPrs_HLRPolyShape::Add (thePrs, theShape, theDrawer, theProjector);
|
||||
case Prs3d_TOH_NotSet:
|
||||
{
|
||||
StdPrs_HLRPolyShape aBuilder;
|
||||
aBuilder.ComputeHLR (thePrs, theShape, theDrawer, theProjector);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure const& anException)
|
||||
|
Reference in New Issue
Block a user