[][src]Struct luminance::tess::TessSlice

pub struct TessSlice<'a> { /* fields omitted */ }

Tessellation slice.

This type enables slicing a tessellation on the fly so that we can render patches of it. Typically, you can obtain a slice by using the TessSliceIndex trait (the TessSliceIndex::slice method) and combining it with some Rust range operators, such as .. or ..=.

Methods

impl<'a> TessSlice<'a>[src]

pub fn one_whole(tess: &'a Tess) -> Self[src]

Create a tessellation render that will render the whole input tessellation with only one instance.

pub fn one_sub(tess: &'a Tess, vert_nb: usize) -> Self[src]

Create a tessellation render for a part of the tessellation starting at the beginning of its buffer with only one instance.

The part is selected by giving the number of vertices to render.

Note: if you also need to use an arbitrary part of your tessellation (not starting at the first vertex in its buffer), have a look at TessSlice::one_slice.

Panic

Panic if the number of vertices is higher to the capacity of the tessellation’s vertex buffer.

pub fn one_slice(tess: &'a Tess, start: usize, nb: usize) -> Self[src]

Create a tessellation render for a slice of the tessellation starting anywhere in its buffer with only one instance.

The part is selected by giving the start vertex and the number of vertices to render. This

Panic

Panic if the start vertex is higher to the capacity of the tessellation’s vertex buffer.

Panic if the number of vertices is higher to the capacity of the tessellation’s vertex buffer.

pub fn render<C>(&self, ctx: &mut C) where
    C: GraphicsContext
[src]

Render a tessellation.

Trait Implementations

impl<'a> Clone for TessSlice<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> From<&'a Tess> for TessSlice<'a>[src]

Auto Trait Implementations

impl<'a> !Send for TessSlice<'a>

impl<'a> Unpin for TessSlice<'a>

impl<'a> !Sync for TessSlice<'a>

impl<'a> !UnwindSafe for TessSlice<'a>

impl<'a> !RefUnwindSafe for TessSlice<'a>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> 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]