Salome HOME
refs #1330: basic implementation of the not zoomable polyline arrows
[modules/hydro.git] / src / HYDROData / HYDROData_Stream.h
index ee72a1645728e150a80c924dcb0ef7891b3d691f..902ad5a0c9d46f886dbc0a58411c4be3b3e0fd90 100644 (file)
 
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Edge.hxx>
+#include <TopoDS_Wire.hxx>
 
 #include <Geom_BSplineCurve.hxx>
+#include <vector>
 
+class HYDROData_DTM;
 class HYDROData_PolylineXY;
 class HYDROData_Polyline3D;
 class HYDROData_Profile;
@@ -45,10 +48,10 @@ public:
   {
     TopoDS_Shape myPrs3D;
     TopoDS_Shape myPrs2D;
-    TopoDS_Edge  myLeftBank;
-    TopoDS_Edge  myRightBank;
-    TopoDS_Edge  myInlet;
-    TopoDS_Edge  myOutlet;
+    TopoDS_Shape myLeftBank;   // 3d curve of the left bank
+    TopoDS_Shape myRightBank;  // 3d curve of the right bank
+    TopoDS_Shape myInlet;      // first (inlet) 2d profile 
+    TopoDS_Shape myOutlet;     // last (inlet) 2d profile 
   };
 
 protected:
@@ -72,18 +75,12 @@ public:
   /**
    * Creates the presentations(2D and 3D) by given hydraulic axis and profiles.
    */
-  HYDRODATA_EXPORT static bool CreatePresentations( const Handle(HYDROData_PolylineXY)& theHydAxis,
-                                                    const HYDROData_SequenceOfObjects&  theProfiles,
-                                                    PrsDefinition&                      thePrs );
+  HYDRODATA_EXPORT static bool CreatePresentations( const Handle(HYDROData_DTM)& theDTM,
+                                                    PrsDefinition&               thePrs );
 
-  /**
-   * Creates the presentations(2D and 3D) by given first points, last points and profiles.
-   * If 2D profiles is null - they will not used in the presentation.
-   */
-  HYDRODATA_EXPORT static bool CreatePresentations( const Handle(TColgp_HArray1OfPnt)     theArrayOfFPnt,
+  HYDRODATA_EXPORT static void CreatePresentations( const Handle(TColgp_HArray1OfPnt)     theArrayOfFPnt,
                                                     const Handle(TColgp_HArray1OfPnt)     theArrayOfLPnt,
                                                     const Handle(TopTools_HArray1OfShape) theArrOfProfiles,
-                                                    const Handle(TopTools_HArray1OfShape) theArrOf2DProfiles,
                                                     PrsDefinition&                        thePrs );
 
 public:
@@ -118,7 +115,7 @@ public:
   /**
    * Update the shape presentations of stream.
    */
-  HYDRODATA_EXPORT virtual void UpdatePrs();
+  HYDRODATA_EXPORT void UpdatePrs( const Handle(HYDROData_DTM)& );
 
   /**
    *
@@ -206,8 +203,7 @@ public:
   /**
   * Builds a planar face
   */
-  HYDRODATA_EXPORT static bool BuildFace( const Handle(HYDROData_PolylineXY)& theHydAxis,
-                                          TopoDS_Face&                        thePlane );
+  HYDRODATA_EXPORT static void BuildRefFace( TopoDS_Face& thePlane );
 
   /**
    * Add new one reference profile object for stream.
@@ -260,6 +256,13 @@ public:
    */
   HYDRODATA_EXPORT virtual bool Interpolate( HYDROData_IProfilesInterpolator* theInterpolator );
   
+
+  HYDRODATA_EXPORT double GetDDZ() const;
+  HYDRODATA_EXPORT void   SetDDZ( double theDDZ );
+  
+  HYDRODATA_EXPORT double GetSpatialStep() const;
+  HYDRODATA_EXPORT void   SetSpatialStep( double theSpatialStep );
+  
 protected:
 
   /**
@@ -298,9 +301,12 @@ private:
 
   void removeParameter( const int& theIndex );
 
-protected:
+  Handle(HYDROData_DTM) DTM() const;
 
+
+protected:
   friend class HYDROData_Iterator;
+  friend class test_HYDROData_Stream;
 
   /**
    * Creates new object in the internal data structure. Use higher level objects