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

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

Meta-attribute for positions.

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

Examples

Generating raw buffers with positional data for a cube:

use decorum::N64;
use nalgebra::Point3;
use plexus::index::{Flat3, HashIndexer};
use plexus::prelude::*;
use plexus::primitive::cube::Cube;
use plexus::primitive::generate::Position;
use plexus::primitive::Polygon;

let (indices, positions) = Cube::new()
    .polygons::<Position<Point3<N64>>>()
    .triangulate()
    .index_vertices::<Polygon<usize>, _>(HashIndexer::default());

Trait Implementations

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

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

type State = Bounds<S>

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

type State = Bounds<S>

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

type Output = Tetragon<S>

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

type Output = Polygon<S>

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

type Output = S

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

type Output = S

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

type Output = Tetragon<usize>

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

type Output = Polygon<usize>

Auto Trait Implementations

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

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

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

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

impl<S> RefUnwindSafe for Position<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>,