diff options
Diffstat (limited to 'mapscalehandler.cpp')
-rw-r--r-- | mapscalehandler.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mapscalehandler.cpp b/mapscalehandler.cpp new file mode 100644 index 0000000..9e25c29 --- /dev/null +++ b/mapscalehandler.cpp @@ -0,0 +1,15 @@ +#include "mapscalehandler.h" + +MapScaleHandler::MapScaleHandler() + : m_sx(0.0f, 1.0f, 0.0f, 1.0f) + , m_sy(0.0f, 1.0f, 0.0f, 1.0f) +{ +} + +void MapScaleHandler::scaleToMap(const arma::mat &Y) +{ + m_sx.setDomain(Y.col(0).min(), Y.col(0).max()); + m_sy.setDomain(Y.col(1).min(), Y.col(1).max()); + + emit scaleChanged(m_sx, m_sy); +} |