Trait WaveFrontCompatible

Source
pub trait WaveFrontCompatible<'a> {
    type Scalar: Float + Debug + AddAssign + Display;

    // Required methods
    fn pos_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>;
    fn uv_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 2]>;
    fn norm_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>;
    fn segment_iterator(&'a self) -> impl Iterator<Item = [usize; 2]>;
    fn pos_index_iterator(
        &'a self,
    ) -> impl Iterator<Item = impl Iterator<Item = usize>>;
    fn uv_index_iterator(
        &'a self,
    ) -> impl Iterator<Item = impl Iterator<Item = usize>>;
    fn norm_index_iterator(
        &'a self,
    ) -> impl Iterator<Item = impl Iterator<Item = usize>>;
}
Expand description

Trait needed to export a mesh representation as an obj file (only geometry information). very useful for inspecting meshes.

Required Associated Types§

Source

type Scalar: Float + Debug + AddAssign + Display

Underlying scalar representation for vector data, usually f32 or f64.

Required Methods§

Source

fn pos_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

A way to iterate over the vertex positions.

Source

fn uv_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 2]>

A way to iterate over the texture coordinates.

Source

fn norm_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

A way to iterate over the norms.

Source

fn segment_iterator(&'a self) -> impl Iterator<Item = [usize; 2]>

A way to iterate over the lines/segments.

Source

fn pos_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

A way to iterate over the vertex topology.

Source

fn uv_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

A way to iterate over the uv topology.

Source

fn norm_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

A way to iterate over the normal topology.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, V, S> WaveFrontCompatible<'a> for (&Vec<V>, &Vec<usize>)
where V: VectorSpace<Scalar = S>, S: Float + AddAssign + Display + Debug,

Source§

type Scalar = S

Source§

fn pos_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn uv_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 2]>

Source§

fn norm_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn segment_iterator(&'a self) -> impl Iterator<Item = [usize; 2]>

Source§

fn pos_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn uv_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn norm_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

impl<'a, V, S> WaveFrontCompatible<'a> for (Vec<V>, Vec<usize>)
where V: VectorSpace<Scalar = S>, S: Float + AddAssign + Display + Debug,

Source§

type Scalar = S

Source§

fn pos_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn uv_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 2]>

Source§

fn norm_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn segment_iterator(&'a self) -> impl Iterator<Item = [usize; 2]>

Source§

fn pos_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn uv_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn norm_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

impl<'a, V, S> WaveFrontCompatible<'a> for Vec<V>
where V: VectorSpace<Scalar = S>, S: Float + AddAssign + Display + Debug,

Source§

type Scalar = S

Source§

fn pos_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn uv_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 2]>

Source§

fn norm_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn segment_iterator(&'a self) -> impl Iterator<Item = [usize; 2]>

Source§

fn pos_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn uv_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn norm_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

impl<'a, V, S, I> WaveFrontCompatible<'a> for (&Vec<V>, &Vec<[I; 2]>)
where V: VectorSpace<Scalar = S>, S: Float + AddAssign + Display + Debug, usize: TryFrom<I>, I: PrimInt + Display,

Source§

type Scalar = S

Source§

fn pos_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn uv_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 2]>

Source§

fn norm_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn segment_iterator(&'a self) -> impl Iterator<Item = [usize; 2]>

Source§

fn pos_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn uv_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn norm_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

impl<'a, V, S, I> WaveFrontCompatible<'a> for (&Vec<V>, &Vec<Vec<I>>)
where V: VectorSpace<Scalar = S>, S: Float + AddAssign + Display + Debug, usize: TryFrom<I>, I: PrimInt + Display,

Source§

type Scalar = S

Source§

fn pos_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn uv_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 2]>

Source§

fn norm_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn segment_iterator(&'a self) -> impl Iterator<Item = [usize; 2]>

Source§

fn pos_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn uv_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn norm_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

impl<'a, V, S, I> WaveFrontCompatible<'a> for (Vec<V>, Vec<[I; 2]>)
where V: VectorSpace<Scalar = S>, S: Float + AddAssign + Display + Debug, usize: TryFrom<I>, I: PrimInt + Display,

Source§

type Scalar = S

Source§

fn pos_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn uv_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 2]>

Source§

fn norm_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn segment_iterator(&'a self) -> impl Iterator<Item = [usize; 2]>

Source§

fn pos_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn uv_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn norm_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

impl<'a, V, S, I> WaveFrontCompatible<'a> for (Vec<V>, Vec<Vec<I>>)
where V: VectorSpace<Scalar = S>, S: Float + AddAssign + Display + Debug, usize: TryFrom<I>, I: PrimInt + Display,

Source§

type Scalar = S

Source§

fn pos_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn uv_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 2]>

Source§

fn norm_iterator(&'a self) -> impl Iterator<Item = [Self::Scalar; 3]>

Source§

fn segment_iterator(&'a self) -> impl Iterator<Item = [usize; 2]>

Source§

fn pos_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn uv_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Source§

fn norm_index_iterator( &'a self, ) -> impl Iterator<Item = impl Iterator<Item = usize>>

Implementors§