only set precision for writers that write ascii
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@749 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -100,8 +100,6 @@ write(const std::string& _filename, BaseExporter& _be, Options _opt, std::stream
|
||||
return false;
|
||||
}
|
||||
|
||||
out.precision(_precision);
|
||||
|
||||
// write header line
|
||||
if (_opt.check(Options::VertexTexCoord)) out << "ST";
|
||||
if (_opt.check(Options::VertexColor) || _opt.check(Options::FaceColor)) out << "C";
|
||||
@@ -111,6 +109,9 @@ write(const std::string& _filename, BaseExporter& _be, Options _opt, std::stream
|
||||
out << "\n";
|
||||
|
||||
|
||||
if (!_opt.check(Options::Binary))
|
||||
out.precision(_precision);
|
||||
|
||||
// write to file
|
||||
bool result = (_opt.check(Options::Binary) ?
|
||||
write_binary(out, _be, _opt) :
|
||||
@@ -146,8 +147,6 @@ write(std::ostream& _os, BaseExporter& _be, Options _opt, std::streamsize _preci
|
||||
return false;
|
||||
}
|
||||
|
||||
_os.precision(_precision);
|
||||
|
||||
// write header line
|
||||
if (_opt.check(Options::VertexTexCoord)) _os << "ST";
|
||||
if (_opt.check(Options::VertexColor) || _opt.check(Options::FaceColor)) _os << "C";
|
||||
@@ -156,6 +155,8 @@ write(std::ostream& _os, BaseExporter& _be, Options _opt, std::streamsize _preci
|
||||
if (_opt.check(Options::Binary)) _os << " BINARY";
|
||||
_os << "\n";
|
||||
|
||||
if (!_opt.check(Options::Binary))
|
||||
_os.precision(_precision);
|
||||
|
||||
// write to file
|
||||
bool result = (_opt.check(Options::Binary) ?
|
||||
|
||||
Reference in New Issue
Block a user