Mercurial > hg > orthanc-stone
diff Framework/Toolbox/SliceGeometry.cpp @ 66:298f375dcb68 wasm
LayerWidget
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 17 May 2017 22:03:09 +0200 |
parents | 28956ed68280 |
children | f244018a4e4b |
line wrap: on
line diff
--- a/Framework/Toolbox/SliceGeometry.cpp Tue May 16 22:12:41 2017 +0200 +++ b/Framework/Toolbox/SliceGeometry.cpp Wed May 17 22:03:09 2017 +0200 @@ -152,4 +152,14 @@ offsetX = boost::numeric::ublas::inner_prod(axisX_, projection - origin_); offsetY = boost::numeric::ublas::inner_prod(axisY_, projection - origin_); } + + + bool SliceGeometry::IsSamePlane(const SliceGeometry& other, + double sliceThickness) const + { + return (GeometryToolbox::IsParallel(GetNormal(), other.GetNormal()) && + GeometryToolbox::IsNear(ProjectAlongNormal(other.GetOrigin()), + ProjectAlongNormal(GetOrigin()), + sliceThickness / 2.0)); + } }