CGAL 6.1.2 - The Heat Method: CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3< TriangleMesh, Mode, VertexPointMap, LA, Traits > Class Template Reference

CGAL 6.1.2 - The Heat Method

Loading...
Searching...
No Matches
List of all members | Public Types | Public Member Functions
CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3< TriangleMesh, Mode, VertexPointMap, LA, Traits > Class Template Reference
Reference Manual

`#include <CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h>`

## Definition

template<typename TriangleMesh, typename Mode = Direct, typename VertexPointMap = Default, typename LA = Default, typename Traits = Default>
class CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3< TriangleMesh, Mode, VertexPointMap, LA, Traits >

Class `Surface_mesh_geodesic_distances_3` computes estimated geodesic distances for a set of source vertices where sources can be added and removed.

The class performs a preprocessing step that only depends on the mesh, so that the distance computation takes less time after changes to the set of sources.

Template Parameters

  TriangleMesh | a triangulated surface mesh, model of `FaceListGraph` and `HalfedgeListGraph`
  Mode | must be `Intrinsic_Delaunay` to indicate that an intrinsic Delaunay triangulation is internally constructed or `Direct` to indicate that the input mesh should be used as is. If `Intrinsic_Delaunay`, then the type `TriangleMesh` must have an internal property for `vertex_point` and its value type must be the same as the value type of `VertexPointMap`. If `Direct`, then the input mesh should not have any degenerate faces.
  VertexPointMap | a model of `ReadablePropertyMap` with `boost::graph_traits<TriangleMesh>::vertex_descriptor` as key and `Traits::Point_3` as value type. The default is `typename boost::property_map< TriangleMesh, vertex_point_t>::const_type`.
  LA | a model of `SparseLinearAlgebraWithFactorTraits_d`. If `CGAL_EIGEN3_ENABLED` is defined, then `Eigen_solver_traits<Eigen::SimplicialLDLT<typename Eigen_sparse_matrix<double>::EigenType > >` is used as default
  Traits | a model of `HeatMethodTraits_3`. The default is the Kernel of the value type of the vertex point map (extracted using `Kernel_traits`).

Examples
  Heat_method_3/heat_method_surface_mesh.cpp, and Heat_method_3/heat_method_surface_mesh_direct.cpp.

## Public Types
typedef boost::graph_traits< TriangleMesh >::vertex_descriptor | vertex_descriptor
| Vertex descriptor type.
typedef unspecified_type | Vertex_const_range
| a model of `ConstRange` with an iterator that is model of `ForwardIterator` with `vertex_descriptor` as value type.
typedef unspecified_type | Vertex_point_map
| Vertex point map type derived from `VertexPointMap`.

## Public Member Functions
| Surface_mesh_geodesic_distances_3 (const TriangleMesh &tm)
| Constructor.
| Surface_mesh_geodesic_distances_3 (const TriangleMesh &tm, Vertex_point_map vpm)
| Constructor.
const TriangleMesh & | triangle_mesh () const
| returns the triangle mesh the algorithm is running on.
bool | add_source (vertex_descriptor vd)
| adds `vd` to the source set, returning `false` if `vd` is already in the set.
template<typename VertexConstRange >
void | add_sources (const VertexConstRange &vrange)
| adds the range of vertices to the source set.
bool | remove_source (vertex_descriptor vd)
| removes `vd` from the source set, returning `true` if `vd` was in the set.
void | clear_sources ()
| clears the current source set.
const Vertex_const_range & | sources () const
| returns the source set.
template<class VertexDistanceMap >
void | estimate_geodesic_distances (VertexDistanceMap vdm)
| fills the distance property map with the estimated geodesic distance of each vertex to the closest source vertex.

## Member Function Documentation

## ◆ add_sources()

template<typename TriangleMesh , typename Mode = Direct, typename VertexPointMap = Default, typename LA = Default, typename Traits = Default>
template<typename VertexConstRange >

void CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3< TriangleMesh, Mode, VertexPointMap, LA, Traits >::add_sources | ( | const VertexConstRange & | vrange | ) |

adds the range of vertices to the source set.

Template Parameters

  VertexConstRange | a model of the concept `ConstRange` with value type `boost::graph_traits<TriangleMesh>::vertex_descriptor`

## ◆ estimate_geodesic_distances()

template<typename TriangleMesh , typename Mode = Direct, typename VertexPointMap = Default, typename LA = Default, typename Traits = Default>
template<class VertexDistanceMap >

void CGAL::Heat_method_3::Surface_mesh_geodesic_distances_3< TriangleMesh, Mode, VertexPointMap, LA, Traits >::estimate_geodesic_distances | ( | VertexDistanceMap | vdm | ) |

fills the distance property map with the estimated geodesic distance of each vertex to the closest source vertex.

Template Parameters

  VertexDistanceMap | a property map model of `WritablePropertyMap` with `vertex_descriptor` as key type and `double` as value type.

Parameters

  vdm | the vertex distance map to be filled

Precondition
  If `Mode` is `Direct`, the support triangle mesh does not have any degenerate faces

Warning
  The key type is `double` even when used with an exact kernel.