Lagrange
|
Mesh subdivision options. More...
#include <lagrange/subdivision/mesh_subdivision.h>
Public Attributes | |
General Options | |
std::optional< SchemeType > | scheme |
Subvision scheme. More... | |
unsigned | num_levels = 1 |
Number of subdivision level requested. | |
RefinementType | refinement = RefinementType::Uniform |
How to refine the mesh topology. | |
Adaptive tessellation options | |
std::optional< float > | max_edge_length |
Maximum edge length for adaptive tessellation. More... | |
Interpolation Rules | |
VertexBoundaryInterpolation | vertex_boundary_interpolation |
Vertex boundary interpolation rule. More... | |
FaceVaryingInterpolation | face_varying_interpolation = FaceVaryingInterpolation::None |
Face-varying interpolation rule. | |
bool | use_limit_surface = false |
Interpolate all data to the limit surface. | |
Input Attributes To Interpolate | |
InterpolatedAttributes | interpolated_attributes |
List of attributes to interpolate. More... | |
Input Element Tags | |
std::optional< AttributeId > | edge_sharpness_attr |
Per-edge scalar attribute denoting edge sharpness. More... | |
std::optional< AttributeId > | vertex_sharpness_attr |
Per-vertex scalar attribute denoting vertex sharpness (e.g. More... | |
std::optional< AttributeId > | face_hole_attr |
Per-face integer attribute denoting face holes. More... | |
Output Attributes | |
bool | preserve_shared_indices = false |
[Adaptive subdivision only] Whether to preserve shared indices when interpolating indexed attributes. More... | |
std::string_view | output_limit_normals |
A newly computed per-vertex attribute containing the normals to the limit surface. More... | |
std::string_view | output_limit_tangents |
A newly computed per-vertex attribute containing the tangents (first derivatives) to the limit surface. More... | |
std::string_view | output_limit_bitangents |
A newly computed per-vertex attribute containing the bitangents (second derivative) to the limit surface. More... | |
Debugging options | |
bool | validate_topology = false |
Validate topology of the subdivision surface. More... | |
Mesh subdivision options.
std::optional<SchemeType> scheme |
Subvision scheme.
If not provided, will use Loop for triangle meshes, and CatmullCark for quad-dominant meshes.
std::optional<float> max_edge_length |
Maximum edge length for adaptive tessellation.
If not specified, it is set to the longest edge length divided by num_levels.
VertexBoundaryInterpolation vertex_boundary_interpolation |
Vertex boundary interpolation rule.
InterpolatedAttributes interpolated_attributes |
List of attributes to interpolate.
The selection can be either all (default), none, or specify a list of attribute ids to interpolate.
std::optional<AttributeId> edge_sharpness_attr |
Per-edge scalar attribute denoting edge sharpness.
Sharpness values must be in [0, 1] (0 means smooth, 1 means sharp).
std::optional<AttributeId> vertex_sharpness_attr |
Per-vertex scalar attribute denoting vertex sharpness (e.g.
for boundary corners). Sharpness values must be in [0, 1] (0 means smooth, 1 means sharp).
std::optional<AttributeId> face_hole_attr |
Per-face integer attribute denoting face holes.
A non-zero value means the facet is a hole. If a face is tagged as a hole, the limit surface will not be generated for that face.
bool preserve_shared_indices = false |
[Adaptive subdivision only] Whether to preserve shared indices when interpolating indexed attributes.
Turn this off if your input UVs are overlapping, or the output UVs will not be correctly interpolated.
std::string_view output_limit_normals |
A newly computed per-vertex attribute containing the normals to the limit surface.
Skipped if left empty.
std::string_view output_limit_tangents |
A newly computed per-vertex attribute containing the tangents (first derivatives) to the limit surface.
Skipped if left empty.
std::string_view output_limit_bitangents |
A newly computed per-vertex attribute containing the bitangents (second derivative) to the limit surface.
Skipped if left empty.
bool validate_topology = false |
Validate topology of the subdivision surface.
For debugging only.