Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/OrientedBoundingBox.h @ 146:fb7d602e7025 wasm
OrientedBoundingBox::ComputeExtent
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 22 Jan 2018 17:30:34 +0100 |
parents | 2115530d3703 |
children | 0a73d76333db |
comparison
equal
deleted
inserted
replaced
145:6941b98cf0fd | 146:fb7d602e7025 |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "Extent2D.h" | |
24 #include "GeometryToolbox.h" | 25 #include "GeometryToolbox.h" |
25 #include "../Volumes/ImageBuffer3D.h" | 26 #include "../Volumes/ImageBuffer3D.h" |
26 | 27 |
27 namespace OrthancStone | 28 namespace OrthancStone |
28 { | 29 { |
37 double hv_; // half height | 38 double hv_; // half height |
38 double hw_; // half depth | 39 double hw_; // half depth |
39 | 40 |
40 public: | 41 public: |
41 OrientedBoundingBox(const ImageBuffer3D& image); | 42 OrientedBoundingBox(const ImageBuffer3D& image); |
43 | |
44 const Vector& GetCenter() const | |
45 { | |
46 return c_; | |
47 } | |
42 | 48 |
43 bool HasIntersectionWithPlane(std::vector<Vector>& points, | 49 bool HasIntersectionWithPlane(std::vector<Vector>& points, |
44 const Vector& normal, | 50 const Vector& normal, |
45 double d) const; | 51 double d) const; |
46 | 52 |
58 const Vector& source) const; | 64 const Vector& source) const; |
59 | 65 |
60 void ToInternalCoordinates(Vector& target, | 66 void ToInternalCoordinates(Vector& target, |
61 const Vector& source) const; | 67 const Vector& source) const; |
62 | 68 |
63 const Vector& GetCenter() const | 69 bool ComputeExtent(Extent2D& extent, |
64 { | 70 const CoordinateSystem3D& plane) const; |
65 return c_; | |
66 } | |
67 }; | 71 }; |
68 } | 72 } |
69 | 73 |