pub struct ParseOptions {
pub curve_tessellation_samples: u32,
}Expand description
Parser configuration knobs.
The default leaves free-form geometry as captured-only extras
(back-compatible with rounds 1-6). Set
ParseOptions::curve_tessellation_samples to a non-zero value
to enable evaluation of cstype bezier / cstype bspline
(rational + non-rational) curves into real LineStrip primitives
(see crate::ObjDecoder::with_curve_tessellation).
Fields§
§curve_tessellation_samples: u32When > 0, every curv directive under an active cstype bezier
/ cstype rat bezier / cstype bspline / cstype rat bspline
header is evaluated at curve_tessellation_samples + 1
uniformly-spaced parameter values. The resulting polyline lands
on a synthetic mesh named "obj:curves" whose primitives carry
Topology::LineStrip. The directive itself is still preserved
in Scene3D::extras["obj:freeform_directives"] so a round-trip
re-emit produces the same free-form section — downstream
consumers can opt out of the synthetic mesh by filtering on
Primitive::extras["obj:tessellated_curve"] == true.
B-spline curves additionally require a valid parm u knot
vector (length must equal control-point count + degree + 1 per
spec §“B-spline” condition 6); curves with an incomplete knot
vector are skipped silently.
0 disables tessellation (the default; back-compat with r1-r6).
Trait Implementations§
Source§impl Clone for ParseOptions
impl Clone for ParseOptions
Source§fn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more