void VisWinInteractions::HasPlots(void) { if (enableInteractionModeChanges) { if (!((mediator.GetMode() == WINMODE_3D || mediator.GetMode() == WINMODE_AXISARRAY || mediator.GetMode() == WINMODE_PARALLELAXES || mediator.GetMode() == WINMODE_VERTPARALLELAXES) && mode == LINEOUT)) { SetInteractionMode(mode); } else { SetInteractionMode(NAVIGATE); } } }
RenderView3D::RenderView3D( QWidget* parent ) : RenderView( parent ) { this->GetRenderWindow()->GetInteractor()->SetDesiredUpdateRate(30); this->GetRenderWindow()->GetInteractor()->SetStillUpdateRate(0.01); GetRenderWindow()->SetAlphaBitPlanes(0); GetRenderWindow()->SetMultiSamples(0); GetRenderer()->SetUseDepthPeeling(true); GetRenderer()->SetMaximumNumberOfPeels(4); GetRenderer()->SetOcclusionRatio(0); m_bShowSliceFrames = true; m_bShowAxes = true; for ( int i = 0; i < 3; i++ ) { m_actorSliceFrames[i] = vtkSmartPointer<vtkActor>::New(); m_actorSliceFrames[i]->SetMapper( vtkSmartPointer<vtkPolyDataMapper>::New() ); m_actorSliceFrames[i]->GetProperty()->SetRepresentationToWireframe(); m_actorSliceFrames[i]->GetProperty()->SetDiffuse( 0.0 ); m_actorSliceFrames[i]->GetProperty()->SetAmbient( 1.0 ); m_bSliceVisibility[i] = true; m_actorSliceBoundingBox[i] = vtkSmartPointer<vtkActor>::New(); m_cubeSliceBoundingBox[i] = vtkSmartPointer<vtkCubeSource>::New(); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New(); mapper->SetInputConnection( m_cubeSliceBoundingBox[i]->GetOutputPort() ); m_actorSliceBoundingBox[i]->SetMapper( mapper ); mapper->Update(); m_actorSliceBoundingBox[i]->GetProperty()->SetRepresentationToWireframe(); } HighlightSliceFrame( -1 ); m_cursor3D = new Cursor3D( this ); m_interactorNavigate = new Interactor3DNavigate( this ); m_interactorMeasure = new Interactor3DMeasure( this ); m_interactorVolumeCrop = new Interactor3DVolumeCrop(this); connect(m_cursor3D, SIGNAL(Updated()), this, SLOT(RequestRedraw())); m_actorScalarBar->SetNumberOfLabels( 4 ); m_actorAxesActor = vtkSmartPointer<vtkCubeAxesActor>::New(); m_actorAxesActor->XAxisLabelVisibilityOn(); m_actorAxesActor->YAxisLabelVisibilityOn(); m_actorAxesActor->ZAxisLabelVisibilityOn(); m_actorAxesActor->SetXTitle(""); m_actorAxesActor->SetYTitle(""); m_actorAxesActor->SetZTitle(""); m_actorAxesActor->SetFlyModeToClosestTriad(); m_actorAxesActor->SetCamera(m_renderer->GetActiveCamera()); SetInteractionMode(IM_Navigate); }