Mercurial > hg > orthanc-stone
changeset 166:4f661e2f7b6c wasm
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 22 Feb 2018 19:36:23 +0100 |
parents | 8d50e6be565d |
children | 0ee144f8f75a |
files | Framework/Toolbox/Extent2D.h Framework/Toolbox/LinearAlgebra.cpp Framework/Toolbox/LinearAlgebra.h |
diffstat | 3 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; + } }; }
--- 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 ||
--- 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);