volmetrics

annotate src/image.h @ 13:77a376198d38

foo
author Eleni Maria Stea <elene.mst@gmail.com>
date Sun, 02 Feb 2014 02:32:00 +0200
parents 88d390af583f
children
rev   line source
eleni@0 1 #ifndef IMAGE_H_
eleni@0 2 #define IMAGE_H_
eleni@0 3
eleni@0 4 class Image {
eleni@0 5 private:
eleni@0 6 float *pixels;
eleni@0 7 int width;
eleni@0 8 int height;
elene@4 9
eleni@0 10 public:
eleni@0 11 Image();
eleni@0 12 ~Image();
eleni@0 13
elene@4 14 //copy constructor - assignment operator
elene@4 15 Image(const Image &img);
elene@4 16 Image &operator = (const Image &img);
elene@4 17
elene@4 18 //move constructor - move operator c++11 R-value reference to image
elene@4 19 Image(Image &&img);
elene@4 20 Image &operator = (Image &&img);
elene@4 21
eleni@0 22 bool load(const char *fname);
eleni@0 23
eleni@0 24 float *get_pixels();
eleni@0 25 const float *get_pixels() const;
eleni@0 26 void set_pixels(const float *pixels, int width, int height);
eleni@0 27
eleni@0 28 int get_width() const;
eleni@0 29 int get_height() const;
eleni@0 30 };
eleni@0 31
eleni@0 32 #endif //IMAGE_H_