1 #pragma once
2 
3 #ifndef Y_BACKGROUND_H
4 #define Y_BACKGROUND_H
5 
6 #include <yafray_constants.h>
7 
8 __BEGIN_YAFRAY
9 
10 struct renderState_t;
11 class light_t;
12 class color_t;
13 class ray_t;
14 
15 class YAFRAYCORE_EXPORT background_t
16 {
17 	public:
18 		//! get the background color for a given ray
19 		virtual color_t operator() (const ray_t &ray, renderState_t &state, bool from_postprocessed=false) const=0;
20 		virtual color_t eval(const ray_t &ray, bool from_postprocessed=false) const=0;
21 		/*! get the light source representing background lighting.
22 			\return the light source that reproduces background lighting, or nullptr if background
23 					shall only be sampled from BSDFs
24 		*/
hasIBL()25 		virtual bool hasIBL() { return false; }
shootsCaustic()26 		virtual bool shootsCaustic() { return false; }
~background_t()27 		virtual ~background_t() {};
28 };
29 
30 __END_YAFRAY
31 
32 #endif // Y_BACKGROUND_H
33