#include <StdPrs_ShadedShape.hxx>
#include <StdPrs_WFShape.hxx>
#include <AIS_Drawer.hxx>
-#include <Graphic3d_Array1OfVertex.hxx>
#include <Graphic3d_Group.hxx>
#include <Quantity_Color.hxx>
#include <Aspect_TypeOfLine.hxx>
Standard_Real prevcoeff ;
Standard_Real newcoeff ;
- if (OwnDeviationAngle(newangle,prevangle) ||
- OwnDeviationCoefficient(newcoeff,prevcoeff))
- if (Abs (newangle - prevangle) > Precision::Angular() ||
- Abs (newcoeff - prevcoeff) > Precision::Confusion() ) {
+ Standard_Boolean isOwnDeviationAngle = OwnDeviationAngle(newangle,prevangle);
+ Standard_Boolean isOwnDeviationCoefficient = OwnDeviationCoefficient(newcoeff,prevcoeff);
+ if (((Abs (newangle - prevangle) > Precision::Angular()) && isOwnDeviationAngle) ||
+ ((Abs (newcoeff - prevcoeff) > Precision::Confusion()) && isOwnDeviationCoefficient)) {
#ifdef DEB
cout << "AIS_Shape : compute"<<endl;
cout << "newangl : " << newangle << " # de " << "prevangl : " << prevangle << " OU "<<endl;
// dispatch (sub)shapes by their styles
XCAFPrs_DataMapOfStyleShape items;
XCAFPrs_Style DefStyle;
- Quantity_Color White ( Quantity_NOC_WHITE );
- DefStyle.SetColorSurf ( White );
- DefStyle.SetColorCurv ( White );
+ DefaultStyle (DefStyle);
XCAFPrs::DispatchStyles ( shape, settings, items, DefStyle );
#ifdef DEB
//cout << "Dispatch done" << endl;
//i++;
#endif
if (! s.IsVisible() ) continue;
+ Prs3d_Root::NewGroup(aPrs);
AddStyledItem ( s, it.Value(), aPresentationManager, aPrs, aMode );
}
aPrs->ReCompute(); // for hidden line recomputation if necessary...
}
+
+//=======================================================================
+//function : DefaultStyle
+//purpose : DefaultStyle() can be redefined by subclasses in order to set custom default style
+//=======================================================================
+void XCAFPrs_AISObject::DefaultStyle (XCAFPrs_Style& aStyle) const
+{
+ static const Quantity_Color White ( Quantity_NOC_WHITE );
+ aStyle.SetColorSurf ( White );
+ aStyle.SetColorCurv ( White );
+}