# HG changeset patch # User Sebastien Jodogne # Date 1519324583 -3600 # Node ID 4f661e2f7b6c68ecb6014c9f746e8caeb2376d19 # Parent 8d50e6be565d67b5ab1430c32e8dc1c5f5c947c0 cont diff -r 8d50e6be565d -r 4f661e2f7b6c Framework/Toolbox/Extent2D.h --- a/Framework/Toolbox/Extent2D.h Thu Feb 15 13:51:29 2018 +0100 +++ b/Framework/Toolbox/Extent2D.h Thu Feb 22 19:36:23 2018 +0100 @@ -81,5 +81,15 @@ { return y2_ - y1_; } + + double GetCenterX() const + { + return (x1_ + x2_) / 2.0; + } + + double GetCenterY() const + { + return (y1_ + y2_) / 2.0; + } }; } diff -r 8d50e6be565d -r 4f661e2f7b6c Framework/Toolbox/LinearAlgebra.cpp --- a/Framework/Toolbox/LinearAlgebra.cpp Thu Feb 15 13:51:29 2018 +0100 +++ b/Framework/Toolbox/LinearAlgebra.cpp Thu Feb 22 19:36:23 2018 +0100 @@ -667,7 +667,7 @@ } - Matrix InvertScaleTranslationMatrix(const Matrix& t) + Matrix InvertScalingTranslationMatrix(const Matrix& t) { if (t.size1() != 4 || t.size2() != 4 || diff -r 8d50e6be565d -r 4f661e2f7b6c Framework/Toolbox/LinearAlgebra.h --- a/Framework/Toolbox/LinearAlgebra.h Thu Feb 15 13:51:29 2018 +0100 +++ b/Framework/Toolbox/LinearAlgebra.h Thu Feb 22 19:36:23 2018 +0100 @@ -184,6 +184,15 @@ } + inline Vector Product(const Matrix& a, + const Matrix& b, + const Matrix& c, + const Vector& d) + { + return Product(Product(a, b, c), d); + } + + double ComputeDeterminant(const Matrix& a); bool IsOrthogonalMatrix(const Matrix& q, @@ -220,7 +229,7 @@ const Vector& a, const Vector& b); - Matrix InvertScaleTranslationMatrix(const Matrix& t); + Matrix InvertScalingTranslationMatrix(const Matrix& t); bool IsShearMatrix(const Matrix& shear);