aPresentationManager : PresentationManager3d from PrsMgr;
aPresentation : mutable Presentation from Prs3d;
aMode : Integer from Standard = 0)
- is redefined virtual private;
+ is redefined virtual protected;
---Purpose: Redefined method to compute presentation
+ DefaultStyle (me;
+ aStyle: out Style from XCAFPrs)
+ is virtual protected;
+ ---Purpose: Fills out a default style object which is used when styles are
+ -- not explicitly defined in the document.
+ -- By default, the style uses white color for curves and surfaces.
+
fields
myLabel : Label from TDF;
// 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;
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 );
+}