CGAL 6.1 - Homological Discrete Vector Fields
Loading...
Searching...
No Matches
CGAL::HDVF::Mesh_object_io Class Reference

#include <CGAL/HDVF/Mesh_object_io.h>

Inherited by CGAL::HDVF::Icosphere_object_io, and CGAL::HDVF::Tet_object_io.

Definition

The class Mesh_object_io is an intermediate IO class, used to load triangular/tetraedral meshes and produce simplicial complexes.

Examples
HDVF/example_hdvf_simplicial.cpp, HDVF/main_dual_hdvf.cpp, HDVF/main_hdvf.cpp, and HDVF/main_per_hdvf.cpp.

Public Member Functions

 Mesh_object_io ()
 
 Mesh_object_io (int d, const std::vector< IONodeType > &vnodes, const std::vector< IOCellType > &vcells)
 Constructor from a vector of IONodeType (vertices coordinates) and a vector of simplices.
 
 Mesh_object_io (int d, const std::vector< std::vector< double > > &vnodes, const std::vector< IOCellType > &vcells)
 Constructor from a vector of vectors of doubles (vertices coordinates) and a vector of simplices.
 
 Mesh_object_io (const Mesh_object_io &m)
 
std::vector< std::vector< double > > get_nodes ()
 
void push_back (const Mesh_object_io &mesh)
 
void add_node (const IONodeType &v)
 
void clear_cells ()
 
void clear_nodes ()
 
void clear ()
 
void add_cell (const IOCellType &c)
 
size_t cells_of_dim (int q) const
 
bool read_off (const std::string &filename)
 
bool write_off (const std::string &filename)
 
void write_to_vtk (const std::string &filename)
 
bool write_simp (const std::string &filename)
 
bool read_simp (const std::string &filename)
 
bool read_nodes_file (const std::string &filename)
 
void print_infos () const
 
IONodeType barycenter ()
 
double radius (const IONodeType &bary)
 
pair< IONodeType, IONodeTypeBB (double ratio=1.)
 

Public Attributes

int dim = 0
 
size_t nvertices
 
size_t ncells
 
size_t nedges
 
std::vector< IONodeTypenodes
 
std::vector< IOCellTypecells
 

Constructor & Destructor Documentation

◆ Mesh_object_io() [1/2]

CGAL::HDVF::Mesh_object_io::Mesh_object_io ( int  d,
const std::vector< IONodeType > &  vnodes,
const std::vector< IOCellType > &  vcells 
)

Constructor from a vector of IONodeType (vertices coordinates) and a vector of simplices.

Simplices are described by the list of vertices indices.

◆ Mesh_object_io() [2/2]

CGAL::HDVF::Mesh_object_io::Mesh_object_io ( int  d,
const std::vector< std::vector< double > > &  vnodes,
const std::vector< IOCellType > &  vcells 
)

Constructor from a vector of vectors of doubles (vertices coordinates) and a vector of simplices.

Simplices are described by the list of vertices indices.