Easy3D 2.5.3
PolyMeshIO Class Reference

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

#include <easy3d/fileio/poly_mesh_io.h>

Static Public Member Functions

static PolyMeshload (const std::string &file_name)
 Reads a polyhedral mesh from a file. More...
 
static bool save (const std::string &file_name, const PolyMesh *mesh)
 Saves a polyhedral mesh to a file. More...
 

Detailed Description

Implementation of file input/output operations for PolyMesh.

Member Function Documentation

◆ load()

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

Reads a polyhedral mesh from a file.

File extension determines file format (now only '*.plm' format is supported).

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

◆ save()

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

Saves a polyhedral mesh to a file.

File extension determines file format (now only '*.plm' format is supported).

Parameters
file_nameThe file name.
meshThe polyhedral mesh.
Returns
The status of the operation
  • true if succeeded
  • false if failed

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