X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMGUI%2FGEOM_Displayer.h;h=cf5a9df5536ac20be2197a3758db9829b29bcb61;hb=02b418c3b20546854152b3ff5b85b61ae87c9a63;hp=dba95ec3eff8ccdd82198c36e2640a88f92f1b75;hpb=7d880c6a8262b6d670ed70ee2b9ec25c199a46d4;p=modules%2Fgeom.git diff --git a/src/GEOMGUI/GEOM_Displayer.h b/src/GEOMGUI/GEOM_Displayer.h index dba95ec3e..cf5a9df55 100644 --- a/src/GEOMGUI/GEOM_Displayer.h +++ b/src/GEOMGUI/GEOM_Displayer.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 @@ -28,6 +28,7 @@ #define GEOM_DISPLAYER_H #include "GEOM_GEOMGUI.hxx" +#include #include @@ -44,8 +45,12 @@ class SALOME_OCCViewType; #include #include #include +#if OCC_VERSION_MAJOR >= 7 + #include +#endif #include - +#include +#include #include #include @@ -60,14 +65,11 @@ class SALOME_OCCViewType; typedef std::list ObjectList; -class TColStd_MapOfInteger; class LightApp_SelectionMgr; class SalomeApp_Study; class SalomeApp_Application; class SUIT_SelectionFilter; -class Handle_GEOM_AISShape; class gp_Ax3; -//class SALOME_Selection; class GEOMGUI_EXPORT GEOM_Displayer : public LightApp_Displayer { @@ -128,6 +130,9 @@ public: const bool theUpdateViewer, SALOME_View* theViewFrame ); + /* Update visibility state */ + void UpdateVisibility( SALOME_View*, const SALOME_Prs*, bool ); + /* build presentation accordint to the current viewer type*/ SALOME_Prs* BuildPrs ( GEOM::GEOM_Object_ptr ); SALOME_Prs* BuildPrs ( const TopoDS_Shape& ); @@ -139,8 +144,8 @@ public: int GetColor () const; bool HasColor () const; - void SetTransparency ( const double ); - void UnsetTransparency(); + double SetTransparency ( const double ); + double UnsetTransparency(); double GetTransparency () const; bool HasTransparency () const; @@ -159,7 +164,20 @@ public: void SetIsosWidth ( const int ); int GetIsosWidth () const; bool HasIsosWidth () const; + + /* Set nb iso-libes for displaying. Use -1 to set default values. */ + int SetNbIsos( const int ); + int UnsetNbIsos(); + int GetNbIsos() const; + bool HasNbIsos() const; + /* Set color for iso-lines displaying. If it is equal -1 then default color is used. + Available values are from Quantity_NameOfColor enumeration */ + int SetIsosColor ( const int ); + int UnsetIsosColor(); + int GetIsosColor () const; + bool HasIsosColor () const; + /* Set display mode shape displaying. If it is equal -1 then display mode is used. */ int SetDisplayMode( const int ); int GetDisplayMode() const; @@ -175,6 +193,7 @@ public: virtual void Update( SALOME_VTKPrs* ); virtual void BeforeDisplay( SALOME_View*, const SALOME_OCCPrs* ); virtual void AfterDisplay ( SALOME_View*, const SALOME_OCCPrs* ); + virtual void BeforeErase ( SALOME_View*, const SALOME_OCCPrs* ); virtual void AfterErase ( SALOME_View*, const SALOME_OCCPrs* ); /* This methos is used for activisation/deactivisation of objects to be displayed*/ @@ -182,7 +201,9 @@ public: bool ToActivate() const; /* Activate/Deactivate selection*/ + void LocalSelection( const Handle(SALOME_InteractiveObject)&, const std::list ); void LocalSelection( const Handle(SALOME_InteractiveObject)&, const int ); + void LocalSelection( const SALOME_ListIO& theIOList, const std::list ); void LocalSelection( const SALOME_ListIO& theIOList, const int ); void GlobalSelection( const int = GEOM_ALLOBJECTS, const bool = false ); void GlobalSelection( const TColStd_MapOfInteger&, const bool = false, const QList* = 0 ); @@ -279,12 +300,17 @@ protected: std::string myTexture; int myType; SALOME_View* myViewFrame; +#if OCC_VERSION_MAJOR >= 7 + Handle(AIS_ColorScale) myColorScale; +#endif // Attributes Quantity_Color myShadingColor; int myColor; double myWidth; int myIsosWidth; + int myNbIsos; + int myIsosColor; bool myToActivate; int myDisplayMode; bool myHasDisplayMode;