[][src]Struct lyon_tessellation::BuffersBuilder

pub struct BuffersBuilder<'l, OutputVertex: 'l, OutputIndex: 'l, 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 OutputVertex. If your logic generates the actual vertex type directly, you can use the SimpleBuffersBuilder convenience typedef.

Implementations

impl<'l, OutputVertex: 'l, OutputIndex: 'l, Ctor> BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor>[src]

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

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

Trait Implementations

impl<'l, OutputVertex, OutputIndex, Ctor> BasicGeometryBuilder for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor> where
    OutputVertex: 'l,
    OutputIndex: Add + From<VertexId> + MaxIndex,
    Ctor: BasicVertexConstructor<OutputVertex>, 
[src]

impl<'l, OutputVertex, OutputIndex, Ctor> FillGeometryBuilder for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor> where
    OutputVertex: 'l,
    OutputIndex: Add + From<VertexId> + MaxIndex,
    Ctor: FillVertexConstructor<OutputVertex>, 
[src]

impl<'l, OutputVertex, OutputIndex, Ctor> GeometryBuilder for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor> where
    OutputVertex: 'l,
    OutputIndex: Add + From<VertexId> + MaxIndex
[src]

impl<'l, OutputVertex, OutputIndex, Ctor> GeometryReceiver for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor> where
    OutputIndex: From<VertexId>,
    Ctor: BasicVertexConstructor<OutputVertex>, 
[src]

impl<'l, OutputVertex, OutputIndex, Ctor> StrokeGeometryBuilder for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor> where
    OutputVertex: 'l,
    OutputIndex: Add + From<VertexId> + MaxIndex,
    Ctor: StrokeVertexConstructor<OutputVertex>, 
[src]

Auto Trait Implementations

impl<'l, OutputVertex, OutputIndex, Ctor> RefUnwindSafe for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor> where
    Ctor: RefUnwindSafe,
    OutputIndex: RefUnwindSafe,
    OutputVertex: RefUnwindSafe

impl<'l, OutputVertex, OutputIndex, Ctor> Send for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor> where
    Ctor: Send,
    OutputIndex: Send,
    OutputVertex: Send

impl<'l, OutputVertex, OutputIndex, Ctor> Sync for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor> where
    Ctor: Sync,
    OutputIndex: Sync,
    OutputVertex: Sync

impl<'l, OutputVertex, OutputIndex, Ctor> Unpin for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor> where
    Ctor: Unpin

impl<'l, OutputVertex, OutputIndex, Ctor> !UnwindSafe for BuffersBuilder<'l, OutputVertex, OutputIndex, Ctor>

Blanket Implementations

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

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

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

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.