From: eap Date: Fri, 8 Jun 2012 10:51:17 +0000 (+0000) Subject: Make DirectedBoundingBox available at runtime via InterpolationOptions X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1c8754878d4125c2a6ba9bcfbcf7e348400d14e6;p=tools%2Fmedcoupling.git Make DirectedBoundingBox available at runtime via InterpolationOptions + bool _use_directed_bounding_box; + bool getUseDirectedBoundingBox() const { return _use_directed_bounding_box; } + void setUseDirectedBoundingBox(bool toUseDBB) { _use_directed_bounding_box = toUseDBB; } --- diff --git a/src/INTERP_KERNEL/InterpolationOptions.cxx b/src/INTERP_KERNEL/InterpolationOptions.cxx index 2e2e7def7..13d2e831a 100644 --- a/src/INTERP_KERNEL/InterpolationOptions.cxx +++ b/src/INTERP_KERNEL/InterpolationOptions.cxx @@ -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; diff --git a/src/INTERP_KERNEL/InterpolationOptions.hxx b/src/INTERP_KERNEL/InterpolationOptions.hxx index d9c51d70a..69e44d228 100644 --- a/src/INTERP_KERNEL/InterpolationOptions.hxx +++ b/src/INTERP_KERNEL/InterpolationOptions.hxx @@ -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[];