Lagrange
Loading...
Searching...
No Matches
GeodesicEngineFlip< Scalar, Index > Class Template Reference

Computes surface geodesics using the edge-flip method. More...

#include <lagrange/geodesic/GeodesicEngineFlip.h>

Inheritance diagram for GeodesicEngineFlip< Scalar, Index >:
GeodesicEngine< Scalar, Index >

Classes

struct  Impl
 
struct  Options
 Options for the flip geodesic engine. More...
 

Public Types

using Super = GeodesicEngine<Scalar, Index>
 Parent class type.
 
using Mesh = typename Super::Mesh
 The mesh type.
 
- Public Types inherited from GeodesicEngine< Scalar, Index >
using Mesh = SurfaceMesh<Scalar, Index>
 The mesh type.
 

Public Member Functions

 GeodesicEngineFlip (Mesh &mesh, const Options &options={})
 Precompute any data required for repeated geodesic path computation.
 
 GeodesicEngineFlip (GeodesicEngineFlip &&)
 
GeodesicEngineFlip & operator= (GeodesicEngineFlip &&)
 
 GeodesicEngineFlip (const GeodesicEngineFlip &)=delete
 
GeodesicEngineFlip & operator= (const GeodesicEngineFlip &)=delete
 
SingleSourceGeodesicResult single_source_geodesic (const SingleSourceGeodesicOptions &options) override
 
Scalar point_to_point_geodesic (const PointToPointGeodesicOptions &options) override
 Compute the geodesic distance between two points using the edge-flip method.
 
GeodesicPathResult< Scalar, Index > point_to_point_geodesic_path (const PointToPointGeodesicPathOptions &options) override
 Compute the geodesic path between two points using the edge-flip method.
 
- Public Member Functions inherited from GeodesicEngine< Scalar, Index >
 GeodesicEngine (Mesh &mesh)
 Base class constructor.
 
virtual ~GeodesicEngine ()=default
 Base class destructor.
 

Protected Attributes

lagrange::value_ptr< Impl > m_impl
 

Additional Inherited Members

- Protected Member Functions inherited from GeodesicEngine< Scalar, Index >
const Mesh & mesh () const
 
Mesh & mesh ()
 

Detailed Description

template<typename Scalar, typename Index>
class lagrange::geodesic::GeodesicEngineFlip< Scalar, Index >

Computes surface geodesics using the edge-flip method.

This method finds geodesic paths by iteratively flipping edges to straighten an initial Dijkstra path, producing high-quality approximate geodesics efficiently.

Template Parameters
ScalarMesh scalar type.
IndexMesh index type.

Based on the following paper:

Sharp, Nicholas, and Keenan Crane. "You can find geodesic paths in triangle meshes by just flipping edges." ACM Transactions on Graphics (SIGGRAPH Asia 2020).

Constructor & Destructor Documentation

◆ GeodesicEngineFlip()

template<typename Scalar, typename Index>
GeodesicEngineFlip ( Mesh & mesh,
const Options & options = {} )
explicit

Precompute any data required for repeated geodesic path computation.

Parameters
meshReference to the input mesh.
optionsOptions for the flip geodesic engine.

Member Function Documentation

◆ single_source_geodesic()

template<typename Scalar, typename Index>
SingleSourceGeodesicResult single_source_geodesic ( const SingleSourceGeodesicOptions & options)
overridevirtual
Note
Single source geodesic is not supported by this engine. Use GeodesicEngineHeat or GeodesicEngineMMP instead.
Exceptions
lagrange::Erroralways.

Implements GeodesicEngine< Scalar, Index >.

◆ point_to_point_geodesic()

template<typename Scalar, typename Index>
Scalar point_to_point_geodesic ( const PointToPointGeodesicOptions & options)
overridevirtual

Compute the geodesic distance between two points using the edge-flip method.

Note
The source and target points are snapped to the nearest mesh vertex before computing the geodesic. This is a limitation of the flip-based algorithm.
Parameters
optionsThe options for the computation.
Returns
The geodesic distance between the source and target points.

Reimplemented from GeodesicEngine< Scalar, Index >.

◆ point_to_point_geodesic_path()

template<typename Scalar, typename Index>
GeodesicPathResult< Scalar, Index > point_to_point_geodesic_path ( const PointToPointGeodesicPathOptions & options)
overridevirtual

Compute the geodesic path between two points using the edge-flip method.

This function finds a geodesic path by first computing a Dijkstra path between the two closest mesh vertices, then iteratively shortening it via edge flips until the path is locally shortest.

Note
The source and target points are snapped to the nearest mesh vertex before computing the geodesic. This is a limitation of the flip-based algorithm.
Parameters
optionsThe options for the path computation.
Returns
A GeodesicPathResult containing the ordered path points and segment facet indices. Returns an empty result if no path exists.

Reimplemented from GeodesicEngine< Scalar, Index >.


The documentation for this class was generated from the following files: