A virtual base class that implements the capability of exporting 3D point clouds and faces to a file in the Stanford PLY format.
Definition at line 71 of file PLY_import_export.h.
#include <mrpt/utils/PLY_import_export.h>
Public Member Functions | |
bool | saveToPlyFile (const std::string &filename, bool save_in_binary=false, const CStringList &file_comments=CStringList(), const CStringList &file_obj_info=CStringList()) const |
Saves to a PLY file. More... | |
std::string | getSavePLYErrorString () const |
Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems. More... | |
Protected Member Functions | |
PLY Export virtual methods to implement in base classes | |
virtual size_t | PLY_export_get_vertex_count () const =0 |
In a base class, return the number of vertices. More... | |
virtual size_t | PLY_export_get_face_count () const =0 |
In a base class, return the number of faces. More... | |
virtual void | PLY_export_get_vertex (const size_t idx, mrpt::math::TPoint3Df &pt, bool &pt_has_color, mrpt::utils::TColorf &pt_color) const =0 |
In a base class, will be called after PLY_export_get_vertex_count() once for each exported point. More... | |
Private Attributes | |
std::string | m_ply_export_last_error |
|
inline |
Return a description of the error if loadFromPlyFile() returned false, or an empty string if the file was loaded without problems.
Definition at line 87 of file PLY_import_export.h.
|
protectedpure virtual |
In a base class, return the number of faces.
Implemented in mrpt::maps::CPointsMap, mrpt::opengl::CPointCloudColoured, and mrpt::opengl::CPointCloud.
|
protectedpure virtual |
In a base class, will be called after PLY_export_get_vertex_count() once for each exported point.
pt_color | Will be NULL if the loaded file does not provide color info. |
Implemented in mrpt::maps::CPointsMap, mrpt::maps::CColouredPointsMap, mrpt::opengl::CPointCloudColoured, and mrpt::opengl::CPointCloud.
|
protectedpure virtual |
In a base class, return the number of vertices.
Implemented in mrpt::maps::CPointsMap, mrpt::opengl::CPointCloudColoured, and mrpt::opengl::CPointCloud.
bool mrpt::utils::PLY_Exporter::saveToPlyFile | ( | const std::string & | filename, |
bool | save_in_binary = false , |
||
const CStringList & | file_comments = CStringList() , |
||
const CStringList & | file_obj_info = CStringList() |
||
) | const |
Saves to a PLY file.
[in] | filename | The filename to be saved. |
[in] | file_comments | If provided (!=NULL) the list of comment strings stored in the file will be returned. |
[in] | file_obj_info | If provided (!=NULL) the list of "object info" strings stored in the file will be returned. |
|
mutableprivate |
Definition at line 111 of file PLY_import_export.h.
Page generated by Doxygen 1.8.13 for MRPT 1.4.0 SVN: at Sat Sep 2 18:44:07 UTC 2017 |