From 378ceebf8468ac742c9eb9860415f67dfdd07da0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 1 Jun 2009 11:07:07 +0000 Subject: [PATCH] From Emmanuel Roche, "I'm joining an updated version of the file daeWritter.cpp and daeWriter.h for the collada plugin compatible with the usage of double precision BoundingSphere & BoundingBox. The only change is the addition of the template specialization for osg::Vec3d object (until now only the specialization for osg::Vec3 was defined, I replaced that with osg::Vec3f to be more "precise")." --- src/osgPlugins/dae/daeWriter.cpp | 9 ++++++++- src/osgPlugins/dae/daeWriter.h | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/osgPlugins/dae/daeWriter.cpp b/src/osgPlugins/dae/daeWriter.cpp index 0aa382d9c..d45d07d89 100644 --- a/src/osgPlugins/dae/daeWriter.cpp +++ b/src/osgPlugins/dae/daeWriter.cpp @@ -23,7 +23,14 @@ namespace osgdae { -std::string toString(osg::Vec3 value) +std::string toString(osg::Vec3f value) +{ + std::stringstream str; + str << value.x() << " " << value.y() << " " << value.z(); + return str.str(); +} + +std::string toString(osg::Vec3d value) { std::stringstream str; str << value.x() << " " << value.y() << " " << value.z(); diff --git a/src/osgPlugins/dae/daeWriter.h b/src/osgPlugins/dae/daeWriter.h index fbea05f9c..aed2d2ff2 100644 --- a/src/osgPlugins/dae/daeWriter.h +++ b/src/osgPlugins/dae/daeWriter.h @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -72,7 +71,8 @@ std::string toString(T value) { return str.str(); } -std::string toString(osg::Vec3 value); +std::string toString(osg::Vec3f value); +std::string toString(osg::Vec3d value); std::string toString(osg::Matrix value); /**