diff 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
line wrap: on
line diff
--- a/Framework/Toolbox/OrientedBoundingBox.h	Mon Jan 22 16:44:52 2018 +0100
+++ b/Framework/Toolbox/OrientedBoundingBox.h	Mon Jan 22 17:30:34 2018 +0100
@@ -21,6 +21,7 @@
 
 #pragma once
 
+#include "Extent2D.h"
 #include "GeometryToolbox.h"
 #include "../Volumes/ImageBuffer3D.h"
 
@@ -40,6 +41,11 @@
   public:
     OrientedBoundingBox(const ImageBuffer3D& image);
 
+    const Vector& GetCenter() const
+    {
+      return c_;
+    }
+
     bool HasIntersectionWithPlane(std::vector<Vector>& points,
                                   const Vector& normal,
                                   double d) const;
@@ -60,10 +66,8 @@
     void ToInternalCoordinates(Vector& target,
                                const Vector& source) const;
 
-    const Vector& GetCenter() const
-    {
-      return c_;
-    }
+    bool ComputeExtent(Extent2D& extent,
+                       const CoordinateSystem3D& plane) const;
   };
 }