terrain working - no culling
[demo] / src / image.h
1 #ifndef IMAGE_H_
2 #define IMAGE_H_
3
4 #include <gmath/gmath.h>
5
6 class Image {
7 public:
8         int w;
9         int h;
10         int psz;
11
12         bool is_float;
13         void *pixels;
14
15         Image();
16         ~Image();
17
18         Image(const Image &image);
19         Image &operator =(const Image &image);
20
21         /*
22          move constructor: called when you assign
23          an rvalue reference
24         */
25         Image(Image &&image); // rvalue reference
26         Image &operator =(Image &&image);
27
28         bool load(const char *fname);
29
30         Vec4 lookup_nearest(float u, float v) const;
31         //TODO lookup_linear
32 };
33
34 #endif // IMAGE_H_