| 140 | U32* grid; |
| 141 | |
| 142 | LASfinalizer(const LASheader* header, const I32 division) |
| 143 | { |
| 144 | xmin = header->min_x; |
| 145 | xmax = header->max_x; |
| 146 | ymin = header->min_y; |
| 147 | ymax = header->max_y; |
| 148 | zmin = header->min_z; |
| 149 | zmax = header->max_z; |
| 150 | |
| 151 | F64 size = MAX3(xmax - xmin, ymax - ymin, zmax - zmin); |
| 152 | F64 grid_spacing = size / division; |
| 153 | |
| 154 | ncols = I32_CEIL((xmax - xmin) / grid_spacing); |
| 155 | nrows = I32_CEIL((ymax - ymin) / grid_spacing); |
| 156 | nlays = I32_CEIL((zmax - zmin) / grid_spacing); |
| 157 | |
| 158 | xres = (xmax - xmin) / ncols; |
| 159 | yres = (ymax - ymin) / nrows; |
| 160 | zres = (zmax - zmin) / nlays; |
| 161 | |
| 162 | npoints = 0; |
| 163 | finalized = false; |
| 164 | I64 total_elements = (I64)ncols * (I64)nrows * (I64)nlays; |
| 165 | grid = new U32[total_elements](); |
| 166 | memset((void*)grid, 0, total_elements * sizeof(U32)); |
| 167 | }; |
| 168 | |
| 169 | ~LASfinalizer() { delete[] grid; }; |
| 170 |
nothing calls this directly
no outgoing calls
no test coverage detected