diff OrthancStone/Sources/Toolbox/CoordinateSystem3D.h @ 1648:4a43106bc122

cross-hair starts to work
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 12 Nov 2020 19:27:08 +0100
parents 78509230f0d7
children af312e145980
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/CoordinateSystem3D.h	Thu Nov 12 16:57:15 2020 +0100
+++ b/OrthancStone/Sources/Toolbox/CoordinateSystem3D.h	Thu Nov 12 19:27:08 2020 +0100
@@ -135,6 +135,9 @@
                        const Vector& origin,
                        const Vector& direction) const;
 
+    // Point-to-plane distance
+    double ComputeDistance(const Vector& p) const;
+
     // Returns "false" is the two planes are not parallel
     static bool ComputeDistance(double& distance,
                                 const CoordinateSystem3D& a,
@@ -143,5 +146,14 @@
     // Normalize a cutting plane so that the origin (0,0,0) of the 3D
     // world is mapped to the origin of its (x,y) coordinate system
     static CoordinateSystem3D NormalizeCuttingPlane(const CoordinateSystem3D& plane);
+
+    // Construct one possible coordinate system from the general form
+    // of the equation of a plane "a*x+b*y+c*z+d=0". Note that the
+    // axes are not determined in this case, and so they are chosen
+    // arbitrarily.
+    static CoordinateSystem3D CreateFromPlaneGeneralForm(double a,
+                                                         double b,
+                                                         double c,
+                                                         double d);
   };
 }