Struct luminance::tess::TessSlice [−][src]
pub struct TessSlice<'a, V> where
V: 'a, { /* fields omitted */ }
Tessellation slice.
This type enables slicing a tessellation on the fly so that we can render patches of it.
Methods
impl<'a, V> TessSlice<'a, V>
[src]
impl<'a, V> TessSlice<'a, V>
pub fn one_whole(tess: &'a Tess<V>) -> Self
[src]
pub fn one_whole(tess: &'a Tess<V>) -> Self
Create a tessellation render that will render the whole input tessellation with only one instance.
pub fn one_sub(tess: &'a Tess<V>, vert_nb: usize) -> Self
[src]
pub fn one_sub(tess: &'a Tess<V>, vert_nb: usize) -> Self
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<V>, start: usize, nb: usize) -> Self
[src]
pub fn one_slice(tess: &'a Tess<V>, start: usize, nb: usize) -> Self
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,
V: Vertex,
[src]
pub fn render<C>(&self, ctx: &mut C) where
C: GraphicsContext,
V: Vertex,
Render a tessellation.
Trait Implementations
impl<'a, V: Clone> Clone for TessSlice<'a, V> where
V: 'a,
[src]
impl<'a, V: Clone> Clone for TessSlice<'a, V> where
V: 'a,
fn clone(&self) -> TessSlice<'a, V>
[src]
fn clone(&self) -> TessSlice<'a, V>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a, V> From<&'a Tess<V>> for TessSlice<'a, V>
[src]
impl<'a, V> From<&'a Tess<V>> for TessSlice<'a, V>