class mrpt::viz::PLY_Exporter
Overview
A virtual base class that implements the capability of exporting 3D point clouds and faces to a file in the Stanford PLY format.
See also:
https://www.mrpt.org/Support_for_the_Stanford_3D_models_file_format_PLY
#include <mrpt/viz/PLY_import_export.h> class PLY_Exporter { public: // methods 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; std::string getSavePLYErrorString() const; }; // direct descendants class CPointsMap; class CPointCloud; class CPointCloudColoured;
Methods
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.
Parameters:
filename |
The filename to be saved. |
file_comments |
If provided (!=nullptr) the list of comment strings stored in the file will be returned. |
file_obj_info |
If provided (!=nullptr) the list of “object info” strings stored in the file will be returned. |
Returns:
false on any error writing the file. To obtain more details on the error you can call getSavePLYErrorString()
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.