]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx
#3057 bbGEditor Feature New Normal - optimizing of vtk actors management (input...
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsVtkGUIEditorGraphic / vtkGPortView.cxx
index c7ee91f0db8960c72b3a0887f706243de869290d..b0ef338bd65eda4de2ab9c4294462e530adc1cc0 100644 (file)
@@ -77,25 +77,19 @@ namespace bbtk {
 
     //=========================================================================
 
-    void vtkGPortView::update( int idController , int command ) {
-
+    void vtkGPortView::update( int idController , int command ) 
+{
         updateColors( ) ;
 
         double xInic , yInic , zInic , xFin , yFin , zFin ;
-
         _model->getInicPoint( xInic , yInic , zInic ) ;
         _model->getFinalPoint( xFin , yFin , zFin ) ;
-
         // RaC In the actual version, zInic=zFin=GPOSITION_Z
-
         double mid = ( xInic + xFin ) / 2 ;
-
         _pts->SetPoint( 0 , xInic , yInic , zInic ) ;
         _pts->SetPoint( 1 , mid , yFin , zInic ) ;
         _pts->SetPoint( 2 , xFin , yInic , zFin ) ;
-
         _fillPolyMapper->Modified( ) ;
-
         //-----------
         setRefreshWaiting( ) ;
     }
@@ -104,8 +98,6 @@ namespace bbtk {
 
     void vtkGPortView::createVtkObjects( ) //virtual
     {
-        _pts = vtkPoints::New( ) ;
-        _pts->SetNumberOfPoints( 3 ) ;
 
         double xInic , yInic , zInic , xFin , yFin , zFin ;
 
@@ -120,6 +112,9 @@ namespace bbtk {
         //EED          _pts->SetPoint(1, mid, yFin, zInic );
         //EED          _pts->SetPoint(2, xFin, yInic, zFin );                          
 
+        _pts = vtkPoints::New( ) ;
+        _pts->SetNumberOfPoints( 3 ) ;
+
         _pts->SetPoint( 0 , -1000 , -1000 , -1000 ) ;
         _pts->SetPoint( 1 , mid , yFin , zInic ) ;
         _pts->SetPoint( 2 , 1000 , 1000 , 1000 ) ;