]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Make DirectedBoundingBox available at runtime via InterpolationOptions
authoreap <eap@opencascade.com>
Fri, 8 Jun 2012 10:51:17 +0000 (10:51 +0000)
committereap <eap@opencascade.com>
Fri, 8 Jun 2012 10:51:17 +0000 (10:51 +0000)
+    bool _use_directed_bounding_box;

+    bool getUseDirectedBoundingBox() const { return _use_directed_bounding_box; }
+    void setUseDirectedBoundingBox(bool toUseDBB) { _use_directed_bounding_box = toUseDBB; }

src/INTERP_KERNEL/InterpolationOptions.cxx
src/INTERP_KERNEL/InterpolationOptions.hxx

index 2e2e7def7193764f69bdde32a9ff52399fafbe4b..13d2e831a8c21461f17789fec7eac186b9ac8c14 100644 (file)
@@ -34,6 +34,7 @@ const char INTERP_KERNEL::InterpolationOptions::MEDIANE_PLANE_STR[]="MedianPlane
 const char INTERP_KERNEL::InterpolationOptions::BOUNDING_BOX_ADJ_STR[]="BoundingBoxAdjustment";
 
 const char INTERP_KERNEL::InterpolationOptions::BOUNDING_BOX_ADJ_ABS_STR[]="BoundingBoxAdjustmentAbs";
+const char INTERP_KERNEL::InterpolationOptions::USE_DIRECTED_BOUNDING_BOX_STR[]="UseDirectedBoundingBox";
 
 const char INTERP_KERNEL::InterpolationOptions::MAX_DISTANCE_3DSURF_INSECT_STR[]="MaxDistance3DSurfIntersect";
 
@@ -133,6 +134,11 @@ bool INTERP_KERNEL::InterpolationOptions::setOptionInt(const std::string& key, i
         setMeasureAbsStatus(valBool);
         return true;
       }
+    else if(key==USE_DIRECTED_BOUNDING_BOX_STR)
+      {
+        setUseDirectedBoundingBox(value != 0);
+        return true;
+      }
     else
       return false;
 }
@@ -218,6 +224,7 @@ bool INTERP_KERNEL::InterpolationOptions::setInterpolationOptions(long print_lev
                                                                   bool do_rotate,
                                                                   double bounding_box_adjustment,
                                                                   double bounding_box_adjustment_abs,
+                                                                  bool use_directed_bounding_box,
                                                                   double max_distance_for_3Dsurf_intersect,
                                                                   long orientation,
                                                                   bool measure_abs,
@@ -230,6 +237,7 @@ bool INTERP_KERNEL::InterpolationOptions::setInterpolationOptions(long print_lev
   _do_rotate=do_rotate;
   _bounding_box_adjustment=bounding_box_adjustment;
   _bounding_box_adjustment_abs=bounding_box_adjustment_abs;
+  _use_directed_bounding_box = use_directed_bounding_box;
   _max_distance_for_3Dsurf_intersect=max_distance_for_3Dsurf_intersect;
   _orientation=orientation;
   _measure_abs=measure_abs;
@@ -247,6 +255,7 @@ std::string INTERP_KERNEL::InterpolationOptions::printOptions() const
   oss << "Do Rotate status : " << std::boolalpha << _do_rotate << std::endl;
   oss << "Bounding box adj : " << _bounding_box_adjustment << std::endl;
   oss << "Bounding box adj abs : " << _bounding_box_adjustment_abs << std::endl;
+  oss << "Use directed bounding box : " << _use_directed_bounding_box << std::endl;
   oss << "Max distance for 3DSurf intersect : " << _max_distance_for_3Dsurf_intersect << std::endl;
   oss << "Orientation : " << _orientation << std::endl;
   oss << "Measure abs : " << _measure_abs << std::endl;
index d9c51d70af1883a1716c823a516a920ef3211f38..69e44d2286d41f12fa87141011b37d4da329e858 100644 (file)
@@ -52,6 +52,7 @@ namespace INTERP_KERNEL
     double _bounding_box_adjustment ;
     //! this measure is absolute \b not relative to the cell size
     double _bounding_box_adjustment_abs ;
+    bool _use_directed_bounding_box;
     double _max_distance_for_3Dsurf_intersect;
     int _orientation ;
     bool _measure_abs;
@@ -81,6 +82,9 @@ namespace INTERP_KERNEL
 
     double getBoundingBoxAdjustmentAbs() const { return _bounding_box_adjustment_abs; }
     void setBoundingBoxAdjustmentAbs(double bba) { _bounding_box_adjustment_abs=bba; }
+
+    bool getUseDirectedBoundingBox() const { return _use_directed_bounding_box; }
+    void setUseDirectedBoundingBox(bool toUseDBB) { _use_directed_bounding_box = toUseDBB; }
     
     double getMaxDistance3DSurfIntersect() const { return _max_distance_for_3Dsurf_intersect; }
     void setMaxDistance3DSurfIntersect(double bba) { _max_distance_for_3Dsurf_intersect=bba; }
@@ -109,6 +113,7 @@ namespace INTERP_KERNEL
       _do_rotate=true;
       _bounding_box_adjustment=DFT_SURF3D_ADJ_EPS;
       _bounding_box_adjustment_abs=0.;
+      _use_directed_bounding_box=false;
       _max_distance_for_3Dsurf_intersect=DFT_MAX_DIST_3DSURF_INTERSECT;
       _orientation=0;
       _measure_abs=true;
@@ -122,6 +127,7 @@ namespace INTERP_KERNEL
                                  bool do_rotate,
                                  double bounding_box_adjustment,
                                  double bounding_box_adjustment_abs,
+                                 bool use_directed_bounding_box,
                                  double max_distance_for_3Dsurf_intersect,
                                  long orientation,
                                  bool measure_abs,
@@ -141,6 +147,7 @@ namespace INTERP_KERNEL
     static const char MEDIANE_PLANE_STR[];
     static const char BOUNDING_BOX_ADJ_STR[];
     static const char BOUNDING_BOX_ADJ_ABS_STR[];
+    static const char USE_DIRECTED_BOUNDING_BOX_STR[];
     static const char MAX_DISTANCE_3DSURF_INSECT_STR[];
     static const char PRINT_LEV_STR[];
     static const char DO_ROTATE_STR[];