}
}
- HYDROData_SequenceOfObjects aGroups = GetGeometryGroups();
+ HYDROData_SequenceOfObjects aGroups = GetSplittedGroups();
anIter.Init( aGroups );
for ( ; anIter.More(); anIter.Next() )
return GetAltitudeForPoint( thePoint, aZone );
}
+double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY& thePoint,
+ const Handle(HYDROData_Region)& theRegion ) const
+{
+ double aResAltitude = HYDROData_IAltitudeObject::GetInvalidAltitude();
+
+ Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint );
+ if ( !aZone.IsNull() )
+ {
+ Handle(HYDROData_Region) aRefRegion = Handle(HYDROData_Region)::DownCast( aZone->GetFatherObject() );
+ if ( IsEqual( aRefRegion, theRegion ) )
+ aResAltitude = GetAltitudeForPoint( thePoint, aZone );
+ }
+
+ return aResAltitude;
+}
+
double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY& thePoint,
const Handle(HYDROData_Zone)& theZone ) const
{
return aResAltitude;
}
+NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints(
+ const NCollection_Sequence<gp_XY>& thePoints,
+ const Handle(HYDROData_Region)& theRegion ) const
+{
+ NCollection_Sequence<double> aResSeq;
+
+ for ( int i = 1, n = thePoints.Length(); i <= n; ++i )
+ {
+ const gp_XY& thePnt = thePoints.Value( i );
+
+ double anAltitude = GetAltitudeForPoint( thePnt, theRegion );
+ aResSeq.Append( anAltitude );
+ }
+
+ return aResSeq;
+}
+
NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints(
const NCollection_Sequence<gp_XY>& thePoints,
const Handle(HYDROData_Zone)& theZone ) const
return aResSeq;
}
+Handle(HYDROData_Region) HYDROData_CalculationCase::GetRegionFromPoint( const gp_XY& thePoint ) const
+{
+ Handle(HYDROData_Region) aResRegion;
+
+ Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint );
+ if ( !aZone.IsNull() )
+ aResRegion = Handle(HYDROData_Region)::DownCast( aZone->GetFatherObject() );
+
+ return aResRegion;
+}
+
Handle(HYDROData_Zone) HYDROData_CalculationCase::GetZoneFromPoint( const gp_XY& thePoint ) const
{
Handle(HYDROData_Zone) aResZone;