Salome HOME
Initial merge of branch 'BR_HYDRO_IMPS_2016' into BR_PORTING_OCCT_7
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ShapeBathymetry.h
1 // Copyright (C) 2014-2015  EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
6 //
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10 // Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 #ifndef HYDROGUI_SHAPE_BATHYMETRY_H
20 #define HYDROGUI_SHAPE_BATHYMETRY_H
21
22 #include <HYDROGUI_Shape.h>
23 #include <TColgp_HArray1OfPnt.hxx>
24 #include <Quantity_HArray1OfColor.hxx>
25
26 class HYDROData_Bathymetry;
27 class AIS_ColorScale;
28 class HYDROGUI_OCCDisplayer;
29
30 class HYDROGUI_ShapeBathymetry : public HYDROGUI_Shape
31 {
32 public:
33   HYDROGUI_ShapeBathymetry( HYDROGUI_OCCDisplayer* theDisplayer,
34                             const Handle(AIS_InteractiveContext)& theContext,
35                             const Handle(HYDROData_Bathymetry)&    theBathymetry,
36                             const int                             theZLayer = -1 );
37   virtual ~HYDROGUI_ShapeBathymetry();
38
39   void GetRange( double& theMin, double& theMax ) const;
40   void UpdateWithColorScale( const Handle(AIS_ColorScale)& );
41
42   virtual void display( const bool theIsUpdateViewer = true );
43   virtual void erase( const bool theIsUpdateViewer = true );
44
45   virtual void               update( bool isUpdateViewer,
46                                      bool isDeactivateSelection );
47
48   virtual void               setVisible( const bool theState,
49                                          const bool theIsUpdateViewer = true );
50 protected:
51   virtual Handle(AIS_InteractiveObject) createShape() const;
52   virtual void displayShape( const bool theIsUpdateViewer );
53
54   void setToUpdateColorScale( bool isChanged );
55
56 private:
57   HYDROGUI_OCCDisplayer* myDisplayer;
58   Handle(TColgp_HArray1OfPnt)     myCoords;
59   Handle(Quantity_HArray1OfColor) myColors;
60 };
61
62 #endif