[][src]Struct lyon_tessellation::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 VertexBuilfer 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> Send for BuffersBuilder<'l, VertexType, IndexType, Input, Ctor> where
    Ctor: Send,
    IndexType: Send,
    Input: Send,
    VertexType: Send

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

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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