Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Types | Public Member Functions
pcl::geometry::MeshIO< MeshT > Class Template Reference

Read / write the half-edge mesh from / to a file. More...

#include <pcl/geometry/mesh_io.h>

Public Types

using Mesh = MeshT
 
using Vertex = typename Mesh::Vertex
 
using HalfEdge = typename Mesh::HalfEdge
 
using Face = typename Mesh::Face
 
using Vertices = typename Mesh::Vertices
 
using HalfEdges = typename Mesh::HalfEdges
 
using Faces = typename Mesh::Faces
 
using VertexIndex = typename Mesh::VertexIndex
 
using HalfEdgeIndex = typename Mesh::HalfEdgeIndex
 
using FaceIndex = typename Mesh::FaceIndex
 

Public Member Functions

 MeshIO ()=default
 Constructor. More...
 
bool read (const std::string &filename, Mesh &mesh) const
 Read the mesh from a file with the given filename. More...
 
bool write (const std::string &filename, const Mesh &mesh) const
 Write the mesh to a file with the given filename. More...
 

Detailed Description

template<class MeshT>
class pcl::geometry::MeshIO< MeshT >

Read / write the half-edge mesh from / to a file.

Template Parameters
MeshTe.g. pcl::geometry::TriangleMesh or pcl::geometry::PolygonMesh
Author
Martin Saelzle
Todo:
  • Only writes the topology (not the mesh data).
  • Supports only ascii.
  • Does not consider the mesh traits (e.g. manifold or not)

Definition at line 60 of file mesh_io.h.

Member Typedef Documentation

◆ Face

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::Face = typename Mesh::Face

Definition at line 66 of file mesh_io.h.

◆ FaceIndex

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::FaceIndex = typename Mesh::FaceIndex

Definition at line 74 of file mesh_io.h.

◆ Faces

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::Faces = typename Mesh::Faces

Definition at line 70 of file mesh_io.h.

◆ HalfEdge

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::HalfEdge = typename Mesh::HalfEdge

Definition at line 65 of file mesh_io.h.

◆ HalfEdgeIndex

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::HalfEdgeIndex = typename Mesh::HalfEdgeIndex

Definition at line 73 of file mesh_io.h.

◆ HalfEdges

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::HalfEdges = typename Mesh::HalfEdges

Definition at line 69 of file mesh_io.h.

◆ Mesh

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::Mesh = MeshT

Definition at line 62 of file mesh_io.h.

◆ Vertex

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::Vertex = typename Mesh::Vertex

Definition at line 64 of file mesh_io.h.

◆ VertexIndex

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::VertexIndex = typename Mesh::VertexIndex

Definition at line 72 of file mesh_io.h.

◆ Vertices

template<class MeshT >
using pcl::geometry::MeshIO< MeshT >::Vertices = typename Mesh::Vertices

Definition at line 68 of file mesh_io.h.

Constructor & Destructor Documentation

◆ MeshIO()

template<class MeshT >
pcl::geometry::MeshIO< MeshT >::MeshIO ( )
default

Constructor.

Member Function Documentation

◆ read()

template<class MeshT >
bool pcl::geometry::MeshIO< MeshT >::read ( const std::string &  filename,
Mesh mesh 
) const
inline

Read the mesh from a file with the given filename.

Parameters
[in]filenamePath to the file.
[out]meshThe loaded mesh.
Returns
true if success.

Definition at line 85 of file mesh_io.h.

◆ write()

template<class MeshT >
bool pcl::geometry::MeshIO< MeshT >::write ( const std::string &  filename,
const Mesh mesh 
) const
inline

Write the mesh to a file with the given filename.

Parameters
[in]filenamePath to the file.
[in]meshThe saved mesh.
Returns
true if success

Definition at line 216 of file mesh_io.h.


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