X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROCurveCreator%2FCurveCreator_Utils.h;h=28b6bb50c73756f0f0ff04b4f852d547b2ba6892;hb=1e9be94cc5ff4ad886099c507462d5b70f6d71f9;hp=52d34e6325b66990cd104e380c0c776a57bfb2a3;hpb=f5d741e54ea475315ee8f7ca822d1ecba030fc21;p=modules%2Fhydro.git diff --git a/src/HYDROCurveCreator/CurveCreator_Utils.h b/src/HYDROCurveCreator/CurveCreator_Utils.h index 52d34e63..28b6bb50 100644 --- a/src/HYDROCurveCreator/CurveCreator_Utils.h +++ b/src/HYDROCurveCreator/CurveCreator_Utils.h @@ -27,6 +27,8 @@ #include #include +#include + class CurveCreator_Utils { public: @@ -52,7 +54,14 @@ public: * \retval gp_Pnt Returns the point clicked in 3D view */ CURVECREATOR_EXPORT static gp_Pnt ConvertClickToPoint( int x, int y, - Handle(V3d_View) theView ); + Handle(V3d_View) theView ); + + /** + * Find selected points in the context + * \param theContext the viewer context + */ + CURVECREATOR_EXPORT static std::list getSelectedPoints( + Handle(AIS_InteractiveContext) theContext ); /*! * \brief Sets the local point context for the 3D viewer. @@ -62,6 +71,24 @@ public: Handle(AIS_InteractiveContext) theContext, const bool theOpen ); + /** + * Find the neighbour points by the clicked coordinates + * \param theContext the viewer context. + * \param theContext the V3D view. + * \param theX the X coordinate in the view. + * \param theY the Y coordinate in the view. + * \param thePoint the output point to be append to the model curve + * \param thePoint1 the output point to bound the line where a new point should be inserted + * \param thePoint2 the output point to bound the line where a new point should be inserted + */ + CURVECREATOR_EXPORT static bool getNeighbourPoints( + Handle(AIS_InteractiveContext) theContext, + Handle(V3d_View) theView, + const int theX, const int theY, + gp_Pnt& thePoint, gp_Pnt& thePoint1, + gp_Pnt& thePoint2 ); + +protected: /** * Checks whether the point belongs to the OCC object * \param theObject a line or shape with a bspline inside