Gudhi::Points_off_visitor_reader< Point_d > Class Template Reference

OFF file visitor implementation according to Off_reader in order to read points from an OFF file. More...

Public Member Functions

void init (int dim, int num_vertices, int num_faces, int num_edges)
 Off_reader visitor init implementation. More...
 
void point (const std::vector< double > &point)
 Off_reader visitor point implementation. More...
 
const std::vector< Point_d > & get_point_cloud () const
 Point cloud getter. More...
 

Detailed Description

template<typename Point_d>
class Gudhi::Points_off_visitor_reader< Point_d >

OFF file visitor implementation according to Off_reader in order to read points from an OFF file.

Member Function Documentation

◆ get_point_cloud()

template<typename Point_d >
const std::vector<Point_d>& Gudhi::Points_off_visitor_reader< Point_d >::get_point_cloud ( ) const
inline

Point cloud getter.

Returns
point_cloud.

◆ init()

template<typename Point_d >
void Gudhi::Points_off_visitor_reader< Point_d >::init ( int  dim,
int  num_vertices,
int  num_faces,
int  num_edges 
)
inline

Off_reader visitor init implementation.

The init parameters are set from OFF file header. Dimension value is required in order to construct a vector of points.

Parameters
[in]dimspace dimension of vertices.
[in]num_verticesnumber of vertices in the OFF file (not used).
[in]num_facesnumber of faces in the OFF file (not used).
[in]num_edgesnumber of edges in the OFF file (not used).

◆ point()

template<typename Point_d >
void Gudhi::Points_off_visitor_reader< Point_d >::point ( const std::vector< double > &  point)
inline

Off_reader visitor point implementation.

The point function is called on each vertex line from OFF file. This function inserts the vertex in the vector of points.

Parameters
[in]pointvector of vertex coordinates.

Point_d must have a constructor with the following form:

template<class InputIterator > Point_d::Point_d(InputIterator first, InputIterator last)

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