]> Creatis software - bbtkGEditor.git/commitdiff
no message
authordavila <>
Thu, 23 Sep 2010 07:18:00 +0000 (07:18 +0000)
committerdavila <>
Thu, 23 Sep 2010 07:18:00 +0000 (07:18 +0000)
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h

index 1982207584f59d0cc4d23e0cd93c18c002438032..ce7fbc8e32421de47f866564b88ceae6458b6718 100644 (file)
@@ -133,6 +133,15 @@ 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 PORTTEXT_NH_R                              =       1.0;
+       const double PORTTEXT_NH_G                              =       1.0;
+       const double PORTTEXT_NH_B                              =       0.0;
+       
        const double BOXTEXT_NH_R                               =       0.25;
        const double BOXTEXT_NH_G                               =       0.0;
        const double BOXTEXT_NH_B                               =       0.0;
index 2570305265dc8684aef498aa173f121eb32b6f5c..a2cd1dc700c4c9bef41307cd885f9f6e0a409a3f 100644 (file)
@@ -104,11 +104,48 @@ namespace bbtk
                _baseView->GetRenderer()->GradientBackgroundOff();
                _baseView->Refresh();
                
+               // Actos Port_Text 
                _textActor = vtkTextActor3D::New();
-               _textActor->SetPosition(  100 , 100 , 900 );
-               _textActor->SetInput( "Ups EED" );
+               _textActor->SetPosition(  -9999 , -9999 , 900 );
+               _textActor->SetInput( "<void>" );
+               _textActor->GetTextProperty()->SetFontSize(80);
+               _textActor->GetTextProperty()->BoldOn();
+               _textActor->GetTextProperty()->SetColor(PORTTEXT_NH_R,PORTTEXT_NH_G,PORTTEXT_NH_B);
+               
                _baseView->GetRenderer()->AddActor( _textActor );
                
+               
+               // Actor  Fill_Port_Text
+               
+               //------------
+               double                          xInic                           = 0;
+               double                          yInic                           = 0;
+               double                          zInic                           = 900;
+               vtkCellArray            *strip                          = vtkCellArray::New();
+               vtkPolyData                     *pdFill                         = vtkPolyData::New();
+               _fillObjectActor                                                = vtkActor::New();
+                                                       _fillPolyMapper         = vtkPolyDataMapper::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);
+               strip->InsertCellPoint(0);
+               strip->InsertCellPoint(1);
+               strip->InsertCellPoint(2);
+               strip->InsertCellPoint(0);
+               strip->InsertCellPoint(3);
+               pdFill->SetPoints( _pts );
+               pdFill->SetStrips( strip );
+               _fillPolyMapper->SetInput(pdFill);
+               _fillObjectActor->SetMapper(_fillPolyMapper);
+               _fillObjectActor->GetProperty()->SetColor(PORTFILL_NH_R,PORTFILL_NH_G,PORTFILL_NH_B);
+               _fillPolyMapper->Modified();
+
+               _baseView->GetRenderer()->AddActor( _fillObjectActor );         
        }
 
        //=========================================================================
@@ -399,7 +436,7 @@ namespace bbtk
 
                model->notifyObservers(_idManager);
 
-               int newId = addObjectController(controller);
+               addObjectController(controller);
 
                return (GPortController*)controller;
        }
@@ -669,11 +706,20 @@ namespace bbtk
                                        } // if GBLACKBOX
                                        if(type==GPORT)
                                        {
+                                               // PortText
                                                okPortMessage   =       true;
                                                _textActor->SetInput( desc->getStatusText().c_str() );
-                                               _textActor->SetScale(1);
-//ups1 EED
-                                               _textActor->SetPosition(  px ,py , pz+1 );
+                                               _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();
+                                               
                                        } // if GPORT
 
                                } // for controllers it
@@ -2131,8 +2177,7 @@ namespace bbtk
                                {                                       
                                        int ID = cont->getId();
                                        mapSelected[ID]=cont;
-                               }
-                               
+                               }                               
                        }
                }
                return mapSelected;
@@ -2180,7 +2225,7 @@ namespace bbtk
                        
                }
                
-               for(int i = 0 ;i<connections.size();i++)
+               for(int i = 0 ;i<(int)connections.size();i++)
                {
                        int objId = connections[i];
                        GObjectController *cont = objectsMap[objId];                    
index 6baf98c4b342bd0cf2e78b846a54fb8719f3565c..612ec7e712a342b65fcc7a4d3ac776e9ca27045d 100644 (file)
@@ -74,7 +74,11 @@ Version:   $Revision$
 #include <vtkRenderWindowInteractor.h>
 #include <vtkRenderer.h>
 #include <vtkInteractorStyleImage.h>
+#include <vtkActor.h>
+#include <vtkPoints.h>
 #include <vtkTextActor3D.h>
+#include <vtkPolyDataMapper.h>
+
 
 //Includes std
 #include <iostream>
@@ -219,7 +223,10 @@ namespace bbtk
 
                int _contLastId;
                
-               vtkTextActor3D *_textActor;
+               vtkTextActor3D          *_textActor;
+               vtkPoints                       *_pts;
+               vtkActor                        *_fillObjectActor;
+               vtkPolyDataMapper       *_fillPolyMapper;
 
        protected: