BidirectionalPathTracer.h
Go to the documentation of this file.00001 /**<!--------------------------------------------------------------------> 00002 @class BidirectionalPathTracer 00003 @author Travis Fischer (fisch0920@gmail.com) 00004 @author Matthew Jacobs (jacobs.mh@gmail.com) 00005 @date Fall 2008 00006 00007 @brief 00008 Unbiased bidirectional path tracer with support for efficient direct 00009 illumination 00010 <!-------------------------------------------------------------------->**/ 00011 00012 #ifndef BIDIRECTIONAL_PATH_TRACER_H_ 00013 #define BIDIRECTIONAL_PATH_TRACER_H_ 00014 00015 #include <renderers/PointSampleRenderer.h> 00016 #include <renderers/utils/IPathGenerator.h> 00017 00018 #include <filters/ProgressiveFilterValue.h> 00019 class HDRImage; 00020 00021 class BidirectionalPathTracer : public PointSampleRenderer, 00022 public IPathGenerator 00023 { 00024 public: 00025 ///@name Constructors 00026 //@{----------------------------------------------------------------- 00027 00028 inline BidirectionalPathTracer(RenderOutput *output = NULL, 00029 Camera *camera = NULL, 00030 Scene *scene = NULL) 00031 : PointSampleRenderer(output, camera, scene), m_images(NULL) 00032 { } 00033 00034 virtual ~BidirectionalPathTracer() 00035 { } 00036 00037 00038 //@}----------------------------------------------------------------- 00039 ///@name Main usage interface 00040 //@{----------------------------------------------------------------- 00041 00042 /** 00043 * @brief 00044 * Renders a single point sample (incident radiance evaluation) at 00045 * the point specified on the film plane 00046 */ 00047 virtual void sample(PointSample &outSample); 00048 00049 00050 //@}----------------------------------------------------------------- 00051 ///@name Path generation 00052 //@{----------------------------------------------------------------- 00053 00054 /** 00055 * @brief 00056 * Generates a complete, valid path from scratch 00057 * 00058 * @note path generated is assumed to start at an emitter (light) and 00059 * end at a sensor (camera) 00060 * @returns true on success or false on failure (if an invalid path 00061 * was encountered) 00062 */ 00063 virtual bool generate(Path &outPath); 00064 00065 /** 00066 * @brief 00067 * Generates a light subpath which is assumed to start at an emitter 00068 */ 00069 virtual void generateL(Path &outPath); 00070 00071 /** 00072 * @brief 00073 * Generates an eye subpath which is assumed to end at a sensor 00074 */ 00075 virtual void generateE(Path &outPath); 00076 virtual void generateE(Path &outPath, bool debug); 00077 00078 00079 //@}----------------------------------------------------------------- 00080 00081 virtual void finalize(); 00082 00083 protected: 00084 HDRImage **m_images; 00085 ProgressiveFilterValue<SpectralSampleSet> **m_filters; 00086 }; 00087 00088 #endif // BIDIRECTIONAL_PATH_TRACER_H_ 00089
Generated on 28 Feb 2009 for Milton by
1.5.6