]> Creatis software - bbtkGEditor.git/commitdiff
*** empty log message ***
authordavila <>
Thu, 23 Sep 2010 16:35:58 +0000 (16:35 +0000)
committerdavila <>
Thu, 23 Sep 2010 16:35:58 +0000 (16:35 +0000)
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h

index ce7fbc8e32421de47f866564b88ceae6458b6718..63f718b4256a2c676b04b997168a7395b9fe70e1 100644 (file)
@@ -61,8 +61,8 @@ namespace bbtk
        // Object dimensions
        const double BOX_HEIGHT                         =       10;
        const double BOX_WIDTH                          =       100;
-       const double PORT_HEIGHT                        =       2.8;
-       const double PORT_WIDTH                         =       2.8;
+       const double PORT_HEIGHT                        =       3.8;
+       const double PORT_WIDTH                         =       3.8;
        const double COMPLEXPORT_HEIGHT         =       6;
        const double COMPLEXPORT_WIDTH          =       6;
 
@@ -134,9 +134,9 @@ namespace bbtk
        //Object Text colors
 
        
-       const double PORTFILL_NH_R                              =       0.20;
-       const double PORTFILL_NH_G                              =       0.20;
-       const double PORTFILL_NH_B                              =       0.20;
+       const double PORTFILL_NH_R                              =       0.50;
+       const double PORTFILL_NH_G                              =       0.50;
+       const double PORTFILL_NH_B                              =       0.50;
        
        const double PORTTEXT_NH_R                              =       1.0;
        const double PORTTEXT_NH_G                              =       1.0;
index a2cd1dc700c4c9bef41307cd885f9f6e0a409a3f..5c8e2106dc569c61634e2ebbb6c1e4765d43ccc4 100644 (file)
@@ -36,6 +36,10 @@ Version:   $Revision$
 
 #include "wxVtkSceneManager.h"
 
+ #include <vtkPolygon.h>
+ #include <vtkUnstructuredGrid.h>
+
+
 namespace bbtk
 {
 
@@ -108,7 +112,7 @@ namespace bbtk
                _textActor = vtkTextActor3D::New();
                _textActor->SetPosition(  -9999 , -9999 , 900 );
                _textActor->SetInput( "<void>" );
-               _textActor->GetTextProperty()->SetFontSize(80);
+               _textActor->GetTextProperty()->SetFontSize(40);
                _textActor->GetTextProperty()->BoldOn();
                _textActor->GetTextProperty()->SetColor(PORTTEXT_NH_R,PORTTEXT_NH_G,PORTTEXT_NH_B);
                
@@ -121,18 +125,30 @@ namespace bbtk
                double                          xInic                           = 0;
                double                          yInic                           = 0;
                double                          zInic                           = 900;
+/*
                vtkCellArray            *strip                          = vtkCellArray::New();
                vtkPolyData                     *pdFill                         = vtkPolyData::New();
                _fillObjectActor                                                = vtkActor::New();
                                                        _fillPolyMapper         = vtkPolyDataMapper::New();
+*/
+printf ("EED wxVtkSceneManager::configureBaseView 1...\n");
+
+               vtkPolygon *aPolygon = vtkPolygon::New();
+               _fillObjectActor                                                = vtkActor::New();
+
                                                        _pts                            = vtkPoints::New();     
-               
-               _pts->SetNumberOfPoints(4);
-               _pts->SetPoint(0, xInic         , yInic         , zInic );
-               _pts->SetPoint(1, xInic+50      , yInic         , zInic );
-               _pts->SetPoint(2, xInic+50      , yInic+50      , zInic );
-               _pts->SetPoint(3, xInic         , yInic+50      , zInic );
-               strip->InsertNextCell(5);
+//ups4 EED Borrame
+               _pts->SetNumberOfPoints(7);
+               _pts->InsertPoint(0, xInic              , yInic         , zInic );
+               _pts->InsertPoint(1, xInic+50   , yInic         , zInic );
+               _pts->InsertPoint(2, xInic+50   , yInic+50      , zInic );
+               _pts->InsertPoint(3, xInic+25           , yInic+50      , zInic );
+               _pts->InsertPoint(4, xInic+20           , yInic+55      , zInic );
+               _pts->InsertPoint(5, xInic+15           , yInic+50      , zInic );
+               _pts->InsertPoint(6, xInic              , yInic+50      , zInic );
+
+/*
+               strip->InsertNextCell(8);
                strip->InsertCellPoint(0);
                strip->InsertCellPoint(1);
                strip->InsertCellPoint(2);
@@ -141,11 +157,35 @@ namespace bbtk
                pdFill->SetPoints( _pts );
                pdFill->SetStrips( strip );
                _fillPolyMapper->SetInput(pdFill);
-               _fillObjectActor->SetMapper(_fillPolyMapper);
+*/
+
+printf ("EED wxVtkSceneManager::configureBaseView 2...\n");
+
+               aPolygon->GetPointIds()->SetNumberOfIds(7);
+               aPolygon->GetPointIds()->SetId(0, 0);
+               aPolygon->GetPointIds()->SetId(1, 1);
+               aPolygon->GetPointIds()->SetId(2, 2);
+               aPolygon->GetPointIds()->SetId(3, 3);
+               aPolygon->GetPointIds()->SetId(4, 4);
+               aPolygon->GetPointIds()->SetId(5, 5);
+               aPolygon->GetPointIds()->SetId(6, 6);
+
+printf ("EED wxVtkSceneManager::configureBaseView 3...\n");
+
+               vtkUnstructuredGrid *aPolygonGrid = vtkUnstructuredGrid::New();
+               aPolygonGrid->Allocate(1, 1);
+               aPolygonGrid->InsertNextCell(aPolygon->GetCellType(), aPolygon->GetPointIds());
+               aPolygonGrid->SetPoints(_pts);
+printf ("EED wxVtkSceneManager::configureBaseView 4...\n");
+               _aPolygonMapper = vtkDataSetMapper::New();
+               _aPolygonMapper->SetInput(aPolygonGrid);
+               _fillObjectActor->SetMapper(_aPolygonMapper);
+printf ("EED wxVtkSceneManager::configureBaseView 5...\n");
                _fillObjectActor->GetProperty()->SetColor(PORTFILL_NH_R,PORTFILL_NH_G,PORTFILL_NH_B);
-               _fillPolyMapper->Modified();
+               _aPolygonMapper->Modified();
 
                _baseView->GetRenderer()->AddActor( _fillObjectActor );         
+printf ("EED wxVtkSceneManager::configureBaseView fin...\n");
        }
 
        //=========================================================================
