Euclid
Geometry Processing and Shape Analysis in C++
Topology

Topology. More...

Chain complex.

Vertex paths and loops.

template<typename Mesh >
using Euclid::VertexChain = std::vector< vertex_t< Mesh >>
 
template<typename Mesh >
using Euclid::VertexChains = std::vector< VertexChain< Mesh >>
 
template<typename Mesh >
bool Euclid::is_chain (const Mesh &mesh, const VertexChain< Mesh > &chain)
 Test if the target is a valid chain. More...
 
template<typename Mesh >
bool Euclid::is_loop (const Mesh &mesh, const VertexChain< Mesh > &chain)
 Test if the target is a valid loop. More...
 

Generator.

template<typename Mesh >
VertexChains< Mesh > Euclid::greedy_homology_generators (const Mesh &mesh, double accept=0.05)
 Greedy homology generators. More...
 
template<typename Mesh >
VertexChains< Mesh > Euclid::greedy_homotopy_generators (const Mesh &mesh, vertex_t< Mesh > v)
 Greedy homotopy generators. More...
 

Mesh topology.

Basic topological properties and operations.

template<typename Mesh >
int Euclid::num_boundaries (const Mesh &mesh)
 The number of boundaries/holes.
 
template<typename Mesh >
std::vector< halfedge_t< Mesh > > Euclid::boundary_components (const Mesh &mesh)
 Find the boundary components. More...
 
template<typename Mesh >
int Euclid::euler_characteristic (const Mesh &mesh)
 Euler characteristic. More...
 
template<typename Mesh >
int Euclid::genus (const Mesh &mesh)
 Genus. More...
 

Detailed Description

This package provides topology related operations.

Typedef Documentation

template<typename Mesh >
using Euclid::VertexChain = typedef std::vector<vertex_t<Mesh>>

Function Documentation

template<typename Mesh >
std::vector< halfedge_t< Mesh > > Euclid::boundary_components ( const Mesh &  mesh)

Each component can be retrived by a halfedge.

template<typename Mesh >
int Euclid::euler_characteristic ( const Mesh &  mesh)

\(X = V - E + F\)

template<typename Mesh >
int Euclid::genus ( const Mesh &  mesh)

\(2G = 2 - X - B\)

template<typename Mesh >
VertexChains< Mesh > Euclid::greedy_homology_generators ( const Mesh &  mesh,
double  accept = 0.05 
)

Reference

[1] Erickson, J., Whittlesey, K. Greedy Optimal Homotopy and Homology Generators.

[2] Crane, K. https://www.cs.cmu.edu/~kmcrane/Projects/LoopsOnSurfaces/

template<typename Mesh >
VertexChains< Mesh > Euclid::greedy_homotopy_generators ( const Mesh &  mesh,
vertex_t< Mesh >  v 
)

Reference

[1] Erickson, J., Whittlesey, K. Greedy Optimal Homotopy and Homology Generators.

template<typename Mesh >
bool Euclid::is_chain ( const Mesh &  mesh,
const VertexChain< Mesh > &  chain 
)

Consecutive vertices should be connected by a valid edge.

template<typename Mesh >
bool Euclid::is_loop ( const Mesh &  mesh,
const VertexChain< Mesh > &  chain 
)

A loop is a chain whose head and tail are connected.