return aCoeff;
}
-bool HYDROData_CalculationCase::GetStricklerCoefficientForPoints(const std::vector<gp_Pnt2d>& thePoints,
- std::vector<double>& theCoeffs, double DefValue, bool UseMax )
+std::vector<double> HYDROData_CalculationCase::GetStricklerCoefficientForPoints(const std::vector<gp_XY>& thePoints,
+ double DefValue, bool UseMax ) const
{
-
Handle( HYDROData_LandCoverMap ) aLCM = GetLandCoverMap();
Handle( HYDROData_StricklerTable ) aTable = GetStricklerTable();
+ std::vector<double> theCoeffs;
if( aLCM.IsNull() || aTable.IsNull() )
- return false;
+ return theCoeffs;
aLCM->ClassifyPoints(thePoints, aTable, theCoeffs, DefValue, UseMax );
- return true;
+ return theCoeffs;
}
Handle(HYDROData_Region) HYDROData_CalculationCase::GetRegionFromPoint( const gp_XY& thePoint ) const
*/
HYDRODATA_EXPORT double GetStricklerCoefficientForPoint( const gp_XY& thePoint ) const;
- HYDRODATA_EXPORT bool GetStricklerCoefficientForPoints(const std::vector<gp_Pnt2d>& thePoints,
- std::vector<double>& theCoeffs, double DefValue,
- bool UseMax );
+ HYDRODATA_EXPORT std::vector<double> GetStricklerCoefficientForPoints(const std::vector<gp_XY>& thePoints,
+ double DefValue,
+ bool UseMax ) const;
/**
* Returns altitudes for given points on given region.
}
-void HYDROData_LCM_FaceClassifier::Classify( const std::vector<gp_Pnt2d>& thePoints,
+void HYDROData_LCM_FaceClassifier::Classify( const std::vector<gp_XY>& thePoints,
std::vector<std::set <QString> >& theTypes,
std::vector<NCollection_Map<TopoDS_Face> >* theFaces) const
{
~HYDROData_LCM_FaceClassifier()
{};
- void Classify( const std::vector<gp_Pnt2d>& thePoints,
+ void Classify( const std::vector<gp_XY>& thePoints,
std::vector<std::set <QString> >& theTypes,
std::vector<NCollection_Map <TopoDS_Face> >* theFaces) const;
SetShape( aLocatedShape );
}
-void HYDROData_LandCoverMap::ClassifyPoints( const std::vector<gp_Pnt2d>& thePoints, std::vector<std::set <QString> >& theTypes ) const
+void HYDROData_LandCoverMap::ClassifyPoints( const std::vector<gp_XY>& thePoints, std::vector<std::set <QString> >& theTypes ) const
{
HYDROData_LCM_FaceClassifier FC(this);
FC.Classify(thePoints, theTypes, NULL);
}
-void HYDROData_LandCoverMap::ClassifyPoints( const std::vector<gp_Pnt2d>& thePoints,
+void HYDROData_LandCoverMap::ClassifyPoints( const std::vector<gp_XY>& thePoints,
Handle(HYDROData_StricklerTable) theTable,
std::vector<double>& theCoeffs, double DefValue, bool UseMax ) const
{
class TopTools_ListOfShape;
class Handle( HYDROData_PolylineXY );
class Handle( HYDROData_Object );
-class gp_Pnt2d;
+class gp_XY;
class HYDROData_LandCoverMap : public HYDROData_Entity
{
HYDRODATA_EXPORT virtual void UpdateLocalCS( double theDx, double theDy );
- HYDRODATA_EXPORT void ClassifyPoints( const std::vector<gp_Pnt2d>& thePoints, std::vector<std::set <QString> >& theTypes ) const;
+ HYDRODATA_EXPORT void ClassifyPoints( const std::vector<gp_XY>& thePoints, std::vector<std::set <QString> >& theTypes ) const;
- HYDRODATA_EXPORT void ClassifyPoints( const std::vector<gp_Pnt2d>& thePoints,
+ HYDRODATA_EXPORT void ClassifyPoints( const std::vector<gp_XY>& thePoints,
Handle(HYDROData_StricklerTable) theTable,
std::vector<double>& theCoeffs, double DefValue, bool UseMax ) const;
LCM->StoreLandCovers(aMapFace2ST);
- std::vector<gp_Pnt2d> pnts;
+ std::vector<gp_XY> pnts;
#ifdef NDEBUG
int N = 1000; //1000*1000 points; uniform distribution for release mode
#else
{
double px = x0 + (x1-x0)*((double)i/(double)N);
double py = y0 + (y1-y0)*((double)j/(double)N);
- pnts.push_back(gp_Pnt2d(px,py));
+ pnts.push_back(gp_XY(px,py));
}
}
OSD_Timer aTimer;
TopoDS_Shape Sh = LCM->GetShape();
- std::vector<gp_Pnt2d> pnts;
+ std::vector<gp_XY> pnts;
pnts.push_back(gp_XY(0,0));
pnts.push_back(gp_XY(468380, 6382300));