|
|
|
#ifndef CANVAS_HPP
|
|
|
|
#define CANVAS_HPP
|
|
|
|
|
|
|
|
|
|
|
|
//#include "Vector.hpp"
|
|
|
|
#include "Attractor.hpp"
|
|
|
|
#include "Projector.hpp"
|
|
|
|
|
|
|
|
// TODO : Canvas class abstraheren (zodat er makkelijk verschillende soorten canvae gemaakt kunnen worden)
|
|
|
|
|
|
|
|
class Canvas{
|
|
|
|
friend class Projector;
|
|
|
|
|
|
|
|
unsigned int dim;
|
|
|
|
unsigned int width;
|
|
|
|
unsigned int height;
|
|
|
|
unsigned int num_colors;
|
|
|
|
|
|
|
|
unsigned int * size;
|
|
|
|
|
|
|
|
unsigned int * int_array;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
double v;
|
|
|
|
|
|
|
|
Canvas(unsigned int width, unsigned int height, unsigned int num_colors = 1);
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
|
|
|
|
void plot(double x, double y);
|
|
|
|
void plot(double x, double y, unsigned int c);
|
|
|
|
// TODO : make double array in canvas (ander soort canvas)
|
|
|
|
// TODO : subpixel sampling (anders soort canvas)
|
|
|
|
void plot(double x, double y, unsigned int c, double intensity);
|
|
|
|
|
|
|
|
void output();
|
|
|
|
//void output(Vector& point);
|
|
|
|
|
|
|
|
void output_file(const char * filename);
|
|
|
|
void output_file();
|
|
|
|
void output_raw(const char * filename);
|
|
|
|
void output_raw();
|
|
|
|
void input_raw(const char * filename);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CANVAS_HPP
|
|
|
|
|