/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2018 Danny Robson */ #include "iostream.hpp" #include "sphere.hpp" #include "plane.hpp" #include "frustum.hpp" #include "../coord/iostream.hpp" /////////////////////////////////////////////////////////////////////////////// template std::ostream& util::geom::operator<< (std::ostream &os, util::geom::sphere s) { return os << "sphere(" << s.centre << ',' << s.radius << ')'; } //----------------------------------------------------------------------------- template std::ostream& util::geom::operator<< (std::ostream&, util::geom::sphere<2,float>); template std::ostream& util::geom::operator<< (std::ostream&, util::geom::sphere<3,float>); /////////////////////////////////////////////////////////////////////////////// template std::ostream& util::geom::operator<< (std::ostream &os, plane val) { return os << val.coefficients; } //----------------------------------------------------------------------------- template std::ostream& util::geom::operator<< (std::ostream&, plane<2,float>); template std::ostream& util::geom::operator<< (std::ostream&, plane<3,float>); /////////////////////////////////////////////////////////////////////////////// template std::ostream& util::geom::operator<< (std::ostream &os, frustum val) { return os << "[ " << util::make_infix (val.planes) << " ]"; } //----------------------------------------------------------------------------- template std::ostream& util::geom::operator<< (std::ostream&, frustum);