FileRenderOutput.h

Go to the documentation of this file.
00001 /**<!-------------------------------------------------------------------->
00002    @class  FileRenderOutput
00003    @author Travis Fischer (fisch0920@gmail.com)
00004    @author Matthew Jacobs (jacobs.mh@gmail.com)
00005    @date   Fall 2008
00006    
00007    @brief
00008       Records point samples from a renderer and naively reconstructs the 
00009    underlying image by storing samples into the bin/pixel which they fall 
00010    into, overwriting previous samples, and not using any reconstruction 
00011    filter. Writes results out to the given file in a custom format upon 
00012    completion of rendering.
00013    <!-------------------------------------------------------------------->**/
00014 
00015 #ifndef FILE_RENDER_OUTPUT_H_
00016 #define FILE_RENDER_OUTPUT_H_
00017 
00018 #include <renderers/outputs/NaiveRenderOutput.h>
00019 
00020 class FileRenderOutput : public NaiveRenderOutput {
00021    
00022    public:
00023       ///@name Constructors
00024       //@{-----------------------------------------------------------------
00025       
00026       inline FileRenderOutput(Image *output, const std::string &fileName)
00027          : NaiveRenderOutput(output), m_fileName(fileName)
00028       { }
00029       
00030       virtual ~FileRenderOutput()
00031       { }
00032       
00033       
00034       //@}-----------------------------------------------------------------
00035       ///@name Initialization
00036       //@{-----------------------------------------------------------------
00037       
00038       virtual void finalize();
00039       
00040       
00041       //@}-----------------------------------------------------------------
00042       ///@name Accessors / Mutators
00043       //@{-----------------------------------------------------------------
00044       
00045       inline const std::string &getFileName() const {
00046          return m_fileName;
00047       }
00048       
00049       inline void setFileName(const std::string &fileName) {
00050          m_fileName = fileName;
00051       }
00052       
00053       
00054       //@}-----------------------------------------------------------------
00055       
00056    protected:
00057       virtual void _addSample(const PointSample &sample);
00058       
00059    protected:
00060       std::string m_fileName;
00061 };
00062 
00063 #endif // FILE_RENDER_OUTPUT_H_
00064 

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6