-void ModuleBase_ResultPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
- const Handle(Prs3d_Presentation)& thePresentation,
- const Standard_Integer theMode)
+//********************************************************************
+bool ModuleBase_ResultPrs::hasSubShapeVisible(const TopoDS_Shape& theShape)
+{
+ int aNbOfHiddenSubShapes = myHiddenSubShapes.Size();
+
+ if (!myHiddenSubShapes.Contains(theShape))
+ aNbOfHiddenSubShapes++; // the shape to be hidden later
+
+ TopExp_Explorer anExp(myOriginalShape, TopAbs_FACE);
+ bool aHasVisibleShape = false;
+ for(TopExp_Explorer anExp(myOriginalShape, TopAbs_FACE); anExp.More() && !aHasVisibleShape;
+ anExp.Next())
+ {
+ aNbOfHiddenSubShapes--;
+ if (aNbOfHiddenSubShapes < 0)
+ aHasVisibleShape = true;
+ }
+ return aHasVisibleShape;
+}
+
+//********************************************************************
+bool ModuleBase_ResultPrs::setHiddenSubShapeTransparency(double theTransparency)
+{
+ if (myTransparency == theTransparency || theTransparency > 1 || theTransparency < 0)
+ return false;
+
+ myTransparency = theTransparency;
+ myHiddenSubShapesDrawer->ShadingAspect()->SetTransparency (theTransparency, myCurrentFacingModel);
+ return true;
+}
+
+//********************************************************************
+void ModuleBase_ResultPrs::Compute(
+ const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
+ const Handle(Prs3d_Presentation)& thePresentation,
+ const Standard_Integer theMode)