Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef __SAMPLER__
- #define __SAMPLER__
- #include <vector>
- #include "Point2D.h"
- #include "Point3D.h"
- class Sampler {
- protected:
- int num_samples;
- int num_sets;
- std::vector<Point2D> samples;
- std::vector<int> shuffled_indices;
- std::vector<Point2D> disk_samples;
- std::vector<Point3D> hemisphere_samples;
- unsigned long count;
- int jump;
- public:
- Sampler(void);
- Sampler(int ns);
- Sampler(const Sampler& s);
- virtual ~Sampler(void);
- virtual void generate_samples(void) = 0;
- void setup_shuffled_indices(void);
- void shuffle_samples(void);
- Point2D sample_unit_square(void);
- int get_num_samples(void);
- void map_samples_to_unit_disk(void);
- void map_samples_to_hemisphere(const float e);
- };
- #endif
- #ifndef __JITTERED__
- #define __JITTERED__
- #include "Sampler.h"
- class Jittered : public Sampler {
- public:
- Jittered(void);
- Jittered(int ns);
- virtual ~Jittered(void);
- virtual void generate_samples(void);
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment