Loading...
Searching...
No Matches
Gudhi::Points_3D_off_visitor_reader< Point_3 > Class Template Reference

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

#include <include/gudhi/Points_3D_off_io.h>

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_3 > & get_point_cloud () const
 Point cloud getter. More...
 
bool is_valid () const
 Returns if the OFF file read operation was successful or not. More...
 

Detailed Description

template<typename Point_3>
class Gudhi::Points_3D_off_visitor_reader< Point_3 >

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_3 >
const std::vector< Point_3 > & Gudhi::Points_3D_off_visitor_reader< Point_3 >::get_point_cloud ( ) const
inline

Point cloud getter.

Returns
The point cloud.

◆ init()

template<typename Point_3 >
void Gudhi::Points_3D_off_visitor_reader< Point_3 >::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 and the value must be 3.

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).

◆ is_valid()

template<typename Point_3 >
bool Gudhi::Points_3D_off_visitor_reader< Point_3 >::is_valid ( ) const
inline

Returns if the OFF file read operation was successful or not.

Returns
OFF file read status.

◆ point()

template<typename Point_3 >
void Gudhi::Points_3D_off_visitor_reader< Point_3 >::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_3 must have a constructor with the following form:

template<class InputIterator > Point_3::Point_3(double x, double y, double z)

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