[terrafit] performance increased 2%
This commit is contained in:
parent
93440e4acd
commit
6a00e62e08
2 changed files with 16 additions and 8 deletions
|
@ -24,7 +24,7 @@ void TrackedTriangle::update(Subdivision& s)
|
|||
GreedySubdivision::GreedySubdivision(Map *map)
|
||||
{
|
||||
H = map;
|
||||
heap = new Heap(16384);
|
||||
heap = new Heap(131072);
|
||||
|
||||
int w = H->width;
|
||||
int h = H->height;
|
||||
|
|
|
@ -77,8 +77,10 @@ public:
|
|||
explicit ArrayMap(TGArray& array)
|
||||
: array(array)
|
||||
{
|
||||
depth = 32;
|
||||
width = array.get_cols();
|
||||
height = array.get_rows();
|
||||
|
||||
min = 30000;
|
||||
max = -30000;
|
||||
for (int i = 0; i < width; i++) {
|
||||
|
@ -90,7 +92,6 @@ public:
|
|||
max = v;
|
||||
}
|
||||
}
|
||||
depth = 32;
|
||||
}
|
||||
|
||||
virtual ~ArrayMap() {}
|
||||
|
@ -190,14 +191,21 @@ void fit_file(const SGPath& path)
|
|||
|
||||
gzprintf(fp, "%d\n", mesh.pointCount());
|
||||
|
||||
for (int x = 0; x < DEM.width; x++) {
|
||||
for (int y = 0; y < DEM.height; y++) {
|
||||
double origin_x = inarray.get_originx();
|
||||
double origin_y = inarray.get_originy();
|
||||
double col_step = inarray.get_col_step();
|
||||
double row_step = inarray.get_row_step();
|
||||
|
||||
for (int x = 0; x < DEM.width; ++x) {
|
||||
double vx = (origin_x + x * col_step) / 3600.0;
|
||||
|
||||
for (int y = 0; y < DEM.height; ++y) {
|
||||
if (mesh.is_used(x, y) != DATA_POINT_USED)
|
||||
continue;
|
||||
double vx, vy, vz;
|
||||
vx = (inarray.get_originx() + x * inarray.get_col_step()) / 3600.0;
|
||||
vy = (inarray.get_originy() + y * inarray.get_row_step()) / 3600.0;
|
||||
vz = DEM.eval(x, y);
|
||||
|
||||
double vy = (origin_y + y * row_step) / 3600.0;
|
||||
double vz = DEM.eval(x, y);
|
||||
|
||||
gzprintf(fp, "%+03.8f %+02.8f %0.2f\n", vx, vy, vz);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue