Skip to content
/ O-RPLY Public

O RPLY? is a C/C++ library for PLY file format in-memory load and store. Built over RPly 1.1.4 by Diego Nehab with three improvements. YA RLY.

License

Notifications You must be signed in to change notification settings

quepas/O-RPLY

Repository files navigation

O RPLY?

O RPLY? is a C/C++ library for PLY file format load and store. You might ask O RLY? YA RLY. It is built over RPly 1.1.4 by Diego Nehab with three improvements: 1) CMake build 2) in-memory load and store; and 3) implementation of a simple loader for PLY files. NO WAI!!

This petite library exists only due to the immense work of Diego Nehab. Thank you!

Build (linux/gcc9)

What's new?

  1. CMake-based build makes the library easy to build and reuse
  2. Two new functions for in-memory load and store:
    // Starts reading the PLY file from memory (const char[] buffer)
    p_ply ply_open_from_memory(const char *buffer, p_ply_error_cb error_cb, long idata, void *pdata);
    // Starts writing the PLY file to memory (pre-allocated char[] buffer)
    p_ply ply_create_to_memory(char *buffer, size_t buffer_size, size_t *ply_size,
                               e_ply_storage_mode storage_mode, p_ply_error_cb error_cb, long idata, void *pdata);
  3. An implementation of a simple PLYLoader class.

Installation

On Linux-based systems:

  1. Clone this repository:
    git clone https://github.com/quepas/O-RPLY.git
  2. Pull dependencies (e.g. Catch2)
    cd O-RPLY/
    git submodule update --init --recursive
  3. Prepare build scripts and build the project!
    cmake CMakeLists.txt
    make

O RPLY? in your CMake project

Let's imagine your project contains only one source file main.cpp and O RPLY? is in the third-party/ directory. Now, all you have to do is this:

cmake_minimum_required( VERSION 3.0 )

project( name-of-your-project VERSION 1.0 )

add_subdirectory( third-party/O-RPLY )

add_executable( your-app src/main.cpp)
target_link_libraries( your-app o-rply-lib ) # Include the O-RPLY? library

About

O RPLY? is a C/C++ library for PLY file format in-memory load and store. Built over RPly 1.1.4 by Diego Nehab with three improvements. YA RLY.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published