You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
15 years ago
|
#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
|
||
|
|