volmetrics
view src/image.h @ 15:a93c8aa85e05
changed win title :p
author | Eleni Maria Stea <elene.mst@gmail.com> |
---|---|
date | Mon, 03 Feb 2014 01:30:47 +0200 |
parents | 88d390af583f |
children |
line source
1 #ifndef IMAGE_H_
2 #define IMAGE_H_
4 class Image {
5 private:
6 float *pixels;
7 int width;
8 int height;
10 public:
11 Image();
12 ~Image();
14 //copy constructor - assignment operator
15 Image(const Image &img);
16 Image &operator = (const Image &img);
18 //move constructor - move operator c++11 R-value reference to image
19 Image(Image &&img);
20 Image &operator = (Image &&img);
22 bool load(const char *fname);
24 float *get_pixels();
25 const float *get_pixels() const;
26 void set_pixels(const float *pixels, int width, int height);
28 int get_width() const;
29 int get_height() const;
30 };
32 #endif //IMAGE_H_