CGAL 6.3-dev - Homological Discrete Vector Fields
Loading...
Searching...
No Matches
CGAL::Homological_discrete_vector_field::Icosphere_object_io< Traits > Class Template Reference

#include <CGAL/HDVF/Icosphere_object_io.h>

Inherits from

CGAL::Homological_discrete_vector_field::Mesh_object_io< Traits >.

Definition

template<typename Traits>
class CGAL::Homological_discrete_vector_field::Icosphere_object_io< Traits >

The class Icosphere_object_io is an intermediate IO class, used to produce a Mesh_object_io containing an icosphere (for Hdvf_duality with tetgen).

Template Parameters
Traitsa geometric traits class model of the HDVFTraits concept.

Public Member Functions

 Icosphere_object_io (size_t subdivisions, const Point &c=Point({0, 0, 0}), double r=1.)
 Builds a Mesh_object_io icosphere.
Public Member Functions inherited from CGAL::Homological_discrete_vector_field::Mesh_object_io< Traits >
int dimension () const
 Returns the dimension of the Mesh_object_io.
 Mesh_object_io (int d=0)
 Default constructor.
 Mesh_object_io (int d, const std::vector< Point > &vnodes, const std::vector< Io_cell_type > &vcells, bool sort_data=false)
 Constructor from a vector of points (vertex coordinates) and a vector of simplices.
 Mesh_object_io (const Point &BBmin, const Point &BBmax)
 Build a Mesh_object_io representing the bounding box of diagonal BB_min - BBmax.
const std::vector< Point > & nodes () const
 Returns the vector of nodes (ie vertices coordinates).
int number_of_nodes () const
 Returns the number of nodes (ie vertices).
const std::vector< Io_cell_type > & cells () const
 Returns the vector of cells.
void set_node (size_t i, const Point &P)
 Updates the coordinates of the ith node (ie vertex).
void push_back (const Mesh_object_io &mesh)
 Adds a Mesh_object_io to the current Mesh_object_io.
size_t add_node (const Point &v)
 Adds a node (vertex).
void clear_cells ()
 Removes all cells (simplices).
void clear_nodes ()
 Removes all nodes (vertices).
void clear ()
 Removes all nodes and cells.
void add_cell (Io_cell_type &c, bool sort_indices=false)
 Adds a cells (simplex).
size_t cells_of_dim (int q) const
 Number of cells (simplices) of dimension q.
bool read_off (const std::string &filename)
 Imports a mesh stored in an OFF file.
bool write_off (const std::string &filename) const
 Exports triangles (simplices of dimension 2) of the current object to an OFF file.
void write_vtk (const std::string &filename)
 Exports cells of the current object to an VTK file.
bool write_simp (const std::string &filename)
 Exports cells to a SIMP file.
bool read_simp (const std::string &filename)
 Imports cells from a SIMP file.
bool read_nodes_file (const std::string &filename)
 Reads nodes from a file in tetgen NODES format.
std::ostream & print_infos (std::ostream &out_stream=std::cout) const
 Prints compact informations on the object into a stream.
Point centroid () const
 Returns the centroid of the object's nodes.
double radius (const Point &bary) const
 Returns maximum distance from a point bary to the object's nodes.
Bbox bbox (double ratio=1.) const
 Returns the bounding box of the object's nodes.

Additional Inherited Members

Public Types inherited from CGAL::Homological_discrete_vector_field::Mesh_object_io< Traits >
typedef Traits::Point Point
 Underlying point type.
typedef Traits::Bbox Bbox
 Bounding box type.

Constructor & Destructor Documentation

◆ Icosphere_object_io()

template<typename Traits>
CGAL::Homological_discrete_vector_field::Icosphere_object_io< Traits >::Icosphere_object_io ( size_t subdivisions,
const Point & c = Point({0, 0, 0}),
double r = 1. )

Builds a Mesh_object_io icosphere.

Such icospheres are usually used to compute Alexander duality isomorphisms with HDVF_duality. The initial complex is embedded into a Mesh_object_io icosphere and the resulting set of simplices is triangulated using tetgen.

Parameters
subdivisionsSubdivision level of the icosphere.
cCenter of the icosphere.
rRadius of the icosphere.