]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGObjectView.cxx
Updated Version with the moving of the objects updated and the background doesn't...
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsVtkGUIEditorGraphic / vtkGObjectView.cxx
index 51761e7210662c5b37bc56f32012ab1f7144da4f..1c2fd8f8d1e6622f3fb1bab6d619033b61697fb2 100644 (file)
@@ -44,8 +44,11 @@ namespace bbtk
        vtkGObjectView::vtkGObjectView()
        {
                _baseView=NULL;
-               _objectActor=NULL;
+               _objectBorderActor=NULL;
+               _fillBorderActor=NULL;
                _isStartDragging=false;
+               
+               _state = NOTHING_HAPPENS;
        }
 
        //=========================================================================
@@ -54,7 +57,7 @@ namespace bbtk
        }
        //=========================================================================
 
-       void vtkGObjectView::update(int command)//virtual
+       void vtkGObjectView::update(int idController,int command)//virtual
        {
                //virtual
        }
@@ -90,9 +93,17 @@ namespace bbtk
 
        //=========================================================================
 
+       void vtkGObjectView::updateColors() //virtual
+       {
+               //virtual
+       }
+
+       //=========================================================================
+
        void vtkGObjectView::addVtkActors()//virtual
        {
-               _baseView->GetRenderer()->AddActor(_objectActor);
+               _baseView->GetRenderer()->AddActor(_objectBorderActor);
+               _baseView->GetRenderer()->AddActor(_fillBorderActor);
                _baseView->GetRenderer()->Render();
        }
 
@@ -114,8 +125,6 @@ namespace bbtk
                double xx=X,yy=Y,zz=900;
                _baseView->TransCoordScreenToWorld(xx,yy,zz);
 
-               
-
                if(_isStartDragging)
                {
                        _isStartDragging=false;
@@ -125,14 +134,13 @@ namespace bbtk
                        dragDifX=xx-xInic;
                        dragDifY=yy-yInic;      
                }
-
                _model->move(xx-dragDifX,yy-dragDifY,zz);
 
        }
 
        //=========================================================================
 
-       void vtkGObjectView::isStartDragging(bool param)
+       void vtkGObjectView::setStartDragging(bool param)
        {
                _isStartDragging=param;
                dragDifX=0;
@@ -141,6 +149,28 @@ namespace bbtk
 
        //=========================================================================
 
+       void vtkGObjectView::setState(int state)
+       {
+               _state = state;
+       }
+
+       //=========================================================================
+
+       int vtkGObjectView::getState()
+       {
+               return _state;
+       }
+
+       //=========================================================================
+
+       void vtkGObjectView::setRefreshWaiting()
+       {
+               ((vtkInteractorStyleBaseView*)_baseView->GetInteractorStyleBaseView())->SetRefresh_waiting();
+       }
+
+       //=========================================================================
+
+
 }  // EO namespace bbtk
 
 // EOF