Salome HOME
OCC functionality moving out from the widget
[modules/hydro.git] / src / HYDROCurveCreator / CurveCreator_Utils.h
index c9ca61547e4862497bd9964a9d4c205da07123d1..cc0817fac079fd3dedb8a27672254e9b97ede8d5 100644 (file)
 #include "CurveCreator_Macro.hxx"
 
 #include <AIS_InteractiveContext.hxx>
+#include <AIS_InteractiveObject.hxx> // TODO: remove
 #include <V3d_View.hxx>
 #include <gp_Pnt.hxx>
 #include <Geom_Curve.hxx>
+#include <TopoDS_Shape.hxx>
+
+#include <list>
+#include <vector> // TODO: remove
+
+class CurveCreator_ICurve;
 
 class CurveCreator_Utils
 {
@@ -52,7 +59,25 @@ 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 );
+
+  /**
+   * Generates shape on the curve
+   * \param theCurve a curve object, that contains data
+   * \param theISection a curve section index
+   * \param theShape a generated shape
+   */
+  CURVECREATOR_EXPORT static void constructShape( const CurveCreator_ICurve* theCurve,
+                                                  const int theISection,
+                                                  TopoDS_Shape& theShape,
+                                                  std::vector<Handle_AIS_InteractiveObject>& theAdditional );
+
+  /**
+   * Find selected points in the context
+   * \param theContext the viewer context
+   */
+  CURVECREATOR_EXPORT static std::list<float> getSelectedPoints(
+                                        Handle(AIS_InteractiveContext) theContext );
 
   /*!
    * \brief Sets the local point context for the 3D viewer.
@@ -78,6 +103,8 @@ public:
                                         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