Salome HOME
Porting on OCCT 7.4.0
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_SensitivePoint.cpp
index 753cff52ddb87012102ed44529acf4b593bfc0fe..ee6838a357470bbad2c9aca6f51ea16427764469 100644 (file)
 //
 
 #include "SketcherPrs_SensitivePoint.h"
+#include "SketcherPrs_SymbolPrs.h"
 
 #include <Graphic3d_ArrayOfPoints.hxx>
-#include "SketcherPrs_SymbolPrs.h"
+#include <Standard_Version.hxx>
 
 #define DEBUG_SENSITIVE_TO_BE_CORRECTED
 
@@ -36,18 +37,25 @@ SketcherPrs_SensitivePoint::SketcherPrs_SensitivePoint(
 Standard_Boolean SketcherPrs_SensitivePoint::Matches(SelectBasics_SelectingVolumeManager& theMgr,
                                                    SelectBasics_PickResult& thePickResult)
 {
-  Standard_Real aDepth      = RealLast();
-  Standard_Real aDistToCOG  = RealLast();
-  gp_Pnt aPnt = Point();
-  if (!theMgr.Overlaps (aPnt, aDepth))
-  {
-    thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
-    return Standard_False;
-  }
+#if OCC_VERSION_HEX < 0x070400
+       Standard_Real aDepth = RealLast();
+       Standard_Real aDistToCOG = RealLast();
+       gp_Pnt aPnt = Point();
+       if (!theMgr.Overlaps(aPnt, aDepth))
+       {
+               thePickResult = SelectBasics_PickResult(aDepth, aDistToCOG);
+               return Standard_False;
+       }
 
-  aDistToCOG = aDepth;
-  thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
-  return Standard_True;
+       aDistToCOG = aDepth;
+       thePickResult = SelectBasics_PickResult(aDepth, aDistToCOG);
+       return Standard_True;
+#else
+  gp_Pnt aPnt = Point();
+  if (theMgr.Overlaps (aPnt, thePickResult))
+       return Standard_True;
+  return Standard_False;
+#endif
 }
 
 gp_Pnt SketcherPrs_SensitivePoint::Point() const