1 #include "CurveCreator_Displayer.h"
3 CurveCreator_Displayer::CurveCreator_Displayer( Handle_AIS_InteractiveContext theContext ) :
4 myContext( theContext )
9 CurveCreator_Displayer::~CurveCreator_Displayer(void)
12 for( int i = 0 ; i < myObjects.size() ; i++ ){
13 myObjects[i].Nullify();
18 void CurveCreator_Displayer::display( AISObjectsList theCurveObjects, bool isUpdate )
20 myObjects = theCurveObjects;
23 for( int i = 0 ; i < myObjects.size() ; i++ ){
24 myContext->Display(myObjects[i], Standard_False);
27 myContext->UpdateCurrentViewer();
30 void CurveCreator_Displayer::erase( bool isUpdate )
34 for( int i = 0 ; i < myObjects.size() ; i++ ){
35 myContext->Erase(myObjects[i], Standard_False);
38 myContext->UpdateCurrentViewer();
41 void CurveCreator_Displayer::displayAIS( Handle(AIS_InteractiveObject) theObject, bool isUpdate )
43 myContext->Display( theObject, Standard_False );
46 myContext->UpdateCurrentViewer();
49 void CurveCreator_Displayer::redisplayAIS( Handle(AIS_InteractiveObject) theObject, bool isUpdate )
51 myContext->Redisplay( theObject, Standard_False );
54 myContext->UpdateCurrentViewer();
57 Quantity_Color CurveCreator_Displayer::getActiveColor( bool isHL )
60 return Quantity_Color( 1., 0., 0., Quantity_TOC_RGB );
62 return Quantity_Color( 0., 1., 0., Quantity_TOC_RGB );
65 void CurveCreator_Displayer::highlight( const AISObjectsList& theObjects, bool isHL )
69 Quantity_Color aColor = getActiveColor( isHL );
70 for( int i = 0 ; i < theObjects.size() ; i++ ){
71 theObjects[i]->SetColor(aColor);
72 myContext->Display(theObjects[i], Standard_False);
74 myContext->UpdateCurrentViewer();