@@ -708,24 +748,32 @@ namespace bbtk
                                        {
                                                // PortText
                                                okPortMessage   =       true;
+                                               py=py+5;
                                                _textActor->SetInput( desc->getStatusText().c_str() );
                                                _textActor->SetScale(0.1);
                                                _textActor->SetPosition(  px-25 ,py , pz+2 );
                                                
                                                // FillPortText
                                                px=px-35;
-                                               _pts->SetPoint(0, px    , py    , 900+1 );
-                                               _pts->SetPoint(1, px+100, py    , 900+1 );
-                                               _pts->SetPoint(2, px+100, py+10 , 900+1 );
-                                               _pts->SetPoint(3, px    , py+10 , 900+1 );
-                                               _fillPolyMapper->Modified();
-                                               
+                                               py=py-2;
+/*
+                                               _pts->SetPoint(0, px            , py            , 900+1 );
+                                               _pts->SetPoint(1, px+150        , py            , 900+1 );
+                                               _pts->SetPoint(2, px+150        , py+7          , 900+1 );
+                                               _pts->SetPoint(3, px-150+40     , py+7          , 900+1 );
+                                               _pts->SetPoint(4, px-150+40-5   , py+7+5        , 900+1 );
+                                               _pts->SetPoint(5, px-150+40-10  , py+7          , 900+1 );
+                                               _pts->SetPoint(6, px            , py+7          , 900+1 );
+*/                                             
+                                               _fillObjectActor->SetScale(1);
+                                               _fillObjectActor->SetPosition(px,py,1);
+                                               _aPolygonMapper->Modified();
                                        } // if GPORT
 
                                } // for controllers it
                        } 
                }
-               
+//ups4 EED Borrame             
                if (okStatusMessage==false) 
                {
                        updateStatusBar("");
@@ -734,6 +782,7 @@ namespace bbtk
                if (okPortMessage==false) 
                {
                        _textActor->SetScale(0.0001);
+                       _fillObjectActor->SetScale(0.0001);
                }
                
 
@@ -1592,7 +1641,7 @@ namespace bbtk
 
                                        configGComBoxInputOutputPort(true, inputPortName,xIn,yIn,zIn);
 
-//ups 3 EED Borrame
+//ups3 EED Borrame
 //                                     int idInputPort = createGComplexBoxInputPort(inputPortName);
 //                                     GObjectController *cont = _controllers[idInputPort];
 //                                     GBoxModel *cbmod = (GBoxModel*)cont->getModel();
index 612ec7e712a342b65fcc7a4d3ac776e9ca27045d..e3bd1b116c6bfc49294aa0d01f145406b10a1e77 100644 (file)
@@ -77,7 +77,7 @@ Version:   $Revision$
 #include <vtkActor.h>
 #include <vtkPoints.h>
 #include <vtkTextActor3D.h>
-#include <vtkPolyDataMapper.h>
+ #include <vtkDataSetMapper.h>
 
 
 //Includes std
@@ -226,7 +226,8 @@ namespace bbtk
                vtkTextActor3D          *_textActor;
                vtkPoints                       *_pts;
                vtkActor                        *_fillObjectActor;
-               vtkPolyDataMapper       *_fillPolyMapper;
+//EED Borrame          vtkPolyDataMapper       *_fillPolyMapper;
+               vtkDataSetMapper        *_aPolygonMapper;
 
        protected: