%ExportedHeaderCode
#include <HYDROData_Bathymetry.h>
+#include <gp_XY.hxx>
#include <gp_XYZ.hxx>
%End
%End
-class HYDROData_Bathymetry : HYDROData_Object
+class HYDROData_Bathymetry : HYDROData_IAltitudeObject
{
%ConvertToSubClassCode
- if ( !Handle(HYDROData_Bathymetry)::DownCast( sipCpp ).IsNull() )
- sipClass = sipClass_HYDROData_Bathymetry;
- else
- sipClass = NULL;
+ switch ( sipCpp->GetKind() )
+ {
+ case KIND_BATHYMETRY:
+ sipClass = sipClass_HYDROData_Bathymetry;
+ break;
+
+ default:
+ // We don't recognise the type.
+ sipClass = NULL;
+ }
%End
%TypeHeaderCode
%End
-
-public:
-
- const ObjectKind GetKind() const;
-
-
public:
// Public methods to work with Bathymetry altitudes.
/**
- * Returns altitude points list.
- * \return points list
+ * Returns altitude for given point.
+ * \param thePoint the point to examine
+ * \return altitude value
*/
- static double GetInvalidAltitude();
+ double GetAltitudeForPoint( const QPointF& thePoint ) const [double (const gp_XY&)];
+ %MethodCode
+
+ // The C++ API gets the gp_XY object, we convert it from QPointF.
+ gp_XY aPoint( a0->x(), a0->y() );
+
+ Py_BEGIN_ALLOW_THREADS
+ sipRes = sipSelfWasArg ? sipCpp->HYDROData_Bathymetry::GetAltitudeForPoint( aPoint ) :
+ sipCpp->GetAltitudeForPoint( aPoint );
+ Py_END_ALLOW_THREADS
+ %End
+
+
/**
* Replace current altitude points by new one.
sipRes = convertToPythonAltitudeList( aPoints );
%End
+
/**
* Remove all altitude points.
*/
void RemoveAltitudePoints();
- /**
- * Returns altitude for given point.
- * \param thePoint the point to examine
- * \return altitude value
- */
- double GetAltitudeForPoint( const QPointF& thePoint ) const;
-
public:
// Public methods to work with files.