Skip to content

CG-mesh and -material, PLY parser, improvements serialization + encoding

Philipp Seiwald requested to merge geometry_extensions into dev-v2

The changes cover various additions related to geometry in computer graphics and its in- and output. A generic parser/writer for the .ply file format is implemented for which various improvements in the serialization and encoding modules were triggered.

New Features

  • [core]:
    • PlatformHelper: added method to identify byte-order (endianness) at runtime.
    • Added namespace string for common string operations not covered by the stdlib.
  • [geometry]:
    • Added classes CGMaterial and CGMesh as containers for typical material and mesh data structures in Computer Graphics. CGMesh supports indexed vertex data, per-vertex normals and colors (rgba, 24+8bit), methods for merging, normal averaging, householding, and material to vertex color conversions.
  • [io]:
    • Added namespace ply and related classes for reading and writing .ply files (ascii, binary-little-endian, binary-big-endian) and converting to/from CGMesh.
    • serialization: Now supports to serialize/deserialize parameter tuples (through variadic templates). This should significantly ease writing serialization and deserialization code for custom classes.

Bug Fixes

  • [cmake]:
    • Added compiler flag -Wno-deprecated-copy for GCC and Clang to silence annoying warning about Eigen-code in Clang 10.

Non-Breaking Changes

  • [io]:
    • encoding: Added explicit support for basic datatypes. Resolves ambiguities (char <-> uint8_t, float <-> double, etc.)

Breaking Changes

  • [io]:
    • serialization: Now explicitly requires the user to specify the "endianess" (big-/little-endian). This allows the user to choose the byte-order for serialization.
  • [io]:
    • NetworkSocket: The network socket now has an option to specify the used byte-order for serialization and deserialization. The socket uses "little-endian" per default, however, the user may explicitly force it to big-endian (e.g. for communicating with embedded devices).
Edited by Philipp Seiwald

Merge request reports