3.0.0
This major release required changes to the API in some places, so I took this opportunity to clean up and deprecate several things for readability & clarity.
There have been many changes around the Simple API
in this release to fix some problems, avoid potential errors, and simplify the use of the API. Where possible these changes are marked as deprecated
to be removed later. The compiler will produce warnings for these indicating what needs to change. Other changes could not be marked deprecated but will break the API, requiring code changes. The notable ones are marked with π§ below.
Please consider one-time or recurring support - especially if you use this library in a product you sell.
Added
-
Add address (ASan) and undefined behaviour (UBSan) sanitizers. These are controlled by
E57FORMAT_SANITIZE_ALL
,E57FORMAT_SANITIZE_ADDRESS
andE57FORMAT_SANITIZE_ADDRESS
. They are not included when building with MSVC. -
Add new
E57Version.h
header for more convenient access to version information. (#197). -
Add
ImageFile::extensionsLookupPrefix()
overload for more concise user code. (#161) -
Added a constructor & destructor for E57SimpleData's
Data3DPointsData_t
. This will create all the required buffers based on ane57::Data3D
struct and handle their cleanup. See theSimpleWriter
tests for examples. (#149)Note: I strongly recommend these new constructors be used to simplify your code and help prevent errors.
-
A new E57SimpleReader constructor takes a
ReaderOptions
struct which allows setting the checksum policy.Reader( const ustring &filePath, const ReaderOptions &options );
-
{test} Added testing using GoogleTest. For details, please see test/README.md (#121)
-
Added
E57Exception::errorStr()
to get the error string directly. (#128) -
{ci} Added a CI check for proper clang-formatted code. (#125)
Changed
- Now requires a C++14 compatible compiler.
- Now requires CMake >= 3.15. (#205)
- π§ DEBUG and VERBOSE macros were changed to simplify and clarify:
- New
E57_ENABLE_DIAGNOSTIC_OUTPUT
controls the inclusion of the code for thedump()
functions on nodes. I don't see any real reason to turn this off, but I left the capability in for compatibility. - New
E57_VALIDATION_LEVEL=N
replacesE57_DEBUG
(N=1) andE57_MAX_DEBUG
(N=2). E57_MAX_VERBOSE
was consolidated withE57_VERBOSE
since they were essentially the same.
- New
- When building itself, warnings are now treated as errors. (#205, #211)
- Clean up global const and enum names to use the
e57
namespace and avoid repetition. (#176)- i.e. instead of
e57::E57_STRUCTURE
, we now usee57::TypeStructure
- i.e. instead of
- {format} Update clang-format rules for clang-format 15. (#168, #179)
- Change default checksum policies to an enum. (#166)
Old New CHECKSUM_POLICY_NONE ChecksumPolicy::None CHECKSUM_POLICY_SPARSE ChecksumPolicy::Sparse CHECKSUM_POLICY_HALF ChecksumPolicy::Half CHECKSUM_POLICY_ALL ChecksumPolicy::All - Avoid implicit conversion in constructors. (#135)
- Update CRCpp to 1.2. (#130)
- E57Exception changes (#118):
- mark methods as
noexcept
- use
private
instead ofprotected
- mark methods as
- Rename E57Simple's
Data3DPointsData
andData3DPointsData_d
structs toData3DPointsFloat
andData3DPointsDouble
respectively. (#180) - π§ E57Simple: Specifying the node type for cartesian & spherical points, time stamp, and intensity is now explicit using new fields (
pointRangeNodeType
,angleNodeType
,timeNodeType
, andintensityNodeType
) and a new enum (NumericalNodeType
). (#178)- For examples, please see test/src/testSimpleWriter.cpp.
- Simplify the E57SimpleWriter API with
WriteImage2DData()
for images andWriteData3DData()
for 3D data. This reduces code, hides complexity, and avoids potential errors. (#171)- As part of this simplification,
WriteData3DData()
will now fill in any missing min/max values for cartesian & spherical points, intensity, and time stamps by looking at the data.(#175)
- As part of this simplification,
- π§ E57Simple: Intensity now uses
double
instead offloat
. (#178) - π§ E57Simple: Colours now use
uint16_t
instead ofuint8_t
. (#167) - π§ Change E57SimpleData's Data3D field name from
pointsSize
topointCount
. (#164) - π§ Min/max fields in E57SimpleData's Data3D's point fields were a mix of floats and doubles. Since the fields are doubles, set them all to doubles and use the new
Data3DPointsData_t
constructor to set them properly for floats. (#153)Note: If you were previously relying on these to be floats and are not using the new
Data3DPointsData_t
constructor, you will need to set these. - π§ Renamed the E57_EXT_surface_normals extension's fields in E57SimpleData's
PointStandardizedFieldsAvailable
to be in line with existing code. (#149)normalX
renamed tonormalXField
normalY
renamed tonormalYField
normalZ
renamed tonormalZField
Deprecated
e57::Utilities::getVersions()
. (#197)e57::Data3DPointsData
ande57::Data3DPointsData_d
types. (#180)- Many global const and enum names. The compiler will produce warnings including the replacement symbols (note that enumerators will not produce warnings on C++14, but they will on C++17). (#176)
e57::Writer::NewImage2D
ande57::Writer::SetUpData3DPointsData
. (#171)- Old default checksum policies (
CHECKSUM_POLICY_NONE
,CHECKSUM_POLICY_SPARSE
,CHECKSUM_POLICY_HALF
, andCHECKSUM_POLICY_ALL
). (#166) - The old
e57::Reader
constructor taking onlyfilePath
. (#139) - The old
e57::Writer
constructor taking onlyfilePath
. (#117)
Fixed
- Fix several potential divide-by-zero cases. (#224)
- {ci} Now builds shared library versions as well. (#219)
- {win} Fixes shared library build warnings. (#215, #216, #217)
- Fix the code which shortens floating point numbers when converted to strings. The impact of it being incorrect was negligible since it's just the floating point representation in the XML portion of the file. (#214)
- Turned on a lot of compiler warnings and fixed them. (#201, #202, #203, #204, #205, #207, #209)
- Fix writing floating point numbers when
std::locale::global
is set. (#174) - E57XmlParser: Parse doubles in a locale-independent way. (#173) (Thanks Hugal31!)
- E57SimpleReader: Ensure scaled integer fields are set as best we can when reading. (#158)
- Fix the E57_EXT_surface_normals extension's URI in E57SimpleWriter. (#143)
- {win} Fix conversion warning when compiling with debug on. (#124)
- Add errno detail to
E57_ERROR_OPEN_FAILED
exception. (#119, #120)
New Contributors
Full Changelog: v2.3.0...v3.0.0