From 215e3e9b9205992dd4e445229d2995387c4b98c8 Mon Sep 17 00:00:00 2001 From: Camille GOUTTEBROZE Date: Tue, 26 Aug 2014 14:03:04 +0200 Subject: [PATCH 1/3] Type explicitation --- src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx index 9ac38a334..a5a5e836a 100644 --- a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx +++ b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx @@ -859,11 +859,11 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects ) double u_v_det = (it->x - it_previous->x) * (it_next->y - it->y) - (it->y - it_previous->y) * (it_next->x - it->x); - double norme_u = sqrt ( (it->x - it_previous->x)*(it->x - it_previous->x) + - (it->y - it_previous->y)*(it->y - it_previous->y) ); + double norme_u = sqrt ( double(it->x - it_previous->x) * double(it->x - it_previous->x) + + double(it->y - it_previous->y) * double(it->y - it_previous->y) ); - double norme_v = sqrt ( (it->x - it_next->x)*(it->x - it_next->x) + - (it->y - it_next->y)*(it->y - it_next->y) ); + double norme_v = sqrt ( double(it->x - it_next->x) * double(it->x - it_next->x) + + double(it->y - it_next->y) * double(it->y - it_next->y) ); double u_v_sinus = u_v_det / (norme_u * norme_v); From 00fc3b27ef3994715aa4fe4cc54742eee80b9558 Mon Sep 17 00:00:00 2001 From: Camille GOUTTEBROZE Date: Tue, 26 Aug 2014 14:03:41 +0200 Subject: [PATCH 2/3] Removed obsolete enum --- src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx index a5a5e836a..1f7ff49d5 100644 --- a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx +++ b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx @@ -83,12 +83,6 @@ enum{ LINES }; -enum { - RADIO_BUTTONS, - MSG, - PUSH_BUTTON, -}; - enum { KERNEL_SIZE, FIND_CONTOURS_METHOD, From 45fc0b9952a056e04cd1b2daa394e1d8905e7a8a Mon Sep 17 00:00:00 2001 From: Camille GOUTTEBROZE Date: Tue, 26 Aug 2014 15:08:51 +0200 Subject: [PATCH 3/3] Export ShapeRec symbols --- .../ShapeRec_FeatureDetector.hxx | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/ShapeRecognition/ShapeRec_FeatureDetector.hxx b/src/ShapeRecognition/ShapeRec_FeatureDetector.hxx index b683c7c69..bb0a44ddb 100644 --- a/src/ShapeRecognition/ShapeRec_FeatureDetector.hxx +++ b/src/ShapeRecognition/ShapeRec_FeatureDetector.hxx @@ -32,7 +32,17 @@ // Qt #include -class ShapeRec_Parameters +#ifdef WIN32 + #if defined GEOM_SHAPEREC_EXPORTS || defined GEOMShapeRec_EXPORTS + #define GEOM_SHAPEREC_EXPORT __declspec( dllexport ) + #else + #define GEOM_SHAPEREC_EXPORT __declspec( dllimport ) + #endif +#else + #define GEOM_SHAPEREC_EXPORT +#endif + +class GEOM_SHAPEREC_EXPORT ShapeRec_Parameters { public: ShapeRec_Parameters(); @@ -42,7 +52,7 @@ public: int findContoursMethod; }; -class ShapeRec_CornersParameters : public ShapeRec_Parameters +class GEOM_SHAPEREC_EXPORT ShapeRec_CornersParameters : public ShapeRec_Parameters { public: ShapeRec_CornersParameters(); @@ -55,7 +65,7 @@ public: double epsilon; }; -class ShapeRec_CannyParameters : public ShapeRec_Parameters +class GEOM_SHAPEREC_EXPORT ShapeRec_CannyParameters : public ShapeRec_Parameters { public: ShapeRec_CannyParameters(); @@ -66,7 +76,7 @@ public: bool L2gradient; }; -class ShapeRec_ColorFilterParameters : public ShapeRec_Parameters +class GEOM_SHAPEREC_EXPORT ShapeRec_ColorFilterParameters : public ShapeRec_Parameters { public: ShapeRec_ColorFilterParameters(); @@ -79,7 +89,7 @@ public: double maxThreshold; }; -class ShapeRec_FeatureDetector +class GEOM_SHAPEREC_EXPORT ShapeRec_FeatureDetector { public: