14#ifdef LAGRANGE_ENABLE_LEGACY_FUNCTIONS
15 #include <lagrange/legacy/compute_normal.h>
18#include <lagrange/NormalWeightingType.h>
19#include <lagrange/SurfaceMesh.h>
20#include <lagrange/utils/function_ref.h>
21#include <lagrange/utils/span.h>
73template <
typename Scalar,
typename Index>
78 NormalOptions options = {});
96template <
typename Scalar,
typename Index>
98 SurfaceMesh<Scalar, Index>& mesh,
100 span<const Index> cone_vertices = {},
101 NormalOptions options = {});
120template <
typename Scalar,
typename Index>
122 SurfaceMesh<Scalar, Index>& mesh,
123 Scalar feature_angle_threshold,
124 span<const Index> cone_vertices = {},
125 NormalOptions options = {});
A lightweight non-owning reference to a callable.
Definition: function_ref.h:47
uint32_t AttributeId
Identified to be used to access an attribute.
Definition: AttributeFwd.h:73
AttributeId compute_normal(SurfaceMesh< Scalar, Index > &mesh, function_ref< bool(Index)> is_edge_smooth, span< const Index > cone_vertices={}, NormalOptions options={})
Compute smooth normals based on specified sharp edges and cone vertices.
Definition: compute_normal.cpp:192
NormalWeightingType
Weighting types for averaging corner normals around a vertex.
Definition: NormalWeightingType.h:27
@ Angle
Incident face normals are averaged weighted by incident angle of vertex.
function_ref(R(*)(Args...)) -> function_ref< R(Args...)>
Deduce function_ref type from a function pointer.
::nonstd::span< T, Extent > span
A bounds-safe view for sequences of objects.
Definition: span.h:27
Main namespace for Lagrange.
Definition: AABBIGL.h:30
Option struct for computing indexed mesh normals.
Definition: compute_normal.h:39
bool keep_facet_normals
Whether to keep any newly added facet normal attribute.
Definition: compute_normal.h:55
std::string_view facet_normal_attribute_name
Precomputed facet normal attribute name.
Definition: compute_normal.h:48
bool recompute_facet_normals
Whether to recompute the facet normal attribute, or reuse existing cached values if present.
Definition: compute_normal.h:51
std::string_view output_attribute_name
Output normal attribute name.
Definition: compute_normal.h:41
NormalWeightingType weight_type
Per-vertex normal averaging weighting type.
Definition: compute_normal.h:44