A header-only C++ library for reading and writing PLY files, with automatic type promotion and mesh-specific helpers.
hapPLY is a C++ header-only library for reading and writing PLY files, a general-purpose format often used for 3D mesh and point cloud data. It provides a simple API to parse both plaintext and binary .ply files, with automatic type promotion and special helpers for common geometric data structures.
C++ developers working with 3D geometry, computer graphics, or scientific data who need to read or write PLY files, especially those in academia, research, or graphics software development.
Developers choose hapPLY for its ease of integration (header-only), support for both PLY formats, and thoughtful design that simplifies common tasks like mesh I/O while remaining flexible for general .ply data.
A C++ header-only parser for the PLY file format. Parse .ply happily!
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Drop a single header file into your project to start using it immediately, eliminating build system complexity and external dependencies.
Reads and writes both plaintext and binary PLY files with the same API, simplifying code for handling different file types without format-specific logic.
Seamlessly promotes numeric types, e.g., reading a float as a double, without manual conversion, as demonstrated in the examples with getProperty<double>() on float data.
Provides convenience methods like getVertexPositions() and addFaceIndices() for common 3D mesh operations, reducing boilerplate code for geometric data handling.
Cannot write floating-point values of inf or nan in ASCII mode, as the format doesn't specify handling, limiting output for scientific data where these values are common.
Always uses uchar for list property sizes, which may fail for data with more than 255 elements, and the README admits this limitation without user configurability.
The library has not been tested on big-endian platforms, potentially causing bugs in binary reading/writing, as noted in the known issues section.