X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOCCViewer%2FOCCViewer_ViewModel.h;h=5e344e074fa0fd53df1313d3d3238b255b5c1851;hb=26ac7ca874ce9a796ff7ad43685f42afca635df9;hp=5e2e955b38192864e1c8435dddc3266ddb8b44d4;hpb=0853d6807ab3a2cfd377dc2d086dda70021cf71c;p=modules%2Fgui.git diff --git a/src/OCCViewer/OCCViewer_ViewModel.h b/src/OCCViewer/OCCViewer_ViewModel.h index 5e2e955b3..5e344e074 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.h +++ b/src/OCCViewer/OCCViewer_ViewModel.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -36,7 +36,6 @@ #include #include #include -#include #include class QKeyEvent; @@ -70,9 +69,17 @@ public: Corner3Gradient, Corner4Gradient, LastGradient = Corner4Gradient }; + /*! supported stereo types */ + enum { + QuadBufferType, AnaglyphType, + RowInterlacedType, ColumnInterlacedType, + ChessBoardType, SideBySideType, + OverUnderType + }; static QString Type() { return "OCCViewer"; } static QString backgroundData( QStringList&, QIntList&, QIntList& ); + static void stereoData( QStringList&, QIntList&); OCCViewer_Viewer( bool DisplayTrihedron = true); virtual ~OCCViewer_Viewer(); @@ -93,6 +100,8 @@ public: void performSelectionChanged(); // emit signal selectionChanged + void setDefaultLights(); + QColor backgroundColor() const; // obsolete void setBackgroundColor( const QColor& ); // obsolete Qtx::BackgroundData background() const; @@ -126,9 +135,6 @@ public: public: Handle(V3d_Viewer) getViewer3d() const { return myV3dViewer;} -#if OCC_VERSION_LARGE <= 0x06060000 - Handle(V3d_Viewer) getCollector3d() const { return myV3dCollector; } -#endif Handle(AIS_InteractiveContext) getAISContext() const { return myAISContext; } Handle(AIS_Trihedron) getTrihedron() const { return myTrihedron; } @@ -137,6 +143,30 @@ public: int interactionStyle() const; void setInteractionStyle( const int ); + int projectionType() const; + void setProjectionType( const int ); + int stereoType() const; + void setStereoType( const int ); + + int anaglyphFilter() const; + void setAnaglyphFilter( const int ); + + void setStereographicFocus( const int, const double ); + int stereographicFocusType() const; + double stereographicFocusValue() const; + + void setInterocularDistance( const int, const double ); + int interocularDistanceType() const; + double interocularDistanceValue() const; + + bool isReverseStereo() const; + void setReverseStereo( const bool ); + + bool isVSync() const; + void setVSync( const bool ); + + bool isQuadBufferSupport() const; + void setQuadBufferSupport( const bool ); int zoomingStyle() const; void setZoomingStyle( const int ); @@ -151,11 +181,23 @@ public: void enableMultiselection(bool isEnable); bool isMultiSelectionEnabled() const { return myMultiSelectionEnabled; } + bool enableDrawMode( bool on ); + + void setClippingColor( const QColor& ); + QColor clippingColor() const; + + void setClippingTextureParams( const bool, const QString&, const bool, const double ); + bool isDefaultTextureUsed() const; + QString clippingTexture() const; + bool isTextureModulated() const; + double clippingTextureScale() const; + int getSelectionCount() const { return (!myAISContext.IsNull())? myAISContext->NbSelected():0; } void setStaticTrihedronDisplayed(const bool on); /* Clip planes management */ + Handle(Graphic3d_ClipPlane) createClipPlane(const gp_Pln& thePlane, const Standard_Boolean theIsOn); void setClipPlanes (ClipPlanesList theList); ClipPlanesList getClipPlanes() const; void applyExistingClipPlanesToObject (const Handle(AIS_InteractiveObject)& theObject); @@ -194,23 +236,30 @@ protected slots: void onChangeBackground(); protected: - Handle(V3d_Viewer) myV3dViewer; - -#if OCC_VERSION_LARGE <= 0x06060000 - Handle(V3d_Viewer) myV3dCollector; -#endif + Handle(V3d_Viewer) myV3dViewer; Handle(AIS_Trihedron) myTrihedron; Handle(AIS_InteractiveContext) myAISContext; int myInteractionStyle; int myZoomingStyle; + int myProjectionType; + int myStereoType; + int myAnaglyphFilter; + int myStereographicFocusType; + int myInterocularDistanceType; + + double myStereographicFocusValue; + double myInterocularDistanceValue; bool myPreselectionEnabled; bool mySelectionEnabled; bool myMultiSelectionEnabled; bool myIsRelative; + bool myToReverseStereo; + bool myVSyncMode; + bool myQuadBufferSupport; int myTopLayerId; @@ -225,6 +274,13 @@ protected: ClipPlanesList myClipPlanes; Graphic3d_SequenceOfHClipPlane myInternalClipPlanes; + + QColor myClippingColor; + bool myDefaultTextureUsed; + QString myClippingTexture; + bool myTextureModulated; + double myClippingTextureScale; + }; #ifdef WIN32