[][src]Trait luminance::tess::TessSliceIndex

pub trait TessSliceIndex<Idx> {
    fn slice(&self, idx: Idx) -> TessSlice;
fn inst_slice(&self, idx: Idx, inst_nb: usize) -> TessSlice; }

The Tess slice index feature.

That trait allows to use the syntax tess.slice(_) where _ is one of Rust range operators:

  • .. for the whole range.
  • a .. b for a sub-range, excluding the right part.
  • a ..= b for a sub-range, including the right part.
  • a .. for a sub-range open on the right part.
  • .. b for a sub-range open on the left part and excluding the right part.
  • `..= b for a sub-range open on the left part and including the right part.

It’s technically possible to add any kind of index type, even though not really useful so far.

Additionally, you can use the tess.inst_slice(range, inst_nb) construct to also specify the render should be performed with inst_nb instances.

Required methods

fn slice(&self, idx: Idx) -> TessSlice

Slice a tesselation object and yields a TessSlice according to the index range.

fn inst_slice(&self, idx: Idx, inst_nb: usize) -> TessSlice

Slice a tesselation object and yields a TessSlice according to the index range with as many instances as specified.

Loading content...

Implementors

impl TessSliceIndex<Range<usize>> for Tess[src]

impl TessSliceIndex<RangeFrom<usize>> for Tess[src]

impl TessSliceIndex<RangeFull> for Tess[src]

impl TessSliceIndex<RangeInclusive<usize>> for Tess[src]

impl TessSliceIndex<RangeTo<usize>> for Tess[src]

impl TessSliceIndex<RangeToInclusive<usize>> for Tess[src]

Loading content...