diff --git a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h index 42d2cd78182..20f4f5d25c0 100644 --- a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h +++ b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h @@ -89,6 +89,18 @@ private: } }; +template +void set_default_stream_precision(Inventor_ostream_base& os, const NP& np) +{ + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::stream_precision)); + os.os().precision(precision); + } +} + } // namespace CGAL #endif // CGAL_IO_INVENTOR_OSTREAM_H diff --git a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h index 1de37df3967..cb8ef7ecc47 100644 --- a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h +++ b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h @@ -104,6 +104,17 @@ inline VRML_2_ostream& operator<<(VRML_2_ostream& os, return os; } +template +void set_default_stream_precision(VRML_2_ostream& os, const NP& np) +{ + if(!parameters::is_default_parameter( + parameters::get_parameter(np, internal_np::stream_precision))) + { + const int precision = parameters::choose_parameter( + parameters::get_parameter(np, internal_np::stream_precision)); + os.os().precision(precision); + } +} } // namespace CGAL #endif // CGAL_IO_VRML_2_OSTREAM_H @@ -315,4 +326,5 @@ operator<<(VRML_2_ostream& os, } //namespace CGAL #endif // CGAL_IO_VRML_VRML_2_SEGMENT_3 + #endif // CGAL_SPHERE_3_H