/*============================================================================= Copyright (c) 2011-2013 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #ifndef SPROUT_DARKROOM_RENDERERS_CALCULATE_HPP #define SPROUT_DARKROOM_RENDERERS_CALCULATE_HPP #include #include #include namespace sprout { namespace darkroom { namespace renderers { // // default_depth // SPROUT_STATIC_CONSTEXPR std::size_t default_depth = 4; // // calculate_result // template struct calculate_result : public sprout::identity {}; template struct calculate_result : public sprout::darkroom::renderers::calculate_result {}; template struct calculate_result : public sprout::darkroom::renderers::calculate_result {}; template struct calculate_result : public sprout::darkroom::renderers::calculate_result {}; // // calculate // template inline SPROUT_CONSTEXPR typename sprout::darkroom::renderers::calculate_result::type calculate( Renderer const& renderer, Camera const& camera, Objects const& objs, Lights const& lights, Ray const& ray, std::size_t depth_max, Refractions const& refracs ) { return renderer.template operator()(camera, objs, lights, ray, depth_max, refracs); } template inline SPROUT_CONSTEXPR typename sprout::darkroom::renderers::calculate_result::type calculate( Renderer const& renderer, Camera const& camera, Objects const& objs, Lights const& lights, Ray const& ray, std::size_t depth_max ) { return renderer.template operator()(camera, objs, lights, ray, depth_max); } } // namespace renderers } // namespace darkroom } // namespace sprout #endif // #ifndef SPROUT_DARKROOM_RENDERERS_CALCULATE_HPP