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

Computes surface geodesics using the Discrete Geodesic Polar Coordinates (DGPC) method. More...

#include <lagrange/geodesic/GeodesicEngineDGPC.h>

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

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

 GeodesicEngineDGPC (Mesh &mesh)
 Precompute any data required for repeated geodesic distance computation.
 
virtual ~GeodesicEngineDGPC ()=default
 Destructor.
 
SingleSourceGeodesicResult single_source_geodesic (const SingleSourceGeodesicOptions &options) override
 Compute discrete geodesic polar coordinates for each vertex within the local neighborhood of seed point.
 
- Public Member Functions inherited from GeodesicEngine< Scalar, Index >
 GeodesicEngine (Mesh &mesh)
 Base class constructor.
 
virtual ~GeodesicEngine ()=default
 Base class destructor.
 
virtual Scalar point_to_point_geodesic (const PointToPointGeodesicOptions &options)
 Computes the geodesic distance between two points on the mesh.
 

Protected Attributes

AttributeId m_facet_normal_attr_id = invalid_attribute_id()
 Facet normal attribute id.
 

Additional Inherited Members

- Protected Member Functions inherited from GeodesicEngine< Scalar, Index >
const Meshmesh () const
 
Meshmesh ()
 

Detailed Description

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

Computes surface geodesics using the Discrete Geodesic Polar Coordinates (DGPC) method.

DGPC is fast and relatively accurate near the source point, but accuracy degrades with distance from the source.

Template Parameters
ScalarMesh scalar type.
IndexMesh index type.

Constructor & Destructor Documentation

◆ GeodesicEngineDGPC()

template<typename Scalar, typename Index>
GeodesicEngineDGPC ( Mesh & mesh)
explicit

Precompute any data required for repeated geodesic distance computation.

Parameters
meshReference to the input mesh.

Member Function Documentation

◆ single_source_geodesic()

template<typename Scalar, typename Index>
SingleSourceGeodesicResult single_source_geodesic ( const SingleSourceGeodesicOptions & options)
overridevirtual

Compute discrete geodesic polar coordinates for each vertex within the local neighborhood of seed point.

This function will create two new attributes in the mesh:

  • options.output_geodesic_attribute_name: The geodesic distance from the seed point to each vertex.
  • options.output_polar_angle_attribute_name: The geodesic polar coordinates of each vertex.

Together, they define a logarithmic map of the mesh around the seed point.

This function is roughly based on the following paper:

  • Melvær, Eivind Lyche, and Martin Reimers. "Geodesic polar coordinates on polygonal meshes." Computer Graphics Forum. Vol. 31. No. 8. Oxford, UK: Blackwell Publishing Ltd, 2012.
Parameters
optionsThe options for the computation.
Returns
The attribute ids of the geodesic distance and polar angle attributes.

Implements GeodesicEngine< Scalar, Index >.


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