+/*!
+ \return projection type
+*/
+int OCCViewer_Viewer::projectionType() const
+{
+ return myProjectionType;
+}
+
+/*!
+ Sets projection type: 0 - orthographic, 1 - perspective
+ \param theType - new projection type
+*/
+void OCCViewer_Viewer::setProjectionType( const int theType )
+{
+ if ( myProjectionType != theType ) {
+ if ( theType != OCCViewer_ViewWindow::Stereo )
+ myProjectionType = theType;
+
+ if ( !myViewManager )
+ return;
+
+ QVector<SUIT_ViewWindow*> wins = myViewManager->getViews();
+ for ( int i = 0; i < (int)wins.count(); i++ )
+ {
+ OCCViewer_ViewWindow* win = ::qobject_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
+ if ( win )
+ win->setProjectionType( (OCCViewer_ViewWindow::ProjectionType)theType );
+ }
+ }
+}
+
+
+OCCViewer_ViewWindow::SelectionStyle OCCViewer_Viewer::selectionStyle() const
+{
+ return mySelectionStyle;
+}
+
+void OCCViewer_Viewer::setSelectionStyle(OCCViewer_ViewWindow::SelectionStyle theMode)
+{
+ if (mySelectionStyle != theMode) {
+ mySelectionStyle = theMode;
+ if (!myViewManager)
+ return;
+
+ QVector<SUIT_ViewWindow*> wins = myViewManager->getViews();
+ for (int i = 0; i < (int)wins.count(); i++)
+ {
+ OCCViewer_ViewWindow* win = ::qobject_cast<OCCViewer_ViewWindow*>(wins.at(i));
+ if (win)
+ win->setSelectionStyle(theMode);
+ }
+ }
+}
+
+
+
+/*!
+ \return stereo type
+*/
+int OCCViewer_Viewer::stereoType() const
+{
+ return myStereoType;
+}
+
+/*!
+ Sets stereo type
+ \param theType - new stereo type
+*/
+void OCCViewer_Viewer::setStereoType( const int theType )
+{
+ myStereoType = theType;
+
+ if ( !myViewManager )
+ return;
+
+ QVector<SUIT_ViewWindow*> wins = myViewManager->getViews();
+ for ( int i = 0; i < (int)wins.count(); i++ )
+ {
+ OCCViewer_ViewWindow* win = ::qobject_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
+ if ( win )
+ win->setStereoType( (OCCViewer_ViewWindow::StereoType)theType );
+ }
+}
+
+/*!
+ \return stereographic focus type
+*/
+int OCCViewer_Viewer::stereographicFocusType() const
+{
+ return myStereographicFocusType;
+}
+
+/*!
+ \return stereographic focus value
+*/
+double OCCViewer_Viewer::stereographicFocusValue() const
+{
+ return myStereographicFocusValue;
+}
+
+/*!
+ Sets stereographic focus parameters
+ \param theType - new stereographic focus type
+ \param theValue - new stereographic focus value
+*/
+void OCCViewer_Viewer::setStereographicFocus( const int theType, const double theValue )
+{
+ myStereographicFocusType = theType;
+ myStereographicFocusValue = theValue;
+
+ if ( !myViewManager )
+ return;
+
+ QVector<SUIT_ViewWindow*> wins = myViewManager->getViews();
+ for ( int i = 0; i < (int)wins.count(); i++ )
+ {
+ OCCViewer_ViewWindow* win = ::qobject_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
+ if ( win )
+ win->setStereographicFocus( (OCCViewer_ViewWindow::FocusIODType)theType, theValue );
+ }
+}
+
+/*!
+ \return stereographic focus type
+*/
+int OCCViewer_Viewer::interocularDistanceType() const
+{
+ return myInterocularDistanceType;
+}
+
+/*!
+ \return stereographic focus value
+*/
+double OCCViewer_Viewer::interocularDistanceValue() const
+{
+ return myInterocularDistanceValue;
+}
+
+/*!
+ Sets interocular distance parameters
+ \param theType - new IOD type
+ \param theValue - new IOD value
+*/
+void OCCViewer_Viewer::setInterocularDistance( const int theType, const double theValue )
+{
+ myInterocularDistanceType = theType;
+ myInterocularDistanceValue = theValue;
+
+ if ( !myViewManager )
+ return;
+
+ QVector<SUIT_ViewWindow*> wins = myViewManager->getViews();
+ for ( int i = 0; i < (int)wins.count(); i++ )
+ {
+ OCCViewer_ViewWindow* win = ::qobject_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
+ if ( win )
+ win->setInterocularDistance( (OCCViewer_ViewWindow::FocusIODType)theType, theValue );
+ }
+}
+
+/*!
+ \return anaglyph filter
+*/
+int OCCViewer_Viewer::anaglyphFilter() const
+{
+ return myAnaglyphFilter;
+}
+
+/*!
+ Sets anaglyph filter
+ \param theType - new anaglyph filter
+*/
+void OCCViewer_Viewer::setAnaglyphFilter( const int theType )
+{
+ myAnaglyphFilter = theType;
+
+ if ( !myViewManager )
+ return;
+
+ QVector<SUIT_ViewWindow*> wins = myViewManager->getViews();
+ for ( int i = 0; i < (int)wins.count(); i++ )
+ {
+ OCCViewer_ViewWindow* win = ::qobject_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
+ if ( win )
+ win->setAnaglyphFilter( (OCCViewer_ViewWindow::AnaglyphFilter)theType );
+ }
+}
+
+/*!
+ \return reverse stereo
+*/
+bool OCCViewer_Viewer::isReverseStereo() const
+{
+ return myToReverseStereo;
+}
+
+/*!
+ Sets reverse stereo
+ \param theReverse - enable/disable reverse mode
+*/
+void OCCViewer_Viewer::setReverseStereo( const bool theReverse )
+{
+ myToReverseStereo = theReverse;
+
+ if ( !myViewManager )
+ return;
+
+ QVector<SUIT_ViewWindow*> wins = myViewManager->getViews();
+ for ( int i = 0; i < (int)wins.count(); i++ )
+ {
+ OCCViewer_ViewWindow* win = ::qobject_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
+ if ( win )
+ win->setReverseStereo( theReverse );
+ }
+}
+
+/*!
+ \return V-Sync mode
+*/
+bool OCCViewer_Viewer::isVSync() const
+{
+ return myVSyncMode;
+}
+
+/*!
+ Set V-Sync mode
+ \param theEnable - enable/disable V-Sync mode
+*/
+void OCCViewer_Viewer::setVSync( const bool theEnable )
+{
+ myVSyncMode = theEnable;
+
+ if ( !myViewManager )
+ return;
+
+ QVector<SUIT_ViewWindow*> wins = myViewManager->getViews();
+ for ( int i = 0; i < (int)wins.count(); i++ )
+ {
+ OCCViewer_ViewWindow* win = ::qobject_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
+ if ( win )
+ win->setVSync( theEnable );
+ }
+}
+
+/*!
+ \return support quad-buffered stereo
+*/
+bool OCCViewer_Viewer::isQuadBufferSupport() const
+{
+ return myQuadBufferSupport;
+}
+
+/*!
+ Set support quad-buffered stereo
+ \param theEnable - enable/disable support quad-buffered stereo
+*/
+void OCCViewer_Viewer::setQuadBufferSupport( const bool theEnable )
+{
+ myQuadBufferSupport = theEnable;
+
+ if ( !myViewManager )
+ return;
+
+ QVector<SUIT_ViewWindow*> wins = myViewManager->getViews();
+ for ( int i = 0; i < (int)wins.count(); i++ )
+ {
+ OCCViewer_ViewWindow* win = ::qobject_cast<OCCViewer_ViewWindow*>( wins.at( i ) );
+ if ( win )
+ win->setQuadBufferSupport( theEnable );
+ }
+}
+