Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
164:432b1f812d14 | 165:8d50e6be565d |
---|---|
326 r(2,2) = 1; | 326 r(2,2) = 1; |
327 return r; | 327 return r; |
328 } | 328 } |
329 | 329 |
330 | 330 |
331 Matrix CreateTranslationMatrix(double dx, | |
332 double dy, | |
333 double dz) | |
334 { | |
335 Matrix m = LinearAlgebra::IdentityMatrix(4); | |
336 m(0,3) = dx; | |
337 m(1,3) = dy; | |
338 m(2,3) = dz; | |
339 return m; | |
340 } | |
341 | |
342 | |
343 Matrix CreateScalingMatrix(double sx, | |
344 double sy, | |
345 double sz) | |
346 { | |
347 Matrix m = LinearAlgebra::IdentityMatrix(4); | |
348 m(0,0) = sx; | |
349 m(1,1) = sy; | |
350 m(2,2) = sz; | |
351 return m; | |
352 } | |
353 | |
354 | |
331 bool IntersectPlaneAndSegment(Vector& p, | 355 bool IntersectPlaneAndSegment(Vector& p, |
332 const Vector& normal, | 356 const Vector& normal, |
333 double d, | 357 double d, |
334 const Vector& edgeFrom, | 358 const Vector& edgeFrom, |
335 const Vector& edgeTo) | 359 const Vector& edgeTo) |