]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Feature #229: Showing objects in VTK: (Images are not displayed for the moment) BR_hydro_v_0_5
authorrkv <rkv@opencascade.com>
Fri, 13 Dec 2013 13:04:17 +0000 (13:04 +0000)
committerrkv <rkv@opencascade.com>
Fri, 13 Dec 2013 13:04:17 +0000 (13:04 +0000)
src/HYDROGUI/CMakeLists.txt
src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.cxx
src/HYDROGUI/HYDROGUI_VTKPrsDisplayer.h
src/HYDROGUI/HYDROGUI_VTKPrsShape.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_VTKPrsShape.h [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_VTKPrsShapeDriver.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_VTKPrsShapeDriver.h [new file with mode: 0644]

index 39ec2612b087232908796b1b56e416934c066dbd..e7adb3cd452c2689e96d166d56fed1c03e9686ce 100644 (file)
@@ -66,6 +66,8 @@ set(PROJECT_HEADERS
     HYDROGUI_VTKPrsBathymetryDriver.h
     HYDROGUI_VTKPrsDisplayer.h
     HYDROGUI_VTKPrsDriver.h
+    HYDROGUI_VTKPrsShape.h
+    HYDROGUI_VTKPrsShapeDriver.h
     HYDROGUI_Wizard.h
     HYDROGUI_Zone.h
     HYDROGUI_ImportGeomObjectOp.h
@@ -144,6 +146,8 @@ set(PROJECT_SOURCES
     HYDROGUI_VTKPrsBathymetryDriver.cxx
     HYDROGUI_VTKPrsDisplayer.cxx
     HYDROGUI_VTKPrsDriver.cxx
+    HYDROGUI_VTKPrsShape.cxx
+    HYDROGUI_VTKPrsShapeDriver.cxx
     HYDROGUI_Wizard.cxx
     HYDROGUI_Zone.cxx
     HYDROGUI_ImportGeomObjectOp.cxx
index 2b3e55f58810093e80c2ec9b07ecafa4bd60cd11..8b373317e81242cbaae2fafeddba21582cf7f389 100644 (file)
@@ -26,6 +26,7 @@
 #include "HYDROGUI_Module.h"
 #include "HYDROGUI_VTKPrs.h"
 #include "HYDROGUI_VTKPrsBathymetryDriver.h"
+#include "HYDROGUI_VTKPrsShapeDriver.h"
 #include "HYDROGUI_Tool.h"
 
 #include "HYDROData_Tool.h"
@@ -59,7 +60,7 @@
 #define SATURATION_END   1.0
 
 HYDROGUI_VTKPrsDisplayer::HYDROGUI_VTKPrsDisplayer( HYDROGUI_Module* theModule )
-: HYDROGUI_AbstractDisplayer( theModule ), myDriver( NULL )
+: HYDROGUI_AbstractDisplayer( theModule ), myDriver( NULL ), myShapeDriver( NULL )
 {
 }
 
@@ -305,6 +306,14 @@ HYDROGUI_VTKPrsDriver* HYDROGUI_VTKPrsDisplayer::getDriver( const int theViewId,
     }
     aDriver = myDriver;
   }
+  else
+  {
+    if ( !myShapeDriver )
+    {
+      myShapeDriver = new HYDROGUI_VTKPrsShapeDriver( myScalarBars[ theViewId ] );
+    }
+    aDriver = myShapeDriver;
+  }
 
   return aDriver;
 }
index 5db3e743ff670ac3d81d23ad9405e913e82993dd..abcdfd46bc13e96530106fea5182a9faa1602a12 100644 (file)
@@ -126,6 +126,7 @@ private:
   HYDROGUI_VTKPrsDriver* getDriver( const int theViewId, const Handle(HYDROData_Entity)& theObj );
 
   HYDROGUI_VTKPrsDriver*       myDriver;
+  HYDROGUI_VTKPrsDriver*       myShapeDriver;
 
   QMap<int, vtkSmartPointer<vtkScalarBarActor> > myScalarBars; //!< Colors legend presentations
 };
