X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_IAltitudeObject.sip;h=d1d4596e0f2f69c52bef4941938095f1416a1746;hb=474c2cd65280d793f1c81ca528bc92e1cff988e6;hp=66c176ae51e13e479d07d3122dce0a02243c19b2;hpb=623f27e44b58b10a571def46700b447f6bf350cd;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_IAltitudeObject.sip b/src/HYDROPy/HYDROData_IAltitudeObject.sip index 66c176ae..d1d4596e 100644 --- a/src/HYDROPy/HYDROData_IAltitudeObject.sip +++ b/src/HYDROPy/HYDROData_IAltitudeObject.sip @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// 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 @@ -6,7 +6,7 @@ // 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 +24,7 @@ #include %End -class HYDROData_IAltitudeObject : HYDROData_Entity /Abstract/ +class HYDROData_IAltitudeObject : public HYDROData_Entity /Abstract/ { %ConvertToSubClassCode @@ -38,6 +38,14 @@ class HYDROData_IAltitudeObject : HYDROData_Entity /Abstract/ 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; @@ -55,8 +63,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: /**