2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
4 #include "bbcreaMaracasVisuTransformWidget2.h"
5 #include "bbcreaMaracasVisuPackage.h"
7 #include <wx/filedlg.h>
9 namespace bbcreaMaracasVisu
12 // The widget created by the box
13 class TransformWidgetPanel : public wxPanel
16 TransformWidgetPanel(TransformWidget2* box, wxWindow *parent);
17 ~TransformWidgetPanel ();
18 void OnSetPoint (wxCommandEvent& event);
19 void ReleaseAngle (wxSlider *slider);
20 void TrackAngle (double angle ,int idVector);
21 void SetPossiblePoint (std::vector<double> possiblePoint);
23 void _OnSetPointLocalReference ();
24 void ReleaseCenter (wxSlider *slider);
25 void TrackCenter (double step);
29 void OnSliderTrackX (wxScrollEvent& event);
30 void OnSliderTrackY (wxScrollEvent& event);
31 void OnSliderTrackZ (wxScrollEvent& event);
32 void OnSliderReleaseX (wxScrollEvent& event);
33 void OnSliderReleaseY (wxScrollEvent& event);
34 void OnSliderReleaseZ (wxScrollEvent& event);
37 void OnRadioButtonX(wxEvent& event);
38 void OnRadioButtonY(wxEvent& event);
39 void OnRadioButtonZ(wxEvent& event);
40 void OnRadioButtonN(wxEvent& event);
41 void OnSave(wxCommandEvent& event);
42 void Save(std::string filename);
43 void OnLoad(wxCommandEvent& event);
44 void Load(std::string filename);
45 void OnReset(wxCommandEvent& event);
46 void OnMoveDown(wxCommandEvent& event);
47 void OnMoveUp(wxCommandEvent& event);
48 void OnMemory(wxCommandEvent& event);
49 void OnMemoryGoBack(wxCommandEvent& event);
50 void OnSliderGeneralTrack(wxScrollEvent& event);
51 void OnSliderGeneralRelease(wxScrollEvent& event);
56 std::vector<double> mttActualPoint;
57 std::vector<double> mPossiblePoint;
58 std::vector<double> mLastPossiblePoint_localReference;
59 std::vector<double> mActualPoint;
60 std::vector<double> mMemoryPoint;
61 vtkMatrix4x4 *mMemoryMatrix;
62 TransformWidget2 *mBox;
65 wxSlider *mSliderRotationX;
66 wxSlider *mSliderRotationY;
67 wxSlider *mSliderRotationZ;
70 wxSlider *mSliderGeneral;
71 wxCheckBox *cbLocalReference;
74 //------------------------------------------------------------------------
75 //------------------------------------------------------------------------
76 //------------------------------------------------------------------------
78 TransformWidgetPanel::TransformWidgetPanel(TransformWidget2* box, wxWindow *parent)
79 : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL),
82 t = vtkTransform::New(); // Transoform activa
83 tt = vtkTransform::New(); // Transform temporal para el slider
84 mMemoryMatrix = vtkMatrix4x4::New();
85 mttActualPoint.push_back(0);
86 mttActualPoint.push_back(0);
87 mttActualPoint.push_back(0);
89 mActualPoint.push_back(0);
90 mActualPoint.push_back(0);
91 mActualPoint.push_back(0);
93 mPossiblePoint.push_back(0);
94 mPossiblePoint.push_back(0);
95 mPossiblePoint.push_back(0);
97 wxSize sizeSliderWidget;
100 if (mBox->bbGetInputType()==0)
102 sizeSliderWidget.Set(25,25);
103 sizeButton.Set( 45 , -1 );
104 mSliderRotationX = new wxSlider( this, -1, 0 , -180, 180 , wxDefaultPosition,sizeSliderWidget, wxSL_HORIZONTAL, wxDefaultValidator );
105 mSliderRotationY = new wxSlider( this, -1, 0 , -180, 180 , wxDefaultPosition,sizeSliderWidget, wxSL_HORIZONTAL, wxDefaultValidator );
106 mSliderRotationZ = new wxSlider( this, -1, 0 , -180, 180 , wxDefaultPosition,sizeSliderWidget, wxSL_HORIZONTAL, wxDefaultValidator );
107 wxButton *mBtnSetPoint = new wxButton( this, -1, _T("Set Point") , wxDefaultPosition, sizeButton );
108 Connect(mBtnSetPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSetPoint );
109 Connect( mSliderRotationX->GetId(), wxEVT_SCROLL_THUMBRELEASE , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderReleaseX);
110 Connect( mSliderRotationX->GetId(), wxEVT_SCROLL_THUMBTRACK , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderTrackX );
111 Connect( mSliderRotationX->GetId(), wxEVT_SCROLL_CHANGED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderTrackX );
112 Connect( mSliderRotationY->GetId(), wxEVT_SCROLL_THUMBRELEASE , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderReleaseY);
113 Connect( mSliderRotationY->GetId(), wxEVT_SCROLL_THUMBTRACK , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderTrackY );
114 Connect( mSliderRotationY->GetId(), wxEVT_SCROLL_CHANGED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderTrackY );
115 Connect( mSliderRotationZ->GetId(), wxEVT_SCROLL_THUMBRELEASE , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderReleaseZ);
116 Connect( mSliderRotationZ->GetId(), wxEVT_SCROLL_THUMBTRACK , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderTrackZ );
117 Connect( mSliderRotationZ->GetId(), wxEVT_SCROLL_CHANGED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderTrackZ );
118 wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
119 sizer->Add( mSliderRotationX , 1 );
120 sizer->Add( mSliderRotationY , 1 );
121 sizer->Add( mSliderRotationZ , 1 );
122 sizer->Add( mBtnSetPoint , 1 );
126 if (mBox->bbGetInputType()==1)
128 sizeSliderWidget.Set( 160 , -1 );
129 sizeButton.Set( 15 , -1 );
130 wxRadioButton *rBtnC = new wxRadioButton( this, -1, _T("Cen") , wxDefaultPosition , wxDefaultSize , wxRB_GROUP );
131 wxRadioButton *rBtnX = new wxRadioButton( this, -1, _T("ri") , wxDefaultPosition , wxDefaultSize , 0 );
132 wxRadioButton *rBtnY = new wxRadioButton( this, -1, _T("rj") , wxDefaultPosition , wxDefaultSize , 0 );
133 wxRadioButton *rBtnZ = new wxRadioButton( this, -1, _T("rk") , wxDefaultPosition , wxDefaultSize , 0 );
134 wxButton *BtnSave = new wxButton ( this, -1, _T("Save") , wxDefaultPosition, sizeButton );
135 wxButton *BtnLoad = new wxButton ( this, -1, _T("Load") , wxDefaultPosition, sizeButton );
136 rBtnC->SetValue(true); mTool = 3;
137 mSliderGeneral = new wxSlider ( this, -1, 0 , -180, 180 , wxDefaultPosition,sizeSliderWidget ,wxSL_HORIZONTAL, wxDefaultValidator );
138 cbLocalReference = new wxCheckBox ( this,-1, _T("Loc Ref") , wxDefaultPosition,wxDefaultSize ,wxCHK_2STATE | wxALIGN_RIGHT );
139 wxButton *BtnMoveDown = new wxButton ( this, -1, _T("-") , wxDefaultPosition, sizeButton );
140 wxButton *BtnMoveUp = new wxButton ( this, -1, _T("+") , wxDefaultPosition, sizeButton );
141 wxButton *BtnReset = new wxButton ( this, -1, _T("Init") , wxDefaultPosition, sizeButton );
142 wxButton *BtnMemory = new wxButton ( this, -1, _T("Set") , wxDefaultPosition, sizeButton );
143 wxButton *BtnMemoryGoBack= new wxButton ( this, -1, _T("Reset") , wxDefaultPosition, sizeButton );
144 Connect( rBtnX->GetId() , wxEVT_COMMAND_RADIOBUTTON_SELECTED , (wxObjectEventFunction)(void (wxPanel::*)(wxEvent&)) &TransformWidgetPanel::OnRadioButtonX );
145 Connect( rBtnY->GetId() , wxEVT_COMMAND_RADIOBUTTON_SELECTED , (wxObjectEventFunction)(void (wxPanel::*)(wxEvent&)) &TransformWidgetPanel::OnRadioButtonY );
146 Connect( rBtnZ->GetId() , wxEVT_COMMAND_RADIOBUTTON_SELECTED , (wxObjectEventFunction)(void (wxPanel::*)(wxEvent&)) &TransformWidgetPanel::OnRadioButtonZ );
147 Connect( rBtnC->GetId() , wxEVT_COMMAND_RADIOBUTTON_SELECTED , (wxObjectEventFunction)(void (wxPanel::*)(wxEvent&)) &TransformWidgetPanel::OnRadioButtonN );
148 Connect( BtnSave->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction)(void (wxPanel::*)(wxEvent&)) &TransformWidgetPanel::OnSave );
149 Connect( BtnLoad->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction)(void (wxPanel::*)(wxEvent&)) &TransformWidgetPanel::OnLoad );
150 Connect( BtnReset->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnReset );
151 Connect( BtnMoveDown->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnMoveDown );
152 Connect( BtnMoveUp->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnMoveUp );
153 Connect( BtnMemory->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnMemory );
154 Connect( BtnMemoryGoBack->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnMemoryGoBack );
155 Connect( mSliderGeneral->GetId() , wxEVT_SCROLL_THUMBRELEASE , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderGeneralRelease );
156 Connect( mSliderGeneral->GetId() , wxEVT_SCROLL_THUMBTRACK , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderGeneralTrack );
157 Connect( mSliderGeneral->GetId() , wxEVT_SCROLL_CHANGED , (wxObjectEventFunction)(void (wxPanel::*)(wxScrollEvent&)) &TransformWidgetPanel::OnSliderGeneralTrack );
159 wxBoxSizer *sizerA1 = new wxBoxSizer(wxHORIZONTAL);
160 sizerA1->Add( rBtnC , 1 );
161 sizerA1->Add( rBtnX , 1 );
162 sizerA1->Add( rBtnY , 1 );
163 sizerA1->Add( rBtnZ , 1 );
164 wxBoxSizer *sizerA2 = new wxBoxSizer(wxHORIZONTAL);
165 sizerA2->Add( BtnSave , 1 );
166 sizerA2->Add( BtnLoad , 1 );
167 wxBoxSizer *sizerA = new wxBoxSizer(wxHORIZONTAL);
168 sizerA->Add( sizerA1 , 1 );
169 sizerA->Add( sizerA2 , 1 );
171 wxBoxSizer *sizerB = new wxBoxSizer(wxHORIZONTAL);
172 sizerB->Add( mSliderGeneral , 1 );
173 sizerB->Add( BtnMoveDown , 0 );
174 sizerB->Add( BtnMoveUp , 0 );
175 wxBoxSizer *sizerC = new wxBoxSizer(wxHORIZONTAL);
176 sizerC->Add( cbLocalReference , 1 );
177 sizerC->Add( BtnReset , 1 );
178 sizerC->Add( BtnMemory , 1 );
179 sizerC->Add( BtnMemoryGoBack , 1 );
180 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
181 sizer->Add( sizerA , 0 );
182 sizer->Add( sizerB , 0 );
183 sizer->Add( sizerC , 0 );
188 TransformWidgetPanel::~TransformWidgetPanel()
192 void TransformWidgetPanel::ReleaseAngle( wxSlider * slider )
200 t->Concatenate ( tt->GetMatrix() ); t->Update();
201 tt->GetMatrix()->Identity(); tt->Update();
202 mBox->bbSetOutputOut( t );
203 mBox->bbSignalOutputModification(std::string("Out"));
206 void TransformWidgetPanel::OnSliderReleaseX(wxScrollEvent& event)
208 ReleaseAngle( mSliderRotationX );
211 void TransformWidgetPanel::OnSliderReleaseY(wxScrollEvent& event)
213 ReleaseAngle( mSliderRotationY );
216 void TransformWidgetPanel::OnSliderReleaseZ(wxScrollEvent& event)
218 ReleaseAngle( mSliderRotationZ );
221 void TransformWidgetPanel::TrackAngle( double angle, int idVector)
228 vtkMatrix4x4 *tm = t->GetMatrix();
229 double tvx = tm->GetElement(0,idVector);
230 double tvy = tm->GetElement(1,idVector);
231 double tvz = tm->GetElement(2,idVector);
232 tt = vtkTransform::New();
236 tt->RotateWXYZ( angle , tvx,tvy,tvz); tt->Update();
237 vtkTransform *result=vtkTransform::New();
238 result->PostMultiply();
239 result->Concatenate ( t->GetMatrix() ); result->Update();
240 result->Concatenate ( tt->GetMatrix() ); result->Update();
241 mBox->bbSetOutputOut( result );
242 mBox->bbSignalOutputModification(std::string("Out"));
245 void TransformWidgetPanel::OnSliderTrackX(wxScrollEvent& event)
247 TrackAngle(mSliderRotationX->GetValue() ,0);
250 void TransformWidgetPanel::OnSliderTrackY(wxScrollEvent& event)
252 TrackAngle(mSliderRotationY->GetValue() ,1);
255 void TransformWidgetPanel::OnSliderTrackZ(wxScrollEvent& event)
257 TrackAngle(mSliderRotationZ->GetValue() ,2);
260 void TransformWidgetPanel::SetPossiblePoint(std::vector<double> possiblePoint)
262 mPossiblePoint = possiblePoint;
265 void TransformWidgetPanel::_OnSetPoint()
267 mActualPoint = mPossiblePoint;
268 mLastPossiblePoint_localReference = mPossiblePoint;
269 mBox->bbSetOutputActualPoint( mActualPoint );
270 mBox->bbSignalOutputModification(std::string("ActualPoint"));
273 void TransformWidgetPanel::_OnSetPointLocalReference()
275 mActualPoint = mLastPossiblePoint_localReference;
276 // mLastPossiblePoint = mPossiblePoint;
277 mBox->bbSetOutputActualPoint( mActualPoint );
278 mBox->bbSignalOutputModification(std::string("ActualPoint"));
283 void TransformWidgetPanel::OnSetPoint(wxCommandEvent& event)
288 //------------------------------------------------------------------------
290 void TransformWidgetPanel::OnRadioButtonX(wxEvent& event)
295 void TransformWidgetPanel::OnRadioButtonY(wxEvent& event)
300 void TransformWidgetPanel::OnRadioButtonZ(wxEvent& event)
305 void TransformWidgetPanel::OnRadioButtonN(wxEvent& event)
310 void TransformWidgetPanel::OnReset(wxCommandEvent& event)
312 if ((mTool>=0) && (mTool<=2))
315 if (cbLocalReference->GetValue()==false)
317 tt->GetMatrix()->Identity(); tt->Update();
318 t->GetMatrix()->Identity(); t->Update();
321 ReleaseAngle( NULL );
325 t->RotateWXYZ( 90 , 1,0,0); tt->Update();
326 ReleaseAngle( NULL );
330 t->RotateWXYZ( 90 , 0,1,0); tt->Update();
331 ReleaseAngle( NULL );
334 TrackAngle(45, mTool );
335 ReleaseAngle( NULL );
336 } // if cbLocalReference
339 } // if mTool >=0 <=2
342 if (cbLocalReference->GetValue()==false)
346 _OnSetPointLocalReference();
347 } // if cbLocalReference
353 void TransformWidgetPanel::ReleaseCenter( wxSlider * slider )
359 mActualPoint[0] = mttActualPoint[0];
360 mActualPoint[1] = mttActualPoint[1];
361 mActualPoint[2] = mttActualPoint[2];
364 void TransformWidgetPanel::TrackCenter( double step )
366 vtkMatrix4x4 *tm = t->GetMatrix();
367 mttActualPoint[0] = mActualPoint[0] + tm->GetElement(0,2)*step;
368 mttActualPoint[1] = mActualPoint[1] + tm->GetElement(1,2)*step;
369 mttActualPoint[2] = mActualPoint[2] + tm->GetElement(2,2)*step;
370 mBox->bbSetOutputActualPoint( mttActualPoint );
371 mBox->bbSignalOutputModification(std::string("ActualPoint"));
372 mBox->bbSetOutputOut( t );
373 mBox->bbSignalOutputModification(std::string("Out"));
376 void TransformWidgetPanel::OnMoveDown(wxCommandEvent& event)
378 if ((mTool>=0) && (mTool<=2))
380 TrackAngle( -1 , mTool );
381 ReleaseAngle( NULL );
386 ReleaseCenter( NULL );
390 void TransformWidgetPanel::OnMoveUp(wxCommandEvent& event)
392 if ((mTool>=0) && (mTool<=2))
394 TrackAngle( 1 , mTool );
395 ReleaseAngle( NULL );
396 } // if mTool == 0 1 2
400 ReleaseCenter( NULL );
404 void TransformWidgetPanel::OnMemory(wxCommandEvent& event)
406 mMemoryPoint = mActualPoint;
407 mMemoryMatrix->DeepCopy( t->GetMatrix() );
410 void TransformWidgetPanel::Save(std::string filename)
413 ff = fopen( filename.c_str() , "w+" );
416 fprintf(ff,"ActualPoint:\n");
417 fprintf(ff,"%f %f %f\n",mActualPoint[0], mActualPoint[1], mActualPoint[2] );
418 vtkMatrix4x4 *m = t->GetMatrix();
419 fprintf(ff,"Transform:\n");
420 fprintf(ff,"%f %f %f %f \n",m->GetElement(0,0), m->GetElement(1,0), m->GetElement(2,0), m->GetElement(3,0) );
421 fprintf(ff,"%f %f %f %f \n",m->GetElement(0,1), m->GetElement(1,1), m->GetElement(2,1), m->GetElement(3,1) );
422 fprintf(ff,"%f %f %f %f \n",m->GetElement(0,2), m->GetElement(1,2), m->GetElement(2,2), m->GetElement(3,2) );
423 fprintf(ff,"%f %f %f %f\n\n",m->GetElement(0,3), m->GetElement(1,3), m->GetElement(2,3), m->GetElement(3,3) );
426 printf("TransformWidgetPanel::OnSave ...Error... creating file \n");
430 void TransformWidgetPanel::OnSave(wxCommandEvent& event)
432 wxFileDialog* FD = new wxFileDialog( 0,
433 _T("Save free plane configuratin"),
436 _T("(*.fpConf)|*.fpConf"),
437 wxFD_SAVE | wxFD_OVERWRITE_PROMPT,
440 int result_FD = FD->ShowModal();
441 // This line is need it by windows //EED
442 FD->SetReturnCode( result_FD );
443 if (FD->GetReturnCode()==wxID_OK)
445 std::string filename= (const char*) ( FD->GetPath().mb_str() );
450 void TransformWidgetPanel::Load(std::string filename)
453 ff = fopen( filename.c_str() , "r" );
458 fscanf(ff,"%s\n",tmpStr); // ActualPoint:
459 fscanf(ff,"%f %f %f\n",&t0,&t1,&t2);
464 vtkMatrix4x4 *m = t->GetMatrix();
465 fscanf(ff,"%s\n",tmpStr); // Transform:
466 fscanf(ff,"%f %f %f %f\n",&t0,&t1,&t2,&t3);
467 m->SetElement(0,0,t0);
468 m->SetElement(1,0,t1);
469 m->SetElement(2,0,t2);
470 m->SetElement(3,0,t3);
471 fscanf(ff,"%f %f %f %f\n",&t0,&t1,&t2,&t3);
472 m->SetElement(0,1,t0);
473 m->SetElement(1,1,t1);
474 m->SetElement(2,1,t2);
475 m->SetElement(3,1,t3);
476 fscanf(ff,"%f %f %f %f\n",&t0,&t1,&t2,&t3);
477 m->SetElement(0,2,t0);
478 m->SetElement(1,2,t1);
479 m->SetElement(2,2,t2);
480 m->SetElement(3,2,t3);
481 fscanf(ff,"%f %f %f %f\n",&t0,&t1,&t2,&t3);
482 m->SetElement(0,3,t0);
483 m->SetElement(1,3,t1);
484 m->SetElement(2,3,t2);
485 m->SetElement(3,3,t3);
488 mBox->bbSetOutputActualPoint( mActualPoint );
489 mBox->bbSignalOutputModification(std::string("ActualPoint"));
490 mBox->bbSetOutputOut( t );
491 mBox->bbSignalOutputModification(std::string("Out"));
495 printf("TransformWidgetPanel::OnLoad ...Error... reading file \n");
499 void TransformWidgetPanel::OnLoad(wxCommandEvent& event)
501 wxFileDialog* FD = new wxFileDialog( 0,
502 _T("Load configuration.."),
505 _T("(*.fpConf)|*.fpConf"),
506 wxFD_OPEN | wxFD_FILE_MUST_EXIST,
509 int result_FD = FD->ShowModal();
510 // This line is need it by windows //EED
511 FD->SetReturnCode( result_FD );
512 if (FD->GetReturnCode()==wxID_OK)
514 std::string filename= (const char*) ( FD->GetPath().mb_str() );
520 void TransformWidgetPanel::OnMemoryGoBack(wxCommandEvent& event)
522 mActualPoint = mMemoryPoint;
523 t->GetMatrix()->Identity();
524 vtkMatrix4x4 *m = vtkMatrix4x4::New();
525 m->DeepCopy( mMemoryMatrix );
527 mBox->bbSetOutputActualPoint( mActualPoint );
528 mBox->bbSignalOutputModification(std::string("ActualPoint"));
529 mBox->bbSetOutputOut( t );
530 mBox->bbSignalOutputModification(std::string("Out"));
535 void TransformWidgetPanel::OnSliderGeneralRelease(wxScrollEvent& event)
537 if ((mTool>=0) && (mTool<=2))
539 ReleaseAngle( mSliderGeneral );
540 } // if mTool == 0 1 2
543 ReleaseCenter( mSliderGeneral );
547 void TransformWidgetPanel::OnSliderGeneralTrack(wxScrollEvent& event)
549 if ((mTool>=0) && (mTool<=2))
551 TrackAngle( mSliderGeneral->GetValue() , mTool );
552 } // if mTool == 0 1 2
555 TrackCenter( mSliderGeneral->GetValue() );
560 //------------------------------------------------------------------------
561 //------------------------------------------------------------------------
562 //------------------------------------------------------------------------
564 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,TransformWidget2)
565 BBTK_BLACK_BOX_IMPLEMENTATION(TransformWidget2,bbtk::WxBlackBox);
567 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
570 //------------------------------------------------------
571 void TransformWidget2::Save(std::string filename)
573 TransformWidgetPanel *w = (TransformWidgetPanel*) bbGetOutputWidget( );
577 //------------------------------------------------------
578 void TransformWidget2::Load(std::string filename)
580 TransformWidgetPanel *w = (TransformWidgetPanel*) bbGetOutputWidget( );
584 //------------------------------------------------------
585 void TransformWidget2::Process()
587 TransformWidgetPanel *w = (TransformWidgetPanel*) bbGetOutputWidget( );
588 w->SetPossiblePoint( bbGetInputPossiblePoint() );
593 bbSetOutputBox_TransformWidget2(this);
598 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
600 void TransformWidget2::CreateWidget(wxWindow* parent)
602 TransformWidgetPanel *w = new TransformWidgetPanel(this,parent);
603 bbSetOutputWidget( w );
607 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
609 void TransformWidget2::bbUserSetDefaultValues()
613 bbSetOutputBox_TransformWidget2(NULL);
617 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
619 void TransformWidget2::bbUserInitializeProcessing()
624 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
626 void TransformWidget2::bbUserFinalizeProcessing()
630 }// EO namespace bbcreaMaracasVisu