#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
pub enum VtxBoundaryInterpolation {
None,
#[default]
EdgeOnly,
EdgeAndCorner,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
pub enum FVarLinearInterpolation {
None,
#[default]
CornersOnly,
CornersPlus1,
CornersPlus2,
Boundaries,
All,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
pub enum CreasingMethod {
#[default]
Uniform,
Chaikin,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
pub enum TriangleSubdivision {
#[default]
Catmark,
Smooth,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
pub struct Options {
pub vtx_boundary_interpolation: VtxBoundaryInterpolation,
pub fvar_linear_interpolation: FVarLinearInterpolation,
pub creasing_method: CreasingMethod,
pub triangle_subdivision: TriangleSubdivision,
}
impl Options {
pub fn new() -> Self {
Self::default()
}
pub fn with_vtx_boundary_interpolation(mut self, v: VtxBoundaryInterpolation) -> Self {
self.vtx_boundary_interpolation = v;
self
}
pub fn with_fvar_linear_interpolation(mut self, v: FVarLinearInterpolation) -> Self {
self.fvar_linear_interpolation = v;
self
}
pub fn with_creasing_method(mut self, v: CreasingMethod) -> Self {
self.creasing_method = v;
self
}
pub fn with_triangle_subdivision(mut self, v: TriangleSubdivision) -> Self {
self.triangle_subdivision = v;
self
}
}