76
|
1 |
class FloatPlane
|
|
2 |
{
|
|
3 |
unsigned int width;
|
|
4 |
unsigned int height;
|
|
5 |
|
|
6 |
int MAXVALUE;
|
|
7 |
int MINVALUE;
|
|
8 |
|
|
9 |
bool ready;
|
|
10 |
|
|
11 |
void setMaxMinValue(unsigned int max = 255, unsigned int min = 0);
|
|
12 |
|
|
13 |
public:
|
|
14 |
float *ptr;
|
|
15 |
|
|
16 |
FloatPlane();
|
|
17 |
FloatPlane(float *_ptr);
|
|
18 |
FloatPlane(const unsigned int _width, const unsigned int _height);
|
|
19 |
|
|
20 |
void allocate(const unsigned int _width, const unsigned int _height);
|
|
21 |
unsigned int getWidth();
|
|
22 |
float * getPtr();
|
|
23 |
unsigned int getHeight();
|
|
24 |
unsigned int getMaxValue();
|
|
25 |
void writePGM(const char * filename);
|
|
26 |
void free();
|
|
27 |
};
|