HilbertSampleGenerator.h

Go to the documentation of this file.
00001 /**<!-------------------------------------------------------------------->
00002    @class  HilbertSampleGenerator
00003    @author Travis Fischer (fisch0920@gmail.com)
00004    @date   December 2006
00005    
00006    @brief
00007       Recursive space-filling L-System represented graphically
00008    
00009    @see http://en.wikipedia.org/wiki/Hilbert_curve
00010    <!-------------------------------------------------------------------->**/
00011 
00012 #ifndef HILBERT_SAMPLE_GENERATOR_H_
00013 #define HILBERT_SAMPLE_GENERATOR_H_
00014 
00015 #include <renderers/generators/SampleGenerator.h>
00016 #include <renderers/generators/LSystem.h>
00017 
00018 template <class SG>
00019 class HilbertSG : public SG, public LSystem {
00020    
00021    public:
00022       ///@name Main usage interface
00023       //@{-----------------------------------------------------------------
00024       
00025       inline HilbertSG()
00026          : LSystem("LR", "L")
00027       { }
00028       
00029       
00030       //@}-----------------------------------------------------------------
00031       ///@name Main usage interface
00032       //@{-----------------------------------------------------------------
00033       
00034       virtual void generate(PointSampleList &outSamples, 
00035                             const Viewport &viewport);
00036       
00037       
00038       //@}-----------------------------------------------------------------
00039       
00040    protected:
00041       virtual std::string _processRule(char c);
00042 };
00043 
00044 #endif // HILBERT_SAMPLE_GENERATOR_H_
00045 

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6