X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROCurveCreator%2FCurveCreator_Utils.cxx;h=ec27ddb04599b9e6b98e1d18155032b308876f3e;hb=e38481b5d965c3736d2c8eda39b1a30bd125147b;hp=30779616cf2d7830e0c04fa8af3256aa9d90f765;hpb=7e825ec456c9331ef0df1cb59865cc55f0d8516a;p=modules%2Fhydro.git diff --git a/src/HYDROCurveCreator/CurveCreator_Utils.cxx b/src/HYDROCurveCreator/CurveCreator_Utils.cxx index 30779616..ec27ddb0 100644 --- a/src/HYDROCurveCreator/CurveCreator_Utils.cxx +++ b/src/HYDROCurveCreator/CurveCreator_Utils.cxx @@ -19,10 +19,23 @@ #include "CurveCreator_Utils.h" +#include + #include #include #include +//======================================================================= +// function : ConvertClickToPoint() +// purpose : Returns the point clicked in 3D view +//======================================================================= +void CurveCreator_Utils::ConvertPointToClick( const gp_Pnt& thePoint, + Handle(V3d_View) theView, + int& x, int& y ) +{ + theView->Convert(thePoint.X(), thePoint.Y(), thePoint.Z(), x, y ); +} + //======================================================================= // function : ConvertClickToPoint() @@ -30,6 +43,8 @@ //======================================================================= gp_Pnt CurveCreator_Utils::ConvertClickToPoint( int x, int y, Handle(V3d_View) aView ) { + return GEOMUtils::ConvertClickToPoint( x, y, aView ); + /* V3d_Coordinate XEye, YEye, ZEye, XAt, YAt, ZAt; aView->Eye( XEye, YEye, ZEye ); @@ -48,4 +63,5 @@ gp_Pnt CurveCreator_Utils::ConvertClickToPoint( int x, int y, Handle(V3d_View) a gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project( PlaneOfTheView, ConvertedPoint ); gp_Pnt ResultPoint = ElSLib::Value( ConvertedPointOnPlane.X(), ConvertedPointOnPlane.Y(), PlaneOfTheView ); return ResultPoint; + */ }