[][src]Struct plexus::primitive::generate::Normal

pub struct Normal<S = ()> { /* fields omitted */ }

Meta-attribute for surface normals.

Describes the surface normals of a polytope. The generated data is derived from the type parameter S, which typically requires EuclideanSpace.

Examples

Generating raw buffers with normal data for a sphere:

use decorum::N64;
use nalgebra::Point3;
use plexus::index::{Flat3, HashIndexer};
use plexus::prelude::*;
use plexus::primitive::generate::Normal;
use plexus::primitive::sphere::UvSphere;

let (indices, normals) = UvSphere::new(8, 8)
    .polygons::<Normal<Point3<N64>>>()
    .map_vertices(|normal| normal.into_inner())
    .triangulate()
    .index_vertices::<Flat3, _>(HashIndexer::default());

Trait Implementations

impl<S> Attribute for Normal<S>[src]

impl<S> AttributeGenerator<Normal<S>> for Cube where
    S: EuclideanSpace + FiniteDimensional<N = U3>, 
[src]

type State = ()

impl<S> AttributeGenerator<Normal<S>> for UvSphere where
    S: EuclideanSpace + FiniteDimensional<N = U3>, 
[src]

type State = ()

impl<S> AttributePolygonGenerator<Normal<S>> for Cube where
    S: EuclideanSpace + FiniteDimensional<N = U3>, 
[src]

type Output = Tetragon<Unit<Vector<S>>>

impl<S> AttributePolygonGenerator<Normal<S>> for UvSphere where
    S: EuclideanSpace + FiniteDimensional<N = U3>,
    Scalar<S>: FloatConst
[src]

type Output = Polygon<Unit<Vector<S>>>

impl<S> AttributeVertexGenerator<Normal<S>> for Cube where
    S: EuclideanSpace + FiniteDimensional<N = U3>, 
[src]

type Output = Unit<Vector<S>>

impl<S> AttributeVertexGenerator<Normal<S>> for UvSphere where
    S: EuclideanSpace + FiniteDimensional<N = U3>,
    Scalar<S>: FloatConst
[src]

type Output = Unit<Vector<S>>

impl<S> IndexingPolygonGenerator<Normal<S>> for Cube[src]

type Output = Tetragon<usize>

impl<S> IndexingPolygonGenerator<Normal<S>> for UvSphere[src]

type Output = Polygon<usize>

Auto Trait Implementations

impl<S> Send for Normal<S> where
    S: Send

impl<S> Sync for Normal<S> where
    S: Sync

impl<S> Unpin for Normal<S> where
    S: Unpin

impl<S> UnwindSafe for Normal<S> where
    S: UnwindSafe

impl<S> RefUnwindSafe for Normal<S> where
    S: RefUnwindSafe

Blanket Implementations

impl<T> FromGeometry<T> for T[src]

impl<T, U> IntoGeometry<U> for T where
    U: FromGeometry<T>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,