1 #include "CurveCreator_Displayer.h"
3 CurveCreator_Displayer::CurveCreator_Displayer( Handle_AIS_InteractiveContext theContext,
4 const int theZLayer ) :
5 myContext( theContext ), myZLayer( theZLayer )
10 CurveCreator_Displayer::~CurveCreator_Displayer(void)
13 for( int i = 0 ; i < myObjects.size() ; i++ ){
14 myObjects[i].Nullify();
19 void CurveCreator_Displayer::display( const Handle(AIS_InteractiveObject)& theObject, bool isUpdate )
21 if ( theObject.IsNull() )
24 myObjects.push_back( theObject );
25 myContext->Display( theObject, Standard_False );
28 myContext->SetZLayer( theObject, myZLayer );
31 myContext->UpdateCurrentViewer();
34 void CurveCreator_Displayer::eraseAll( bool isUpdate )
38 for( int i = 0 ; i < myObjects.size() ; i++ ){
39 myContext->Erase(myObjects[i], Standard_False);
43 myContext->UpdateCurrentViewer();
46 Quantity_Color CurveCreator_Displayer::getActiveColor( bool isHL )
49 return Quantity_Color( 1., 0., 0., Quantity_TOC_RGB );
51 return Quantity_Color( 0., 1., 0., Quantity_TOC_RGB );
54 /*void CurveCreator_Displayer::highlight( const AISObjectsList& theObjects, bool isHL )
58 Quantity_Color aColor = getActiveColor( isHL );
59 for( int i = 0 ; i < theObjects.size() ; i++ ){
60 theObjects[i]->SetColor(aColor);
61 myContext->Display(theObjects[i], Standard_False);
63 myContext->UpdateCurrentViewer();