diff --git a/src/HYDROGUI/HYDROGUI_VTKPrsShape.cxx b/src/HYDROGUI/HYDROGUI_VTKPrsShape.cxx
new file mode 100644 (file)
index 0000000..7512b0a
--- /dev/null
@@ -0,0 +1,326 @@
+// Copyright (C) 2007-2013  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
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HYDROGUI_VTKPrsShape.h"
+
+#include <HYDROData_Entity.h>
+#include <HYDROData_Channel.h>
+#include <HYDROData_Document.h>
+#include <HYDROData_DummyObject3D.h>
+#include <HYDROData_Image.h>
+#include <HYDROData_ImmersibleZone.h>
+#include <HYDROData_Obstacle.h>
+#include <HYDROData_PolylineXY.h>
+#include <HYDROData_Polyline3D.h>
+#include <HYDROData_Profile.h>
+#include <HYDROData_Region.h>
+#include <HYDROData_Stream.h>
+#include <HYDROData_Zone.h>
+
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRepBuilderAPI_MakeWire.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+
+#include <gp_Pnt.hxx>
+
+#include <Graphic3d_AspectFillArea3d.hxx>
+#include <Graphic3d_MaterialAspect.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Wire.hxx>
+#include <TopoDS_Face.hxx>
+
+#include <TopExp_Explorer.hxx>
+
+#include <BRep_Builder.hxx>
+
+#include <Precision.hxx>
+
+#include <GEOM_Actor.h>
+#include <vtkScalarBarActor.h>
+
+#include <QString>
+
+// Hard-coded value of shape deflection coefficient for VTK viewer
+const double VTK_MIN_DEFLECTION = 0.001;
+
+
+//=======================================================================
+// name    : HYDROGUI_VTKPrsShape
+// Purpose : Constructor
+//=======================================================================
+HYDROGUI_VTKPrsShape::HYDROGUI_VTKPrsShape( const Handle(HYDROData_Entity)& theObject )
+: HYDROGUI_VTKPrs( theObject )
+{
+}
+
+//=======================================================================
+// name    : HYDROGUI_VTKPrsShape
+// Purpose : Destructor
+//=======================================================================
+HYDROGUI_VTKPrsShape::~HYDROGUI_VTKPrsShape()
+{
+}
+
+//================================================================
+// Function : compute
+// Purpose  : 
+//================================================================
+void HYDROGUI_VTKPrsShape::compute()
+{
+  if ( !getObject().IsNull() )
+  {
+    buildShape();
+
+    if ( !myTopoShape.IsNull() )
+    {
+      GEOM_Actor* anActor = GEOM_Actor::New();
+      anActor->SetShape( myTopoShape, VTK_MIN_DEFLECTION );
+      anActor->setIO( getIO() );
+      AddObject( anActor );
+
+      anActor->Delete();
+    }
+  }
+}
+
+
+void HYDROGUI_VTKPrsShape::buildShape()
+{
+  Handle(HYDROData_Entity) anObject = getObject();
+  // Try to retrieve information from object
+  if ( !anObject.IsNull() )
+  {
+    Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( anObject->Label() );
+  
+    if ( anObject->IsKind( STANDARD_TYPE(HYDROData_ImmersibleZone) ) )
+    {
+      Handle(HYDROData_ImmersibleZone) aZoneObj =
+        Handle(HYDROData_ImmersibleZone)::DownCast( anObject );
+
+      TopoDS_Shape aZoneShape = aZoneObj->GetTopShape();
+      if ( !aZoneShape.IsNull() ) {
+        if ( aZoneShape.ShapeType() == TopAbs_FACE ) {
+          TopoDS_Face aZoneFace = TopoDS::Face( aZoneShape );
+          setFace( aZoneFace, false, false );
+        } else {
+          myTopoShape = aZoneShape;
+        }
+      }
+
+      QColor aFillingColor = aZoneObj->GetFillingColor();
+      QColor aBorderColor = aZoneObj->GetBorderColor();
+
+      //setFillingColor( aFillingColor, false, false );
+      //setBorderColor( aBorderColor, false, false );
+    }
+    else if ( anObject->IsKind( STANDARD_TYPE(HYDROData_PolylineXY) ) )
+    {
+      Handle(HYDROData_PolylineXY) aPolyline =
+        Handle(HYDROData_PolylineXY)::DownCast( anObject );
+
+      TopoDS_Shape aPolylineShape = aPolyline->GetShape();
+
+      if ( !aPolylineShape.IsNull() ) {
+        if ( aPolylineShape.ShapeType() == TopAbs_WIRE ) {
+          TopoDS_Wire aPolylineWire = TopoDS::Wire( aPolylineShape );
+          setWire( aPolylineWire, false, false );  
+        } else {
+          myTopoShape = aPolylineShape;
+        }
+      }
+
+      QColor aWireColor = aPolyline->GetWireColor();
+      //setBorderColor( aWireColor, false, false );
+    }
+    else if ( anObject->IsKind( STANDARD_TYPE(HYDROData_Polyline3D) ) )
+    {
+      Handle(HYDROData_Polyline3D) aPolyline =
+        Handle(HYDROData_Polyline3D)::DownCast( anObject );
+
+      TopoDS_Shape aPolylineShape = aPolyline->GetShape3D();
+
+      if ( !aPolylineShape.IsNull() ) {
+        if ( aPolylineShape.ShapeType() == TopAbs_WIRE ) {
+          TopoDS_Wire aPolylineWire = TopoDS::Wire( aPolylineShape );
+          setWire( aPolylineWire, false, false );  
+        } else {
+          myTopoShape = aPolylineShape;
+        }
+      }
+
+      QColor aWireColor = aPolyline->GetBorderColor();
+      //setBorderColor( aWireColor, false, false );
+    }
+    else if ( anObject->IsKind( STANDARD_TYPE(HYDROData_Zone) ) )
+    {
+      Handle(HYDROData_Zone) aZone =
+        Handle(HYDROData_Zone)::DownCast( anObject );
+
+      TopoDS_Face aZoneFace = TopoDS::Face( aZone->GetShape() );
+
+      setFace( aZoneFace, false, false );
+      if (aZone->IsMergingNeed() && aZone->GetMergeType() == HYDROData_Zone::Merge_UNKNOWN )
+      {
+        // Red color for a zone with bathymetry conflict
+        //setFillingColor( Qt::red );
+      }
+      else
+      {
+        // Generate the filling color for zone
+        QStringList aGeomObjectsNames;
+
+        HYDROData_SequenceOfObjects aRefObjects = aZone->GetGeometryObjects();
+        HYDROData_SequenceOfObjects::Iterator anIter( aRefObjects );
+        for ( ; anIter.More(); anIter.Next() )
+        {
+          Handle(HYDROData_Object) aRefbject = 
+            Handle(HYDROData_Object)::DownCast( anIter.Value() );
+          if ( aRefbject.IsNull() )
+            continue;
+
+          QString aRefObjectName = aRefbject->GetName();
+          if ( aRefObjectName.isEmpty() )
+            continue;
+
+          aGeomObjectsNames.append( aRefObjectName );
+        }
+
+        //setFillingColor( HYDROGUI_Tool::GenerateFillingColor( aDocument, aGeomObjectsNames ) );
+      }
+    }
+    else if ( anObject->IsKind( STANDARD_TYPE(HYDROData_Image) ) )
+    {
+    }
+    else if ( anObject->IsKind( STANDARD_TYPE(HYDROData_Profile) ) )
+    {
+      Handle(HYDROData_Profile) aProfile =
+        Handle(HYDROData_Profile)::DownCast( anObject );
+
+      TopoDS_Wire aProfileWire;
+
+      if ( aProfile->IsValid() ) {
+        TopoDS_Shape aProfileShape = aProfile->GetShape3D();
+
+        if ( !aProfileShape.IsNull() && 
+             aProfileShape.ShapeType() == TopAbs_WIRE ) {
+          aProfileWire = TopoDS::Wire( aProfileShape );
+        }
+      }
+
+      setWire( aProfileWire, false, false );  
+
+      QColor aWireColor = aProfile->GetBorderColor();
+      //setBorderColor( aWireColor, false, false );
+    }
+    else if ( anObject->IsKind( STANDARD_TYPE(HYDROData_Stream) ) ||
+              anObject->IsKind( STANDARD_TYPE(HYDROData_Channel) ) ||
+              anObject->IsKind( STANDARD_TYPE(HYDROData_Obstacle) ) )
+    {
+      Handle(HYDROData_Object) aGeomObject =
+        Handle(HYDROData_Object)::DownCast( anObject );
+
+      TopoDS_Shape anObjShape = aGeomObject->GetTopShape();
+
+      setShape( anObjShape, false, false );
+
+      QColor aFillingColor = aGeomObject->GetFillingColor();
+      QColor aBorderColor = aGeomObject->GetBorderColor();
+
+      //setFillingColor( aFillingColor, false, false );
+      //setBorderColor( aBorderColor, false, false );
+    }
+    else if ( anObject->IsKind( STANDARD_TYPE(HYDROData_DummyObject3D) ) )
+    {
+      Handle(HYDROData_DummyObject3D) anObject3D =
+        Handle(HYDROData_DummyObject3D)::DownCast( anObject );
+      TopoDS_Shape aShape3D = anObject3D->GetShape();
+
+      setShape( aShape3D, false, false );
+
+      QColor aFillingColor = anObject3D->GetFillingColor();
+      QColor aBorderColor = anObject3D->GetBorderColor();
+
+      //setFillingColor( aFillingColor, false, false );
+      //setBorderColor( aBorderColor, false, false );
+    }
+  }
+}
+
+void HYDROGUI_VTKPrsShape::setWire( const TopoDS_Wire& theWire,
+                              const bool         theToDisplay,
+                              const bool         theIsUpdateViewer )
+{
+  myTopoShape = theWire;
+}
+
+void HYDROGUI_VTKPrsShape::setFaces( const TopoDS_Compound& theWires,
+                               const bool             theToDisplay,
+                               const bool             theIsUpdateViewer )
+{
+  TopExp_Explorer anExp( theWires, TopAbs_WIRE );
+  TopoDS_Compound aCompound;
+  BRep_Builder aBuilder;
+    aBuilder.MakeCompound( aCompound );
+
+  for ( ; anExp.More(); anExp.Next() ) {
+    TopoDS_Wire aWire = TopoDS::Wire( anExp.Current() );
+    if ( aWire.IsNull() ) {
+      continue;
+    }
+
+    BRepBuilderAPI_MakeFace aMakeFace( aWire, Standard_True );
+    aMakeFace.Build();
+    if( aMakeFace.IsDone() ) {
+      aBuilder.Add( aCompound, aMakeFace.Face() );
+    }
+  }
+
+  myTopoShape = aCompound;
+}
+
+void HYDROGUI_VTKPrsShape::setFace( const TopoDS_Wire& theWire,
+                              const bool         theToDisplay,
+                              const bool         theIsUpdateViewer )
+{
+  BRepBuilderAPI_MakeFace aFaceBuilder( theWire, Standard_True );
+  aFaceBuilder.Build();
+  if( aFaceBuilder.IsDone() )
+  {
+    TopoDS_Face aFace = aFaceBuilder.Face();
+    setFace( aFace, theToDisplay, theIsUpdateViewer );
+  }
+}
+
+void HYDROGUI_VTKPrsShape::setFace( const TopoDS_Face& theFace,
+                              const bool         theToDisplay,
+                              const bool         theIsUpdateViewer )
+{
+  myTopoShape = theFace;
+}
+
+void HYDROGUI_VTKPrsShape::setShape( const TopoDS_Shape& theShape,
+                               const bool          theToDisplay,
+                               const bool          theIsUpdateViewer )
+{
+  myTopoShape = theShape;
+}
diff --git a/src/HYDROGUI/HYDROGUI_VTKPrsShape.h b/src/HYDROGUI/HYDROGUI_VTKPrsShape.h
new file mode 100644 (file)
index 0000000..54d9e47
--- /dev/null
@@ -0,0 +1,89 @@
+// Copyright (C) 2007-2013  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
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef HYDROGUI_VTK_PRS_SHAPE_H
+#define HYDROGUI_VTK_PRS_SHAPE_H
+
+#include "HYDROGUI_VTKPrs.h"
+
+#include <HYDROData_Entity.h>
+
+#include <vtkScalarsToColors.h>
+#include <vtkWeakPointer.h>
+#include <vtkNew.h>
+#include <vtkPolyDataMapper.h>
+
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Wire.hxx>
+#include <TopoDS_Compound.hxx>
+
+#include <QColor>
+#include <QString>
+
+class TopoDS_Shape;
+
+/*
+  Class       : HYDROGUI_VTKPrsShape
+  Description : Presentation for HYDRO object on the base of OCC shape
+*/
+class HYDROGUI_VTKPrsShape : public HYDROGUI_VTKPrs
+{
+public:
+  HYDROGUI_VTKPrsShape( const Handle(HYDROData_Entity)& theObject );
+  virtual ~HYDROGUI_VTKPrsShape();
+
+  virtual void compute();
+
+  //! Get the range of colored 
+  void setLookupTable( vtkScalarsToColors* theTable ) { myLookupTable = theTable; }
+
+protected:
+  virtual vtkMapper*               mapper() { return myMapper.GetPointer(); }
+
+  void buildShape();
+
+  virtual void               setWire( const TopoDS_Wire& theWire,
+                                      const bool         theToDisplay = true,
+                                      const bool         theIsUpdateViewer = true );
+
+  virtual void               setFaces( const TopoDS_Compound& theWires,
+                                       const bool             theToDisplay = true,
+                                       const bool             theIsUpdateViewer = true );
+
+  virtual void               setFace( const TopoDS_Wire& theWire,
+                                      const bool         theToDisplay = true,
+                                      const bool         theIsUpdateViewer = true );
+
+  virtual void               setFace( const TopoDS_Face& theFace,
+                                      const bool         theToDisplay = true,
+                                      const bool         theIsUpdateViewer = true );
+
+  virtual void               setShape( const TopoDS_Shape& theShape,
+                                       const bool          theToDisplay = true,
+                                       const bool          theIsUpdateViewer = true );
+private:
+  vtkWeakPointer< vtkScalarsToColors > myLookupTable;
+  vtkNew< vtkPolyDataMapper >          myMapper;
+  TopoDS_Shape                   myTopoShape;
+};
+
+#endif
diff --git a/src/HYDROGUI/HYDROGUI_VTKPrsShapeDriver.cxx b/src/HYDROGUI/HYDROGUI_VTKPrsShapeDriver.cxx
new file mode 100644 (file)
index 0000000..cb8d03f
--- /dev/null
@@ -0,0 +1,55 @@
+// Copyright (C) 2007-2013  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
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HYDROGUI_VTKPrsShapeDriver.h"
+
+#include "HYDROGUI_VTKPrsShape.h"
+
+#include <HYDROData_Entity.h>
+
+HYDROGUI_VTKPrsShapeDriver::HYDROGUI_VTKPrsShapeDriver( vtkScalarBarActor* theScalarBar )
+{
+  myScalarBar = theScalarBar;
+}
+
+HYDROGUI_VTKPrsShapeDriver::~HYDROGUI_VTKPrsShapeDriver()
+{
+}
+
+bool HYDROGUI_VTKPrsShapeDriver::Update( const Handle(HYDROData_Entity)& theObj,
+                                         HYDROGUI_VTKPrs*& thePrs )
+{
+  HYDROGUI_VTKPrsDriver::Update( theObj, thePrs );
+
+  if( theObj.IsNull() )
+    return false;
+
+  if( !thePrs )
+    thePrs = new HYDROGUI_VTKPrsShape( theObj );
+
+  HYDROGUI_VTKPrsShape* aPrsShape = (HYDROGUI_VTKPrsShape*)thePrs;
+  // Update global colors table during compute if necessary
+  aPrsShape->setLookupTable( myScalarBar->GetLookupTable() );
+  aPrsShape->compute();
+
+  return true;
+}
diff --git a/src/HYDROGUI/HYDROGUI_VTKPrsShapeDriver.h b/src/HYDROGUI/HYDROGUI_VTKPrsShapeDriver.h
new file mode 100644 (file)
index 0000000..753df64
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright (C) 2007-2013  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
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef HYDROGUI_VTKPrsShapeDRIVER_H
+#define HYDROGUI_VTKPrsShapeDRIVER_H
+
+#include "HYDROGUI_VTKPrsDriver.h"
+
+#include <vtkScalarBarActor.h>
+
+/**
+ * \class HYDROGUI_VTKPrsShapeDriver
+ * \brief Presentation driver for hydro objects on the base of OCC shapes.
+ */
+class HYDROGUI_VTKPrsShapeDriver : public HYDROGUI_VTKPrsDriver
+{
+public:
+  /**
+   * \brief Constructor.
+   */
+  HYDROGUI_VTKPrsShapeDriver( vtkScalarBarActor* theScalarBar );
+
+  /**
+   * \brief Destructor.
+   */
+  virtual ~HYDROGUI_VTKPrsShapeDriver();
+
+public:
+  /**
+   * \brief Update or create the presentation on a basis of data object.
+   * \param theObj data object
+   * \param thePrs presentation
+   * \return status of the operation
+   */
+  virtual bool Update( const Handle(HYDROData_Entity)& theObj,
+                       HYDROGUI_VTKPrs*& thePrs );
+
+private:
+  vtkScalarBarActor* myScalarBar;
+};
+
+#endif