Skip to main content

ParseOptions

Struct ParseOptions 

Source
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: u32

When > 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

Source§

fn clone(&self) -> ParseOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParseOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ParseOptions

Source§

fn default() -> ParseOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.