| 196 | } |
| 197 | |
| 198 | I64 LASwriterWRL::close(BOOL update_header) |
| 199 | { |
| 200 | if (file == 0) |
| 201 | { |
| 202 | return 0; |
| 203 | } |
| 204 | fprintf(file, "\t\t\t]\012"); |
| 205 | fprintf(file, "\t\t}\012"); |
| 206 | if (rgb) |
| 207 | { |
| 208 | fprintf(file, "\t\tcolor Color {\012"); |
| 209 | fprintf(file, "\t\t\tcolor [\012"); |
| 210 | for (I32 i = 0; i < p_count; i++) |
| 211 | { |
| 212 | fprintf(file, "%.2f %.2f %.2f\012",((1.0f/255.0f)*rgb[3*i]),((1.0f/255.0f)*rgb[3*i+1]),((1.0f/255.0f)*rgb[3*i+2])); |
| 213 | } |
| 214 | fprintf(file, "\t\t\t]\012"); |
| 215 | fprintf(file, "\t\t}\012"); |
| 216 | } |
| 217 | fprintf(file, "\t}\012"); |
| 218 | fprintf(file, "}\012"); |
| 219 | |
| 220 | I64 bytes = ftell_las(file); |
| 221 | |
| 222 | if (file) |
| 223 | { |
| 224 | if (close_file) |
| 225 | { |
| 226 | fclose(file); |
| 227 | close_file = FALSE; |
| 228 | } |
| 229 | file = 0; |
| 230 | } |
| 231 | |
| 232 | npoints = p_count; |
| 233 | p_count = 0; |
| 234 | |
| 235 | return bytes; |
| 236 | } |
| 237 | |
| 238 | LASwriterWRL::LASwriterWRL() |
| 239 | { |
nothing calls this directly
no test coverage detected