Exemplo n.º 1
0
void
NavigateCurve::EndMiddleButtonAction()
{
    EndDolly();

    IssueViewCallback();
}
void
NavigateAxisArray::EndMiddleButtonAction()
{
    EndDolly();

    IssueViewCallback();
}
Exemplo n.º 3
0
void vtkInteractorStyleQuench::OnRightButtonUp()
{
  
  _interaction_mode = INTERACTION_IDLE;
        _right_button_down = 0;
	if(State == VTKIS_DOLLY)
		EndDolly();

	// check if the timer is running
		if(IsRunning() == false)
			return;
	// Stop the timer
	Stop();
	
	FindPokedRenderer(Interactor->GetEventPosition()[0], Interactor->GetEventPosition()[1]);

	_mousedown_x =     Interactor->GetEventPosition()[0];
	_mousedown_y = abs(Interactor->GetEventPosition()[1]);


	if(_pathwayViz->OnRightButtonUp(_mousedown_x, _mousedown_y))
		return ;
	if(_voiViz->OnRightButton(_mousedown_x, _mousedown_y))
		return;
	if(_volViz->OnRightButtonUp(_mousedown_x, _mousedown_y))
		return ;
}
Exemplo n.º 4
0
void cv::viz::InteractorStyle::zoomOut()
{
    FindPokedRenderer(Interactor->GetEventPosition()[0], Interactor->GetEventPosition()[1]);
    // Zoom out
    StartDolly();
    double factor = 10.0 * -0.2 * .5;
    Dolly(std::pow(1.1, factor));
    EndDolly();
}
Exemplo n.º 5
0
void
pcl::visualization::PCLVisualizerInteractorStyle::zoomOut ()
{
  FindPokedRenderer (Interactor->GetEventPosition ()[0], Interactor->GetEventPosition ()[1]);
  // Zoom out
  StartDolly ();
  double factor = 10.0 * -0.2 * .5;
  Dolly (pow (1.1, factor));
  EndDolly ();
}
Exemplo n.º 6
0
void vtkInteractorStyleQuench::OnLeftButtonUp()
{
	vtkRenderWindowInteractor *rwi = this->Interactor;
	int x = rwi->GetEventPosition()[0];
	int y = rwi->GetEventPosition()[1];

	if(_interaction_mode == INTERACTION_DRAW_GESTURE)
	{
	  _interaction_mode = INTERACTION_IDLE;
		_GestureInteractor->EndSelect(x,y,false);
		bool pathwayVisiblity = _pathwayViz->PathwayVisibility();
		bool pointsVisiblity  = _pathwayViz->PointsVisibility();
		bool bfalse = false; _pathwayViz->SetPathwayVisibility(bfalse); _pathwayViz->SetPointsVisibility(bfalse);

		PRAPID_model model;
		if (_pathwayViz->Mode() == qPathwayViz::TOUCH_MODE) {
			model = _GestureInteractor->PruneGesture2RAPIDModel();
		} else if (_pathwayViz->Mode() == qPathwayViz::SURFACE_MODE) {
			model = _GestureInteractor->SurfaceIntersectionGesture2RAPIDModel();
		} else {
			cerr << "WARNING: Don't recognize gesture mode." << endl;
		}

		_pathwayViz->SetPathwayVisibility(pathwayVisiblity); 
		_pathwayViz->SetPointsVisibility(pointsVisiblity);

		NotifyAllListeners(PEvent ( new EventFilterPathwaysByGesture(model) ) );

		//_renderer->GetRenderWindow()->Render();
		return;
	}
	_left_button_down=0;

	_interaction_mode = INTERACTION_IDLE;
	if (!_mouse_moved)
	  _voiViz->OnClick(x,y);

	if(_interaction_mode == INTERACTION_ROI_EDIT)
	  {
	    _interaction_mode = INTERACTION_IDLE;
	    return;
	  }

	switch (this->State)  
	{
	case QIS_BEGIN_ROI_MESH:
		//	frame->EndROIMeshCreation();
		//	break;
	case VTKIS_DOLLY:
		EndDolly();
		break;
	case VTKIS_PAN:
		EndPan();
		break;
	case VTKIS_SPIN:
		EndSpin();
		break;
	case VTKIS_ROTATE:
		// only happens in mouse mode.
		EndRotate();
		break;
		//case QIS_SELECT_VIS_PANEL:
		//	break;
		//case QIS_SELECT_STATE:
		//	this->EndSelect();
		//	break;
		break;
	}
	State = VTKIS_NONE;
	_interaction_mode = INTERACTION_IDLE;
	//this->frame->RefreshViz();
}