Salome HOME
29.01.2014. Workaround eliminating.
[modules/hydro.git] / src / HYDROData / HYDROData_IInterpolator.cxx
1
2 #include "HYDROData_IInterpolator.h"
3
4 #include <gp_XY.hxx>
5
6 HYDROData_IInterpolator::HYDROData_IInterpolator()
7 {
8 }
9
10 HYDROData_IInterpolator::~HYDROData_IInterpolator()
11 {
12 }
13
14 void HYDROData_IInterpolator::SetAltitudeObject( 
15   const Handle(HYDROData_IAltitudeObject)& theAltitude )
16 {
17   myAltitudeObject = theAltitude;
18 }
19
20 Handle(HYDROData_IAltitudeObject) HYDROData_IInterpolator::GetAltitudeObject() const
21 {
22   return myAltitudeObject;
23 }
24
25 double HYDROData_IInterpolator::GetAltitudeForPoint( 
26   const double theCoordX, const double theCoordY ) const
27 {
28   return myAltitudeObject.IsNull() ? HYDROData_IAltitudeObject::GetInvalidAltitude() :
29          myAltitudeObject->GetAltitudeForPoint( gp_XY( theCoordX, theCoordY ) );
30 }
31
32 double HYDROData_IInterpolator::GetAltitudeForPoint( const gp_XY& thePoint ) const
33 {
34   return GetAltitudeForPoint( thePoint.X(), thePoint.Y() );
35 }