11 #include "vtdata/HeightField.h"
13 #if !USE_LIBMINI_DATABUF
50 float LLWGS84_nwx,LLWGS84_nwy;
51 float LLWGS84_nex,LLWGS84_ney;
52 float LLWGS84_sex,LLWGS84_sey;
58 void set_extents(
float left,
float right,
float bottom,
float top);
59 void set_LLWGS84corners(
float sw_corner_x,
float sw_corner_y,
60 float se_corner_x,
float se_corner_y,
61 float nw_corner_x,
float nw_corner_y,
62 float ne_corner_x,
float ne_corner_y);
69 void alloc(
unsigned int xs,
unsigned int ys,
unsigned int zs,
unsigned int ts=1,
unsigned int ty=0);
78 void savedata(
const char *filename);
81 bool savedataJPEG(
const char *filename,
int quality);
87 static unsigned short int INTEL_CHECK;
91 #endif // !USE_LIBMINI_DATABUF
101 m_min = m_max = NULL;
103 LODMap(
int cols,
int rows)
112 bool exists() {
return m_min != NULL; }
113 void alloc(
int cols,
int rows)
117 m_min =
new int [cols*rows];
118 m_max =
new int [cols*rows];
119 for (
int i = 0; i < cols*rows; i++)
120 m_min[i] = m_max[i] = 0;
122 void set(
int c,
int r,
int minlevel,
int maxlevel)
124 m_min[c*m_rows+r] = minlevel;
125 m_max[c*m_rows+r] = maxlevel;
127 void get(
int c,
int r,
int &minlevel,
int &maxlevel)
129 minlevel = m_min[c*m_rows+r];
130 maxlevel = m_max[c*m_rows+r];
136 bool WriteTilesetHeader(
const char *filename,
int cols,
int rows,
int lod0size,
138 float minheight=INVALID_ELEVATION,
float maxheight=INVALID_ELEVATION,
139 LODMap *lodmap = NULL,
bool bJPEG =
false);