From e0da09bfb6b059c2671fe4c052f8e6d7ae426050 Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 10 Dec 2015 07:41:37 +0300 Subject: [PATCH] refs #768: local CS change for land covers --- src/HYDROData/HYDROData_LandCoverMap.cxx | 8 ++++++++ src/HYDROData/HYDROData_LandCoverMap.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/HYDROData/HYDROData_LandCoverMap.cxx b/src/HYDROData/HYDROData_LandCoverMap.cxx index 8f257c79..1226dbc5 100644 --- a/src/HYDROData/HYDROData_LandCoverMap.cxx +++ b/src/HYDROData/HYDROData_LandCoverMap.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -1195,3 +1196,10 @@ bool HYDROData_LandCoverMap::CheckLinear() } return true; } + +void HYDROData_LandCoverMap::UpdateLocalCS( double theDx, double theDy ) +{ + TopoDS_Shape aShape = GetShape(); + TopoDS_Shape aLocatedShape = HYDROData_ShapesTool::Translated( aShape, theDx, theDy, 0 ); + SetShape( aLocatedShape ); +} diff --git a/src/HYDROData/HYDROData_LandCoverMap.h b/src/HYDROData/HYDROData_LandCoverMap.h index cf2fe76f..6827d52a 100644 --- a/src/HYDROData/HYDROData_LandCoverMap.h +++ b/src/HYDROData/HYDROData_LandCoverMap.h @@ -146,6 +146,8 @@ public: HYDRODATA_EXPORT bool CheckLinear(); + HYDRODATA_EXPORT virtual void UpdateLocalCS( double theDx, double theDy ); + protected: void SetShape( const TopoDS_Shape& ); -- 2.39.2