Salome HOME
refs #636: the flags of update 2d/3d geometry
[modules/hydro.git] / src / HYDROPy / HYDROData_IAltitudeObject.sip
index f8129addc7b61b48e9319e7b2c4154dd0ab7384e..e1e2742cc80e7c055bd24d3e8a11f955f7eec35e 100644 (file)
@@ -1,12 +1,8 @@
-// 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
-//
+// 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
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -24,7 +20,7 @@
 #include <HYDROData_IAltitudeObject.h>
 %End
 
-class HYDROData_IAltitudeObject : HYDROData_Entity /Abstract/
+class HYDROData_IAltitudeObject : public HYDROData_Entity /Abstract/
 {
 
 %ConvertToSubClassCode
@@ -34,6 +30,18 @@ class HYDROData_IAltitudeObject : HYDROData_Entity /Abstract/
         sipClass = sipClass_HYDROData_Bathymetry;
         break;
 
+      case KIND_OBSTACLE_ALTITUDE:
+        sipClass = sipClass_HYDROData_ObstacleAltitude;
+        break;
+
+      case KIND_ALTITUDE:
+        sipClass = sipClass_HYDROData_AltitudeObject;
+        break;
+      
+      case KIND_STREAM_ALTITUDE:
+        sipClass = sipClass_HYDROData_StreamAltitude;
+        break;
+
       default:
         // We don't recognise the type.
         sipClass = NULL;
@@ -51,8 +59,28 @@ public:
    * Returns altitude points list.
    * \return points list
    */
-  static double             GetInvalidAltitude();
+  static double GetInvalidAltitude();
+
+  /**
+   * Returns altitude for given point.
+   * \param thePoint the point to examine
+   * \return altitude value
+   */
+  virtual double GetAltitudeForPoint( const double theCoordX,
+                                      const double theCoordX ) const = 0 [double ( const gp_XY& )];
+  %MethodCode
+    gp_XY aPnt( a0, a1 );
+  
+    Py_BEGIN_ALLOW_THREADS
+    sipRes = sipCpp->GetAltitudeForPoint( aPnt );
+    Py_END_ALLOW_THREADS
+  %End
+  %VirtualCatcherCode
+    PyObject *sipResObj = sipCallMethod(0, sipMethod, "dd",a0.X(),a0.Y());
 
+    sipParseResultEx(sipGILState, sipErrorHandler, sipPySelf, sipMethod, sipResObj, "d", &sipRes);
+  %End
+  
 protected:
 
   /**