Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/Slice.cpp @ 101:af312ce4fe59 wasm
support of 3D swapping of the normal
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 31 May 2017 10:35:20 +0200 |
parents | f244018a4e4b |
children | fcec0ab44054 |
comparison
equal
deleted
inserted
replaced
100:166a555becbf | 101:af312ce4fe59 |
---|---|
176 { | 176 { |
177 if (type_ == Type_Invalid) | 177 if (type_ == Type_Invalid) |
178 { | 178 { |
179 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 179 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
180 } | 180 } |
181 | 181 |
182 return (GeometryToolbox::IsParallel(GetGeometry().GetNormal(), plane.GetNormal()) && | 182 bool opposite; |
183 return (GeometryToolbox::IsParallelOrOpposite(opposite, | |
184 GetGeometry().GetNormal(), | |
185 plane.GetNormal()) && | |
183 GeometryToolbox::IsNear(GetGeometry().ProjectAlongNormal(GetGeometry().GetOrigin()), | 186 GeometryToolbox::IsNear(GetGeometry().ProjectAlongNormal(GetGeometry().GetOrigin()), |
184 GetGeometry().ProjectAlongNormal(plane.GetOrigin()), | 187 GetGeometry().ProjectAlongNormal(plane.GetOrigin()), |
185 thickness_ / 2.0)); | 188 thickness_ / 2.0)); |
186 } | 189 } |
187 } | 190 } |