14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/geodesic/api.h>
19namespace lagrange::geodesic {
38 std::array<double, 3>
ref_dir = {0.0f, 1.0f, 0.0f};
101template <
typename Scalar,
typename Index>
142 const Mesh& mesh()
const {
return m_mesh.get(); }
143 Mesh& mesh() {
return m_mesh.get(); }
146 std::reference_wrapper<Mesh> m_mesh;
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:66
virtual ~GeodesicEngine()=default
Base class destructor.
virtual SingleSourceGeodesicResult single_source_geodesic(const SingleSourceGeodesicOptions &options)=0
Computes geodesic distance from one source to each vertex on the mesh.
GeodesicEngine(Mesh &mesh)
Base class constructor.
Definition GeodesicEngine.cpp:20
SurfaceMesh< Scalar, Index > Mesh
The mesh type.
Definition GeodesicEngine.h:106
virtual Scalar point_to_point_geodesic(const PointToPointGeodesicOptions &options)
Computes the geodesic distance between two points on the mesh.
Definition GeodesicEngine.cpp:33
uint32_t AttributeId
Identified to be used to access an attribute.
Definition AttributeFwd.h:73
constexpr AttributeId invalid_attribute_id()
Invalid attribute id.
Definition AttributeFwd.h:76
@ Scalar
Mesh attribute must have exactly 1 channel.
Definition AttributeFwd.h:56
General options for point-to-point geodesic computations.
Definition GeodesicEngine.h:77
std::array< double, 2 > target_facet_bc
Barycentric coordinates of the target point within the target facet.
Definition GeodesicEngine.h:92
size_t target_facet_id
Facets containing the target point.
Definition GeodesicEngine.h:82
std::array< double, 2 > source_facet_bc
Barycentric coordinates of the source point within the source facet.
Definition GeodesicEngine.h:87
size_t source_facet_id
Facet containing the source point.
Definition GeodesicEngine.h:79
General options for one-to-many geodesic computations.
Definition GeodesicEngine.h:25
std::array< double, 3 > second_ref_dir
The secondary reference up direction for the geodesic polar coordinates.
Definition GeodesicEngine.h:44
std::string_view output_geodesic_attribute_name
The name of the output attribute to store the geodesic distance.
Definition GeodesicEngine.h:55
double radius
The maximum geodesic distance from the seed point to consider.
Definition GeodesicEngine.h:52
std::array< double, 2 > source_facet_bc
The barycentric coordinates of the seed facet.
Definition GeodesicEngine.h:32
size_t source_facet_id
The facet id of the seed facet.
Definition GeodesicEngine.h:27
std::array< double, 3 > ref_dir
The reference up direction for the geodesic polar coordinates.
Definition GeodesicEngine.h:38
std::string_view output_polar_angle_attribute_name
The name of the output attribute to store the geodesic polar coordinates.
Definition GeodesicEngine.h:58
Result of a single source geodesic computation.
Definition GeodesicEngine.h:65
AttributeId polar_angle_id
The attribute id of the polar angle attribute, if available.
Definition GeodesicEngine.h:70
AttributeId geodesic_distance_id
The attribute id of the geodesic distance attribute.
Definition GeodesicEngine.h:67