MRPT
2.0.4
|
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 83 of file PLY_import_export.h.
#include <mrpt/opengl/PLY_import_export.h>
Public Member Functions | |
bool | saveToPlyFile (const std::string &filename, bool save_in_binary=false, const std::vector< std::string > &file_comments=std::vector< std::string >(), const std::vector< std::string > &file_obj_info=std::vector< std::string >()) 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::img::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 104 of file PLY_import_export.h.
References m_ply_export_last_error.
|
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 nullptr if the loaded file does not provide color info. |
Implemented in mrpt::maps::CPointsMap, mrpt::maps::CColouredPointsMap, mrpt::maps::CPointsMapXYZI, 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 PLY_Exporter::saveToPlyFile | ( | const std::string & | filename, |
bool | save_in_binary = false , |
||
const std::vector< std::string > & | file_comments = std::vector<std::string>() , |
||
const std::vector< std::string > & | file_obj_info = std::vector<std::string>() |
||
) | const |
Saves to a PLY file.
[in] | filename | The filename to be saved. |
[in] | file_comments | If provided (!=nullptr) the list of comment strings stored in the file will be returned. |
[in] | file_obj_info | If provided (!=nullptr) the list of "object info" strings stored in the file will be returned. |
Definition at line 1945 of file PLY_import_export.cpp.
References mrpt::img::TColorf::B, face_props, mrpt::img::TColorf::G, TVertex::intensity, PLY_ASCII, PLY_BINARY_BE, PLY_BINARY_LE, ply_close(), ply_describe_property(), ply_element_count(), ply_header_complete(), ply_open_for_writing(), ply_put_comment(), ply_put_element(), ply_put_element_setup(), ply_put_obj_info(), mrpt::img::TColorf::R, vert_props, mrpt::math::TPoint3D_data< T >::x, TVertex::x, mrpt::math::TPoint3D_data< T >::y, TVertex::y, mrpt::math::TPoint3D_data< T >::z, and TVertex::z.
|
mutableprivate |
Definition at line 131 of file PLY_import_export.h.
Referenced by getSavePLYErrorString().
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |