Mercurial > hg > orthanc-stone
diff Framework/Toolbox/GeometryToolbox.cpp @ 165:8d50e6be565d wasm
LinearAlgebra toolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 15 Feb 2018 13:51:29 +0100 |
parents | a053ca7fa5c6 |
children | 964118e7e6de |
line wrap: on
line diff
--- a/Framework/Toolbox/GeometryToolbox.cpp Wed Feb 14 16:49:43 2018 +0100 +++ b/Framework/Toolbox/GeometryToolbox.cpp Thu Feb 15 13:51:29 2018 +0100 @@ -328,6 +328,30 @@ } + Matrix CreateTranslationMatrix(double dx, + double dy, + double dz) + { + Matrix m = LinearAlgebra::IdentityMatrix(4); + m(0,3) = dx; + m(1,3) = dy; + m(2,3) = dz; + return m; + } + + + Matrix CreateScalingMatrix(double sx, + double sy, + double sz) + { + Matrix m = LinearAlgebra::IdentityMatrix(4); + m(0,0) = sx; + m(1,1) = sy; + m(2,2) = sz; + return m; + } + + bool IntersectPlaneAndSegment(Vector& p, const Vector& normal, double d,