// Class definition include
//----------------------------------------------------------------------------------------------------------------
#include "wxVtkBaseView_SceneManager.h"
+#include "wxVtk2DBaseView.h"
//----------------------------------------------------------------------------------------------------------------
// Class implementation
_wxVtk_BaseView = theWxBaseViewToManage;
if( _wxVtk_BaseView!=NULL )
{
- vtkInteractorStyleBaseView* theInteractorStyleBaseView = _wxVtk_BaseView->GetInteractorStyleBaseView();
+ vtkInteractorStyleBaseView* theInteractorStyleBaseView = (vtkInteractorStyleBaseView*)_wxVtk_BaseView->GetInteractorStyleBaseView();
theInteractorStyleBaseView->AddInteractorStyleMaracas( this );
SetVtkInteractorStyleBaseView( theInteractorStyleBaseView );
}
_contours_ViewControl->erase( iter );
i++;
}
- delete _contours_ViewControl;
_contours_ViewControl->clear();
+ delete _contours_ViewControl;
_workingGroup->clear();
delete _lastInteraction;
delete _workingGroup;
- delete _contours_ViewControl;
+ //delete _contours_ViewControl;
}
//------------------------------------------------------------------------------------------------------------
{
manContourControl = new manualContourControler();
manViewerContour = new manualViewContour();
+ manModelContour->SetCloseContour(false);
}
if (typeContour==2)
//Configuring the relations between the contour members representation
manViewerContour->SetModel( manModelContour );
manViewerContour->SetWxVtkBaseView( _wxVtk_BaseView );
- manViewerContour->SetRange( 2 );
+ manViewerContour->SetRange( 0.5 );
manViewerContour->SetZ( 1000 );
manViewerContour->SetSpacing(spc);
_viewerSelectionROI->SetSpacing( spc );
_controlerSelectionROI->SetModelView( _modelSelectionROI , _viewerSelectionROI );
- _wxVtk_BaseView->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( _controlerSelectionROI );
+ ((vtkInteractorStyleBaseView*)_wxVtk_BaseView->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _controlerSelectionROI );
_controlerSelectionROI->SetActive(false);
}
//fprintf(ff," %p \n", contourWRP->getControler() );
//fclose(ff);
- _wxVtk_BaseView->GetInteractorStyleBaseView()->RemoveInteractorStyleMaracas( contourWRP->getControler() );
+ ((vtkInteractorStyleBaseView*)_wxVtk_BaseView->GetInteractorStyleBaseView())->RemoveInteractorStyleMaracas( contourWRP->getControler() );
contourWRP->getControler()->SetActive( control );
contourWRP->getControler()->SetEditable( false );
std::map<std::string, ContourWrap_ViewControl *> :: iterator iter;
iter = _sceneContours_ViewControl->find( theKeyName );
- if (iter != _sceneContours_ViewControl->end()){
+ if (iter != _sceneContours_ViewControl->end())
+ {
ContourWrap_ViewControl * contourWRP = iter->second;
removeFromScene( contourWRP );
//EED Borrame
if( control )
{
- _wxVtk_BaseView->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( contourWRP->getControler() );
+ ((vtkInteractorStyleBaseView*)_wxVtk_BaseView->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( contourWRP->getControler() );
}
if( ifActive )
{
int size = _workingGroup->size();
for ( int i = 0; i<size; i++ )
{
- manualViewBaseContour * viewer = iter->second->getViewer();
+//EED??? manualViewBaseContour * viewer = iter->second->getViewer();
selectedObjects.push_back( iter->first);
iter++;
void wxVtkBaseView_SceneManager :: selectObjects( std::vector< std::string > theExistingObjectsToSelect )
{
std::map <std::string, ContourWrap_ViewControl *>::iterator iter = _contours_ViewControl->begin();
- int size = _contours_ViewControl->size();
- bool selected;
+//EED??? int size = _contours_ViewControl->size();
+//EED??? bool selected;
/*for ( int i = 0; i<size; i++ )
{
selected = false;
_wxVTKiren->GetEventPosition( X , Y );
bool ctrlKey = _vtkInteractorStyleBaseView->GetInteractor()->GetControlKey() == 1;
- bool shiftKey = _vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey() == 1;
+//??? bool shiftKey = _vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey() == 1;
if( _waiting && !ctrlKey )
{
{
//Multiple moving
- bool ckecking = false;
+//EED??? bool ckecking = false;
for( i =0; i<size ; i++ )
{
control = iter->second->getControler();
fclose(ff);*/
- char aa = _vtkInteractorStyleBaseView->GetInteractor()->GetKeyCode();
+//EED??? char aa = _vtkInteractorStyleBaseView->GetInteractor()->GetKeyCode();
bool condition = false;
//vtkCommand * theComand = _wxVtk_BaseView ->GetInteractorStyleBaseView()->GetCommand(
- vtkRenderWindowInteractor * vtkRWInteractor1 = _wxVtk_BaseView ->GetWxVTKRenderWindowInteractor();
- wxVTKRenderWindowInteractor * vtkRWInteractor2 = _wxVtk_BaseView ->GetWxVTKRenderWindowInteractor();//GetInteractorStyleBaseView()->GetInteractor();
- wxVTKRenderWindowInteractorPlus * vtkRWInteractor3 = (wxVTKRenderWindowInteractorPlus*)_wxVtk_BaseView ->GetWxVTKRenderWindowInteractor();//GetInteractorStyleBaseView()->GetInteractor();
+//EED??? vtkRenderWindowInteractor * vtkRWInteractor1 = _wxVtk_BaseView ->GetWxVTKRenderWindowInteractor();
+//EED??? wxVTKRenderWindowInteractor * vtkRWInteractor2 = _wxVtk_BaseView ->GetWxVTKRenderWindowInteractor();//GetInteractorStyleBaseView()->GetInteractor();
+//EED?? wxVTKRenderWindowInteractorPlus * vtkRWInteractor3 = (wxVTKRenderWindowInteractorPlus*)_wxVtk_BaseView ->GetWxVTKRenderWindowInteractor();//GetInteractorStyleBaseView()->GetInteractor();
vtkRenderWindowInteractor * vtkRWInteractor = _vtkInteractorStyleBaseView->GetInteractor();
bool ctrlKey = vtkRWInteractor->GetControlKey() == 1;
bool wxVtkBaseView_SceneManager :: OnRightButtonDown()
{
bool condition = false;
- vtkRenderWindowInteractor * vtkRWInteractor = _vtkInteractorStyleBaseView->GetInteractor();
- bool ctrlKey = vtkRWInteractor->GetControlKey() == 1;
+//EED??? vtkRenderWindowInteractor * vtkRWInteractor = _vtkInteractorStyleBaseView->GetInteractor();
+//EED??? bool ctrlKey = vtkRWInteractor->GetControlKey() == 1;
_waiting = true;
condition = true;
//_lastInteraction->getControler()->SetPosibleToMove( false );
control->SetActive( false );
control->SetEditable( false );
- _wxVtk_BaseView->GetInteractorStyleBaseView()->RemoveInteractorStyleMaracas( control );
+ control->SetPosibleToMove( false );
+// _wxVtk_BaseView->GetInteractorStyleBaseView()->RemoveInteractorStyleMaracas( control );
_lastInteraction->getViewer()->Refresh();
this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
}
bool wxVtkBaseView_SceneManager :: OnRightDClick()
{
bool condition = false; condition = true;
- vtkRenderWindowInteractor * vtkRWInteractor = _vtkInteractorStyleBaseView->GetInteractor();
+//EED??? vtkRenderWindowInteractor * vtkRWInteractor = _vtkInteractorStyleBaseView->GetInteractor();
/*vtkRenderWindowInteractor * vtkRWInteractor1 =*/ _vtkInteractorStyleBaseView->OnChar();
- wxVTKRenderWindowInteractor * wxVtkRWInterator = _wxVtk_BaseView ->GetWxVTKRenderWindowInteractor();
+//EED??? wxVTKRenderWindowInteractor * wxVtkRWInterator = _wxVtk_BaseView ->GetWxVTKRenderWindowInteractor();
/*if( _waiting )
{
int tmpPx,tmpPy;
wxVTKRenderWindowInteractor *wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
wxVTKiren->GetEventPosition( tmpPx , tmpPy );
- fprintf(ff,"::%s (x,y) = (%i, %i) t(sg): \n \n",method.c_str(), tmpPx, tmpPy, sg);
+ fprintf(ff,"::%s (x,y) = (%i, %i) t(sg): %f\n \n",method.c_str(), tmpPx, tmpPy, sg);
fclose(ff);
}