diff OrthancStone/Sources/Toolbox/GeometryToolbox.h @ 2156:340bde744884

added DebugDrawing2D and GeometryToolbox::IntersectLineAndSegment()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 27 Sep 2024 22:14:36 +0200
parents 16c01cc201e7
children
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/GeometryToolbox.h	Fri Sep 27 15:59:17 2024 +0200
+++ b/OrthancStone/Sources/Toolbox/GeometryToolbox.h	Fri Sep 27 22:14:36 2024 +0200
@@ -117,6 +117,28 @@
     bool ComputeNormal(Vector& normal,
                        const Orthanc::DicomMap& dicom);
 
+    bool IntersectTwoLines(double& x,
+                           double& y,
+                           double ax1,
+                           double ay1,
+                           double ax2,
+                           double ay2,
+                           double bx1,
+                           double by1,
+                           double bx2,
+                           double by2);
+
+    bool IntersectLineAndSegment(double& x,
+                                 double& y,
+                                 double lineX1,
+                                 double lineY1,
+                                 double lineX2,
+                                 double lineY2,
+                                 double segmentX1,
+                                 double segmentY1,
+                                 double segmentX2,
+                                 double segmentY2);
+
     inline float ComputeBilinearInterpolationUnitSquare(float x,
                                                         float y,
                                                         float f00,    // source(0, 0)