diff --git a/GraphicsView/include/CGAL/Qt/quaternion.h b/GraphicsView/include/CGAL/Qt/quaternion.h index 279ffbb39d5..7a6db9af3a1 100644 --- a/GraphicsView/include/CGAL/Qt/quaternion.h +++ b/GraphicsView/include/CGAL/Qt/quaternion.h @@ -333,8 +333,8 @@ private: qreal q[4]; }; +std::ostream &operator<<(std::ostream &o, const Quaternion &); + }} // namespace CGAL::qglviewer -std::ostream &operator<<(std::ostream &o, const CGAL::qglviewer::Quaternion &); - #endif // QGLVIEWER_QUATERNION_H diff --git a/GraphicsView/include/CGAL/Qt/quaternion_impl.h b/GraphicsView/include/CGAL/Qt/quaternion_impl.h index 616ef35137f..e92eed00c3f 100644 --- a/GraphicsView/include/CGAL/Qt/quaternion_impl.h +++ b/GraphicsView/include/CGAL/Qt/quaternion_impl.h @@ -551,10 +551,10 @@ Quaternion Quaternion::randomQuaternion() { qreal t2 = 2.0 * CGAL_PI * (rand() / (qreal)RAND_MAX); return Quaternion(sin(t1) * r1, cos(t1) * r1, sin(t2) * r2, cos(t2) * r2); } - -}} // namespace CGAL::qglviewer CGAL_INLINE_FUNCTION -std::ostream &operator<<(std::ostream &o, const CGAL::qglviewer::Quaternion &Q) { +std::ostream &operator<<(std::ostream &o, const Quaternion &Q) { return o << Q[0] << '\t' << Q[1] << '\t' << Q[2] << '\t' << Q[3]; } + +}} // namespace CGAL::qglviewer diff --git a/GraphicsView/include/CGAL/Qt/vec.h b/GraphicsView/include/CGAL/Qt/vec.h index 0a6e2e2e95b..fcc9829dba3 100644 --- a/GraphicsView/include/CGAL/Qt/vec.h +++ b/GraphicsView/include/CGAL/Qt/vec.h @@ -361,8 +361,8 @@ cout << "Position=" << pos << endl; #endif }; +std::ostream &operator<<(std::ostream &o, const Vec &); + }} // namespace CGAL::qglviewer -std::ostream &operator<<(std::ostream &o, const CGAL::qglviewer::Vec &); - #endif // QGLVIEWER_VEC_H diff --git a/GraphicsView/include/CGAL/Qt/vec_impl.h b/GraphicsView/include/CGAL/Qt/vec_impl.h index b7b317f3031..865ef09d85d 100644 --- a/GraphicsView/include/CGAL/Qt/vec_impl.h +++ b/GraphicsView/include/CGAL/Qt/vec_impl.h @@ -174,9 +174,9 @@ void Vec::initFromDOMElement(const QDomElement &element) { *this = v; } -}} // namespace CGAL::qglviewer - CGAL_INLINE_FUNCTION -std::ostream &operator<<(std::ostream &o, const CGAL::qglviewer::Vec &v) { +std::ostream &operator<<(std::ostream &o, const Vec &v) { return o << v.x << '\t' << v.y << '\t' << v.z; -} +} + +}} // namespace CGAL::qglviewer