A virtual base class that implements the capability of importing 3D point clouds and faces from a file in the Stanford PLY format.
- See also
- https://www.mrpt.org/Support_for_the_Stanford_3D_models_file_format_PLY
-
PLY_Exporter
Definition at line 24 of file PLY_import_export.h.
#include <mrpt/opengl/PLY_import_export.h>
|
bool | loadFromPlyFile (const std::string &filename, std::vector< std::string > *file_comments=nullptr, std::vector< std::string > *file_obj_info=nullptr) |
| Loads from a PLY file. More...
|
|
std::string | getLoadPLYErrorString () const |
| Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems. More...
|
|
◆ getLoadPLYErrorString()
std::string mrpt::opengl::PLY_Importer::getLoadPLYErrorString |
( |
| ) |
const |
|
inline |
◆ loadFromPlyFile()
bool PLY_Importer::loadFromPlyFile |
( |
const std::string & |
filename, |
|
|
std::vector< std::string > * |
file_comments = nullptr , |
|
|
std::vector< std::string > * |
file_obj_info = nullptr |
|
) |
| |
Loads from a PLY file.
- Parameters
-
[in] | filename | The filename to open. It can be either in binary or text format. |
[out] | file_comments | If provided (!=nullptr) the list of comment strings stored in the file will be returned. |
[out] | file_obj_info | If provided (!=nullptr) the list of "object
info" strings stored in the file will be returned. |
- Returns
- false on any error in the file format or reading it. To obtain more details on the error you can call getLoadPLYErrorString()
Definition at line 1844 of file PLY_import_export.cpp.
References TVertex::b, TVertex::g, TVertex::intensity, ply_close(), ply_get_comments(), ply_get_element(), ply_get_element_description(), ply_get_obj_info(), ply_get_property(), ply_open_for_reading(), TVertex::r, VAL_NOT_SET, vert_props, TVertex::x, TVertex::y, and TVertex::z.
◆ PLY_import_set_face_count()
virtual void mrpt::opengl::PLY_Importer::PLY_import_set_face_count |
( |
const size_t |
N | ) |
|
|
protectedpure virtual |
In a base class, reserve memory to prepare subsequent calls to PLY_import_set_face.
◆ PLY_import_set_vertex()
◆ PLY_import_set_vertex_count()
virtual void mrpt::opengl::PLY_Importer::PLY_import_set_vertex_count |
( |
const size_t |
N | ) |
|
|
protectedpure virtual |
◆ m_ply_import_last_error
std::string mrpt::opengl::PLY_Importer::m_ply_import_last_error |
|
private |