Easy3D 2.5.3
SurfaceMeshIO Class Reference

Implementation of file input/output operations for SurfaceMesh. More...

#include <easy3d/fileio/surface_mesh_io.h>

Static Public Member Functions

static SurfaceMeshload (const std::string &file_name)
 Reads a surface mesh from a file. More...
 
static bool save (const std::string &file_name, const SurfaceMesh *mesh)
 Saves a surface mesh to a file. More...
 

Detailed Description

Implementation of file input/output operations for SurfaceMesh.

Member Function Documentation

◆ load()

SurfaceMesh * load ( const std::string &  file_name)
static

Reads a surface mesh from a file.

File extension determines file format (ply, obj, off, stl, poly) and type (i.e. binary or ASCII).

Parameters
file_nameThe file name.
Returns
The pointer of the surface mesh (nullptr if failed).
Examples
Tutorial_203_Viewer_wxWidgets, and Tutorial_204_Viewer_Qt.

◆ save()

bool save ( const std::string &  file_name,
const SurfaceMesh mesh 
)
static

Saves a surface mesh to a file.

File extension determines file format (ply, obj, off, stl, poly) and type (i.e. binary or ASCII).

Parameters
file_nameThe file name.
meshThe surface mesh.
Returns
The status of the operation
  • true if succeeded
  • false if failed
Examples
Tutorial_203_Viewer_wxWidgets, and Tutorial_204_Viewer_Qt.

The documentation for this class was generated from the following files: