[][src]Struct lyon_tessellation::geometry_builder::BuffersBuilder

pub struct BuffersBuilder<'l, VertexType: 'l, IndexType: 'l, Input, Ctor> { /* fields omitted */ }

A temporary view on a VertexBuffers object which facilitate the population of vertex and index data.

BuffersBuilders record the vertex offset from when they are created so that algorithms using them don't need to worry about offsetting indices if some geometry was added beforehand. This means that from the point of view of a BuffersBuilder user, the first added vertex is at always offset at the offset 0 and VertexBuilder takes care of translating indices adequately.

Often, algorithms are built to generate vertex positions without knowledge of eventual other vertex attributes. The VertexConstructor does the translation from generic Input to VertexType. If your logic generates the actual vertex type directly, you can use the SimpleBuffersBuilder convenience typedef.

Methods

impl<'l, VertexType: 'l, IndexType: 'l, Input, Ctor> BuffersBuilder<'l, VertexType, IndexType, Input, Ctor>[src]

pub fn new(
    buffers: &'l mut VertexBuffers<VertexType, IndexType>,
    ctor: Ctor
) -> Self
[src]

pub fn buffers<'a, 'b: 'a>(&'b self) -> &'a VertexBuffers<VertexType, IndexType>[src]

Trait Implementations

impl<'l, VertexType, IndexType, Input, Ctor> GeometryBuilder<Input> for BuffersBuilder<'l, VertexType, IndexType, Input, Ctor> where
    VertexType: 'l + Clone,
    IndexType: Add + From<VertexId> + MaxIndex,
    Ctor: VertexConstructor<Input, VertexType>, 
[src]

impl<'l, VertexType, IndexType, InputVertex, Ctor> GeometryReceiver<InputVertex> for BuffersBuilder<'l, VertexType, IndexType, InputVertex, Ctor> where
    VertexType: 'l + Clone,
    IndexType: From<VertexId>,
    Ctor: VertexConstructor<InputVertex, VertexType>,
    InputVertex: Clone
[src]

Auto Trait Implementations

impl<'l, VertexType, IndexType, Input, Ctor> Sync for BuffersBuilder<'l, VertexType, IndexType, Input, Ctor> where
    Ctor: Sync,
    IndexType: Sync,
    Input: Sync,
    VertexType: Sync

impl<'l, VertexType, IndexType, Input, Ctor> Send for BuffersBuilder<'l, VertexType, IndexType, Input, Ctor> where
    Ctor: Send,
    IndexType: Send,
    Input: Send,
    VertexType: Send

impl<'l, VertexType, IndexType, Input, Ctor> Unpin for BuffersBuilder<'l, VertexType, IndexType, Input, Ctor> where
    Ctor: Unpin,
    Input: Unpin

impl<'l, VertexType, IndexType, Input, Ctor> RefUnwindSafe for BuffersBuilder<'l, VertexType, IndexType, Input, Ctor> where
    Ctor: RefUnwindSafe,
    IndexType: RefUnwindSafe,
    Input: RefUnwindSafe,
    VertexType: RefUnwindSafe

impl<'l, VertexType, IndexType, Input, Ctor> !UnwindSafe for BuffersBuilder<'l, VertexType, IndexType, Input, Ctor>

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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