1 // File: XGUI_Displayer.cpp
2 // Created: 20 Apr 2014
3 // Author: Natalia ERMOLAEVA
5 #include "XGUI_Displayer.h"
6 #include "XGUI_Viewer.h"
8 #include <ModelAPI_Document.h>
10 #include <AIS_InteractiveContext.hxx>
11 #include <AIS_Shape.hxx>
13 XGUI_Displayer::XGUI_Displayer(XGUI_Viewer* theViewer)
18 XGUI_Displayer::~XGUI_Displayer()
22 void XGUI_Displayer::Display(boost::shared_ptr<ModelAPI_Feature> theFeature)
26 void XGUI_Displayer::Display(boost::shared_ptr<ModelAPI_Feature> theFeature,
27 const TopoDS_Shape& theShape)
29 Handle(AIS_InteractiveContext) aContext = myViewer->AISContext();
31 Handle(AIS_Shape) anAIS = new AIS_Shape(theShape);
32 aContext->Display(anAIS, Standard_False);
34 aContext->UpdateCurrentViewer();
37 void XGUI_Displayer::Erase(boost::shared_ptr<ModelAPI_Feature> theFeature,
38 const TopoDS_Shape& theShape)
40 Handle(AIS_InteractiveContext) aContext = myViewer->AISContext();