#include "wxVtkSceneManager.h"
+ #include <vtkPolygon.h>
+ #include <vtkUnstructuredGrid.h>
+
+
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);
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);
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");
}
//=========================================================================
{
// 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("");
if (okPortMessage==false)
{
_textActor->SetScale(0.0001);
+ _fillObjectActor->SetScale(0.0001);
}
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();