Salome HOME
Porting on OCCT 7.0 and Qt 5. Make compilable version.
[modules/hydro.git] / src / HYDROData / HYDROData_Bathymetry.h
index 881af2c56d5f991c76992079b9e6e45e719f0956..39ac30b1d3eee244b349819a4018bc4b937a38fe 100644 (file)
@@ -1,8 +1,4 @@
-// Copyright (C) 2007-2015  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
-//
+// Copyright (C) 2014-2015  EDF-R&D
 // 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
 #define HYDROData_Bathymetry_HeaderFile
 
 #include "HYDROData_IAltitudeObject.h"
+#include "HYDROData_QuadtreeNode.hxx"
+#include <vtkPolyData.h>
+#include <vtkIdList.h>
 
 class QFile;
 class gp_XYZ;
-class Handle_HYDROData_PolylineXY;
+class gp_XY;
+class HYDROData_PolylineXY;
 
-DEFINE_STANDARD_HANDLE(HYDROData_Bathymetry, HYDROData_IAltitudeObject)
 
 
 /**\class HYDROData_Bathymetry
@@ -58,8 +57,7 @@ protected:
   };
 
 public:
-
-  DEFINE_STANDARD_RTTI(HYDROData_Bathymetry);
+  DEFINE_STANDARD_RTTIEXT(HYDROData_Bathymetry, HYDROData_IAltitudeObject);
 
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
@@ -70,7 +68,8 @@ public:
   /**
    * Dump Bathymetry object to Python script representation.
    */
-  HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+  HYDRODATA_EXPORT virtual QStringList DumpToPython( const QString& thePyScriptPath,
+                                                     MapOfTreatedObjects& theTreatedObjects ) const;
 
 public:      
   // Public methods to work with Bathymetry altitudes.
@@ -85,7 +84,11 @@ public:
    * Returns altitude points list.
    * \return points list
    */
-  HYDRODATA_EXPORT virtual AltitudePoints   GetAltitudePoints() const;
+  HYDRODATA_EXPORT virtual AltitudePoints   GetAltitudePoints(bool IsConvertToGlobal = false) const;
+  HYDRODATA_EXPORT virtual HYDROData_QuadtreeNode* GetQuadtreeNodes() const;
+
+  HYDRODATA_EXPORT virtual vtkPolyData* GetVtkDelaunay2D() const;
+  //HYDRODATA_EXPORT bool interpolZtriangle(const gp_XY& point, vtkIdList* triangle, double* z);
 
   /**
    * Remove all altitude points.
@@ -95,9 +98,10 @@ public:
   /**
    * Returns altitude for given point.
    * \param thePoint the point to examine
+   * \param theMethod interpolation model, default 0 = nearest point
    * \return altitude value
    */
-  HYDRODATA_EXPORT virtual double           GetAltitudeForPoint( const gp_XY& thePoint ) const;
+  HYDRODATA_EXPORT virtual double           GetAltitudeForPoint( const gp_XY& thePoint, int theMethod=0 ) const;
 
 public:
   // Public methods to work with files.
@@ -134,7 +138,7 @@ public:
    */
   HYDRODATA_EXPORT virtual bool             ImportFromFile( const TCollection_AsciiString& theFileName );
 
-  HYDRODATA_EXPORT Handle_HYDROData_PolylineXY CreateBoundaryPolyline() const;
+  HYDRODATA_EXPORT Handle(HYDROData_PolylineXY) CreateBoundaryPolyline() const;
 
   HYDRODATA_EXPORT virtual void UpdateLocalCS( double theDx, double theDy );
 
@@ -145,6 +149,8 @@ private:
    */
   bool                                      importFromXYZFile( QFile&          theFile,
                                                                AltitudePoints& thePoints ) const;
+  static std::map<int, HYDROData_QuadtreeNode*> myQuadtrees;
+  static std::map<int, vtkPolyData*> myDelaunay2D;
 
   bool                                      importFromASCFile( QFile&          theFile,
                                                                AltitudePoints& thePoints ) const;