#include <gp_XY.hxx>
-#include <QPointF>
-
#define INVALID_ALTITUDE_VALUE -9999.0
IMPLEMENT_STANDARD_HANDLE(HYDROData_IAltitudeObject, HYDROData_Entity)
return INVALID_ALTITUDE_VALUE;
}
-double HYDROData_IAltitudeObject::GetAltitudeForPoint( const QPointF& thePoint ) const
-{
- gp_XY aGpPoint( thePoint.x(), thePoint.y() );
- return GetAltitudeForPoint( aGpPoint );
-}
-
-
#include "HYDROData_Entity.h"
class gp_XY;
-class QPointF;
DEFINE_STANDARD_HANDLE(HYDROData_IAltitudeObject, HYDROData_Entity)
*/
HYDRODATA_EXPORT static double GetInvalidAltitude();
- /**
- * Returns altitude for given point.
- * \param thePoint the point to examine
- * \return altitude value
- */
- HYDRODATA_EXPORT virtual double GetAltitudeForPoint( const QPointF& thePoint ) const;
-
/**
* Returns altitude for given point.
* \param thePoint the point to examine
#include <HYDROData_Tool.h>
#include <HYDROData_Bathymetry.h>
+#include <gp_XY.hxx>
#include <gp_XYZ.hxx>
#include <QDir>
#include <QFile>
-#include <QPointF>
#include <QTextStream>
bool test_HYDROData_Bathymetry::createTestFile( const QString& theFileName )
HYDROData_Bathymetry::AltitudePoints anAltitudePoints = aBathymetry->GetAltitudePoints();
CPPUNIT_ASSERT( anAltitudePoints.length() != 16 );
- QPointF aTestPoint( 1, 1 );
+ gp_XY aTestPoint( 1, 1 );
double anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
CPPUNIT_ASSERT( !ValuesEquals( anAltitude, 10.0 ) );
- aTestPoint = QPointF( 0.5, 0.5 );
+ aTestPoint = gp_XY( 0.5, 0.5 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
CPPUNIT_ASSERT( !ValuesEquals( anAltitude, 5.0 ) );
- aTestPoint = QPointF( 1.5, 1 );
+ aTestPoint = gp_XY( 1.5, 1 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
CPPUNIT_ASSERT( !ValuesEquals( anAltitude, 10.0 ) );
- aTestPoint = QPointF( 1.5, 0.7 );
+ aTestPoint = gp_XY( 1.5, 0.7 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
CPPUNIT_ASSERT( !ValuesEquals( anAltitude, 7.0 ) );
- aTestPoint = QPointF( 1.5, -0.7 );
+ aTestPoint = gp_XY( 1.5, -0.7 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
CPPUNIT_ASSERT( !ValuesEquals( anAltitude, HYDROData_Bathymetry::GetInvalidAltitude() ) );
- aTestPoint = QPointF( 2, 3.5 );
+ aTestPoint = gp_XY( 2, 3.5 );
anAltitude = aBathymetry->GetAltitudeForPoint( aTestPoint );
CPPUNIT_ASSERT( !ValuesEquals( anAltitude, 35.0 ) );