volmetrics

annotate src/image.h @ 0:88d390af583f

Image loader
author Eleni Maria Stea <eleni@mutantstargoat.com>
date Sat, 11 Jan 2014 17:22:36 +0200
parents
children 1fbbe10c8e08
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;
eleni@0 9 public:
eleni@0 10 Image();
eleni@0 11 ~Image();
eleni@0 12
eleni@0 13 bool load(const char *fname);
eleni@0 14
eleni@0 15 float *get_pixels();
eleni@0 16 const float *get_pixels() const;
eleni@0 17 void set_pixels(const float *pixels, int width, int height);
eleni@0 18
eleni@0 19 int get_width() const;
eleni@0 20 int get_height() const;
eleni@0 21 };
eleni@0 22
eleni@0 23 #endif //IMAGE_H_