CGAL 6.2 - Surface Mesh Topology

Loading...
Searching...
No Matches
Surface_mesh_topology/path_homotopy_with_symbols.cpp
#include <CGAL/Polygonal_schema.h>
#include <CGAL/Path_on_surface.h>
#include <CGAL/Curves_on_surface_topology.h>
#include <iostream>
#include <cstdlib>
using namespace CGAL::Surface_mesh_topology;
typedef Polygonal_schema_with_combinatorial_map<> PS;
int main()
{
PS ps;
ps.add_facet("a b -a -b c d -c -d");
Path_on_surface<PS> p1(ps); p1.push_back_by_label("a");
Path_on_surface<PS> p2(ps); p2.push_back_by_label("b c a -c -b");
Curves_on_surface_topology<PS> cst(ps);
bool res1=cst.are_freely_homotopic(p1, p2);
std::cout<<"Paths p1 and p2 "<<(res1?"ARE":"ARE NOT")
<<" freely homotopic."<<std::endl;
bool res2=cst.are_base_point_homotopic(p1, p2);
std::cout<<"Paths p1 and p2 "<<(res2?"ARE":"ARE NOT")
<<" base point homotopic."<<std::endl;
return EXIT_SUCCESS;
}
CGAL::Surface_mesh_topology::Curves_on_surface_topology
The class Curves_on_surface_topology provides methods to compute shortest non contractible cycles and...
Definition: Curves_on_surface_topology.h:13
CGAL::Surface_mesh_topology::Curves_on_surface_topology::are_freely_homotopic
bool are_freely_homotopic(const Path_on_surface< Mesh > &p1, const Path_on_surface< Mesh > &p2) const
returns true if the closed paths p1 and p2 are freely homotopic.
CGAL::Surface_mesh_topology::Path_on_surface
The class Path_on_surface represents a walk in a mesh which is either a model of CombinatorialMap,...
Definition: Path_on_surface.h:13
CGAL::Surface_mesh_topology::Path_on_surface::push_back_by_label
void push_back_by_label(const std::string &s)
adds successively all darts/halfedges in s (a sequence of labels separated by spaces) at the end of t...
CGAL::Surface_mesh_topology::Polygonal_schema_with_combinatorial_map
The class Polygonal_schema_with_combinatorial_map is a model of PolygonalSchema using Combinatorial_m...
Definition: Polygonal_schema.h:15
CGAL::Surface_mesh_topology
Definition: Curves_on_surface_topology.h:3