[−][src]Struct luminance::tess::TessSlice
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]
C: GraphicsContext,
Render a tessellation.
Trait Implementations
impl<'a> Clone for TessSlice<'a>
[src]
fn clone(&self) -> 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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,