mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0027717: Visualization - drop broken Prs3d_Drawer::ShadingAspectGlobal() flag
This commit is contained in:
parent
cde2e2f0ca
commit
6887652ac6
@ -1017,3 +1017,4 @@ The following obsolete features have been removed:
|
|||||||
|
|
||||||
* Obsolete Antialiasing API V3d_View::SetAntialiasingOn(). This method was intended to activate deprecated OpenGL functionality (GL_POLYGON_SMOOTH, GL_LINE_SMOOTH, GL_POINT_SMOOTH).
|
* Obsolete Antialiasing API V3d_View::SetAntialiasingOn(). This method was intended to activate deprecated OpenGL functionality (GL_POLYGON_SMOOTH, GL_LINE_SMOOTH, GL_POINT_SMOOTH).
|
||||||
Instead of old API, application should request MSAA buffers for antialiasing by assigning Graphic3d_RenderingParams::NbMsaaSamples property of structure returned by V3d_View::ChangeRenderingParams().
|
Instead of old API, application should request MSAA buffers for antialiasing by assigning Graphic3d_RenderingParams::NbMsaaSamples property of structure returned by V3d_View::ChangeRenderingParams().
|
||||||
|
* Prs3d_Drawer::ShadingAspectGlobal() flag has been removed as not used. Corresponding calls can be removed safely from the application code.
|
||||||
|
@ -64,7 +64,6 @@ case 1:
|
|||||||
|
|
||||||
Standard_Real aTransparency = Transparency();
|
Standard_Real aTransparency = Transparency();
|
||||||
Graphic3d_NameOfMaterial aMaterial = Material();
|
Graphic3d_NameOfMaterial aMaterial = Material();
|
||||||
myDrawer->SetShadingAspectGlobal(Standard_False);
|
|
||||||
TopExp_Explorer Ex;
|
TopExp_Explorer Ex;
|
||||||
Handle(Geom_Surface) Surface;
|
Handle(Geom_Surface) Surface;
|
||||||
|
|
||||||
|
@ -2773,7 +2773,6 @@ void AIS_InteractiveContext::InitAttributes()
|
|||||||
{
|
{
|
||||||
mgrSelector->Add (myMainSel);
|
mgrSelector->Add (myMainSel);
|
||||||
|
|
||||||
myDefaultDrawer->SetShadingAspectGlobal (Standard_False);
|
|
||||||
Graphic3d_MaterialAspect aMat (Graphic3d_NOM_BRASS);
|
Graphic3d_MaterialAspect aMat (Graphic3d_NOM_BRASS);
|
||||||
myDefaultDrawer->ShadingAspect()->SetMaterial (aMat);
|
myDefaultDrawer->ShadingAspect()->SetMaterial (aMat);
|
||||||
|
|
||||||
|
@ -91,7 +91,6 @@ myInitAng(0.)
|
|||||||
{
|
{
|
||||||
Set (shap);
|
Set (shap);
|
||||||
SetHilightMode(0);
|
SetHilightMode(0);
|
||||||
myDrawer->SetShadingAspectGlobal(Standard_False);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -177,7 +176,6 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myDrawer->SetShadingAspectGlobal (Standard_False);
|
|
||||||
if (IsInfinite())
|
if (IsInfinite())
|
||||||
{
|
{
|
||||||
StdPrs_WFShape::Add (aPrs, myshape, myDrawer);
|
StdPrs_WFShape::Add (aPrs, myshape, myDrawer);
|
||||||
@ -510,7 +508,6 @@ void AIS_Shape::setColor (const Handle(Prs3d_Drawer)& theDrawer,
|
|||||||
|
|
||||||
// override color
|
// override color
|
||||||
theDrawer->ShadingAspect()->SetColor (theColor, myCurrentFacingModel);
|
theDrawer->ShadingAspect()->SetColor (theColor, myCurrentFacingModel);
|
||||||
theDrawer->SetShadingAspectGlobal (Standard_False);
|
|
||||||
theDrawer->LineAspect()->SetColor (theColor);
|
theDrawer->LineAspect()->SetColor (theColor);
|
||||||
theDrawer->WireAspect()->SetColor (theColor);
|
theDrawer->WireAspect()->SetColor (theColor);
|
||||||
theDrawer->PointAspect()->SetColor (theColor);
|
theDrawer->PointAspect()->SetColor (theColor);
|
||||||
|
@ -442,7 +442,6 @@ void AIS_TexturedShape::Compute (const Handle(PrsMgr_PresentationManager3d)& /*t
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
myDrawer->SetShadingAspectGlobal (Standard_False);
|
|
||||||
if (IsInfinite())
|
if (IsInfinite())
|
||||||
{
|
{
|
||||||
StdPrs_WFShape::Add (thePrs, myshape, myDrawer);
|
StdPrs_WFShape::Add (thePrs, myshape, myDrawer);
|
||||||
|
@ -67,8 +67,6 @@ Prs3d_Drawer::Prs3d_Drawer()
|
|||||||
myHasOwnLineAspect (Standard_False),
|
myHasOwnLineAspect (Standard_False),
|
||||||
myHasOwnTextAspect (Standard_False),
|
myHasOwnTextAspect (Standard_False),
|
||||||
myHasOwnShadingAspect (Standard_False),
|
myHasOwnShadingAspect (Standard_False),
|
||||||
myShadingAspectGlobal (Standard_True),
|
|
||||||
myHasOwnShadingAspectGlobal (Standard_False),
|
|
||||||
myHasOwnPlaneAspect (Standard_False),
|
myHasOwnPlaneAspect (Standard_False),
|
||||||
myHasOwnSeenLineAspect (Standard_False),
|
myHasOwnSeenLineAspect (Standard_False),
|
||||||
myHasOwnArrowAspect (Standard_False),
|
myHasOwnArrowAspect (Standard_False),
|
||||||
@ -697,17 +695,6 @@ void Prs3d_Drawer::SetShadingAspect (const Handle(Prs3d_ShadingAspect)& theAspec
|
|||||||
myHasOwnShadingAspect = !myShadingAspect.IsNull();
|
myHasOwnShadingAspect = !myShadingAspect.IsNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
// =======================================================================
|
|
||||||
// function : SetShadingAspectGlobal
|
|
||||||
// purpose :
|
|
||||||
// =======================================================================
|
|
||||||
|
|
||||||
void Prs3d_Drawer::SetShadingAspectGlobal (const Standard_Boolean theValue)
|
|
||||||
{
|
|
||||||
myHasOwnShadingAspectGlobal = Standard_True;
|
|
||||||
myShadingAspectGlobal = theValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
// function : PlaneAspect
|
// function : PlaneAspect
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -1058,7 +1045,6 @@ void Prs3d_Drawer::ClearLocalAttributes()
|
|||||||
myHasOwnIsoOnTriangulation = Standard_False;
|
myHasOwnIsoOnTriangulation = Standard_False;
|
||||||
myHasOwnIsAutoTriangulated = Standard_False;
|
myHasOwnIsAutoTriangulated = Standard_False;
|
||||||
myHasOwnWireDraw = Standard_False;
|
myHasOwnWireDraw = Standard_False;
|
||||||
myHasOwnShadingAspectGlobal = Standard_False;
|
|
||||||
myHasOwnLineArrowDraw = Standard_False;
|
myHasOwnLineArrowDraw = Standard_False;
|
||||||
myHasOwnDrawHiddenLine = Standard_False;
|
myHasOwnDrawHiddenLine = Standard_False;
|
||||||
myHasOwnFreeBoundaryDraw = Standard_False;
|
myHasOwnFreeBoundaryDraw = Standard_False;
|
||||||
|
@ -488,24 +488,6 @@ public:
|
|||||||
//! shading aspect that overrides the one in the link.
|
//! shading aspect that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnShadingAspect() const { return myHasOwnShadingAspect; }
|
Standard_Boolean HasOwnShadingAspect() const { return myHasOwnShadingAspect; }
|
||||||
|
|
||||||
//! Returns True if the ShadingAspect is applied
|
|
||||||
//! to the whole presentation.
|
|
||||||
Standard_Boolean ShadingAspectGlobal() const
|
|
||||||
{
|
|
||||||
return HasOwnShadingAspectGlobal() || myLink.IsNull()
|
|
||||||
? myShadingAspectGlobal
|
|
||||||
: myLink->ShadingAspectGlobal();
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Indicates that the ShadingAspect will be apply
|
|
||||||
//! to the whole presentation. This allows to modify
|
|
||||||
//! the aspect without recomputing the content of the presentation.
|
|
||||||
Standard_EXPORT void SetShadingAspectGlobal (const Standard_Boolean theValue);
|
|
||||||
|
|
||||||
//! Returns true if the drawer has its own attribute for
|
|
||||||
//! ShadingAspectGlobal flag that overrides the one in the link.
|
|
||||||
Standard_Boolean HasOwnShadingAspectGlobal() const { return myHasOwnShadingAspectGlobal; }
|
|
||||||
|
|
||||||
//! Returns settings for seen line aspects.
|
//! Returns settings for seen line aspects.
|
||||||
//! These settings can be edited. The default values are:
|
//! These settings can be edited. The default values are:
|
||||||
//! Color: Quantity_NOC_YELLOW
|
//! Color: Quantity_NOC_YELLOW
|
||||||
@ -913,8 +895,6 @@ protected:
|
|||||||
Standard_Boolean myHasOwnTextAspect;
|
Standard_Boolean myHasOwnTextAspect;
|
||||||
Handle(Prs3d_ShadingAspect) myShadingAspect;
|
Handle(Prs3d_ShadingAspect) myShadingAspect;
|
||||||
Standard_Boolean myHasOwnShadingAspect;
|
Standard_Boolean myHasOwnShadingAspect;
|
||||||
Standard_Boolean myShadingAspectGlobal;
|
|
||||||
Standard_Boolean myHasOwnShadingAspectGlobal;
|
|
||||||
Handle(Prs3d_PlaneAspect) myPlaneAspect;
|
Handle(Prs3d_PlaneAspect) myPlaneAspect;
|
||||||
Standard_Boolean myHasOwnPlaneAspect;
|
Standard_Boolean myHasOwnPlaneAspect;
|
||||||
Handle(Prs3d_LineAspect) mySeenLineAspect;
|
Handle(Prs3d_LineAspect) mySeenLineAspect;
|
||||||
|
@ -290,11 +290,7 @@ namespace
|
|||||||
|
|
||||||
Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
|
Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
|
||||||
aGroup->SetClosed (theIsClosed);
|
aGroup->SetClosed (theIsClosed);
|
||||||
if (!theDrawer->ShadingAspectGlobal())
|
aGroup->SetGroupPrimitivesAspect (theDrawer->ShadingAspect()->Aspect());
|
||||||
{
|
|
||||||
Handle(Graphic3d_AspectFillArea3d) anAsp = theDrawer->ShadingAspect()->Aspect();
|
|
||||||
aGroup->SetGroupPrimitivesAspect (anAsp);
|
|
||||||
}
|
|
||||||
aGroup->AddPrimitiveArray (aPArray);
|
aGroup->AddPrimitiveArray (aPArray);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
@ -41,13 +41,10 @@ void StdPrs_ShadedSurface::Add (const Handle(Prs3d_Presentation)& thePrs,
|
|||||||
N1 = N1 < 3 ? 3 : N1;
|
N1 = N1 < 3 ? 3 : N1;
|
||||||
N2 = N2 < 3 ? 3 : N2;
|
N2 = N2 < 3 ? 3 : N2;
|
||||||
|
|
||||||
if (!theDrawer->ShadingAspectGlobal())
|
// If the surface is closed, the faces from back-side are not traced:
|
||||||
{
|
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePrs);
|
||||||
// If the surface is closed, the faces from back-side are not traced:
|
aGroup->SetGroupPrimitivesAspect (theDrawer->ShadingAspect()->Aspect());
|
||||||
Handle(Graphic3d_AspectFillArea3d) anAsp = theDrawer->ShadingAspect()->Aspect();
|
aGroup->SetClosed (theSurface.IsUClosed() && theSurface.IsVClosed());
|
||||||
Prs3d_Root::CurrentGroup (thePrs)->SetGroupPrimitivesAspect (anAsp);
|
|
||||||
Prs3d_Root::CurrentGroup (thePrs)->SetClosed (theSurface.IsUClosed() && theSurface.IsVClosed());
|
|
||||||
}
|
|
||||||
|
|
||||||
Standard_Integer aNBUintv = theSurface.NbUIntervals (GeomAbs_C1);
|
Standard_Integer aNBUintv = theSurface.NbUIntervals (GeomAbs_C1);
|
||||||
Standard_Integer aNBVintv = theSurface.NbVIntervals (GeomAbs_C1);
|
Standard_Integer aNBVintv = theSurface.NbVIntervals (GeomAbs_C1);
|
||||||
@ -96,7 +93,7 @@ void StdPrs_ShadedSurface::Add (const Handle(Prs3d_Presentation)& thePrs,
|
|||||||
aPArray->AddVertex (P2, D2);
|
aPArray->AddVertex (P2, D2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Prs3d_Root::CurrentGroup (thePrs)->AddPrimitiveArray (aPArray);
|
aGroup->AddPrimitiveArray (aPArray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user