-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of dimensions for LAS input (#158)
* Rework preflight file-scanning. * Add test for issue 155. * Fix size calc. * Use filesystem::path. * More filesystem::path nonsense. * Close files before we try to delete them cause Windows.
- Loading branch information
1 parent
c19046b
commit 255d30b
Showing
9 changed files
with
442 additions
and
264 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,17 @@ | |
=============================================================================== | ||
FILE: util.hpp | ||
CONTENTS: | ||
Utility classes | ||
PROGRAMMERS: | ||
[email protected] - http://rapidlasso.com | ||
[email protected] - Hobu, Inc. | ||
COPYRIGHT: | ||
(c) 2007-2014, martin isenburg, rapidlasso - tools to catch reality | ||
(c) 2014, Uday Verma, Hobu, Inc. | ||
|
@@ -22,9 +22,9 @@ | |
This software is distributed WITHOUT ANY WARRANTY and without even the | ||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
CHANGE HISTORY: | ||
=============================================================================== | ||
*/ | ||
|
||
|
@@ -38,6 +38,8 @@ | |
#include <cstdlib> | ||
#include <limits> | ||
|
||
#include <lazperf/portable_endian.hpp> | ||
|
||
#ifdef PRINT_DEBUG | ||
#define LAZDEBUG(e) (void)(e) | ||
#else | ||
|
@@ -146,6 +148,18 @@ inline uint32_t unpack(const char *in) | |
(b1 & 0xFF)); | ||
} | ||
|
||
template<> | ||
inline float unpack(const char *in) | ||
{ | ||
uint32_t u; | ||
float f; | ||
|
||
memcpy(&u, in, sizeof(u)); | ||
u = le32toh(u); | ||
memcpy(&f, &u, sizeof(u)); | ||
return f; | ||
} | ||
|
||
inline void pack(const uint32_t v, char *out) | ||
{ | ||
out[3] = (v >> 24) & 0xFF; | ||
|
Oops, something went wrong.