[][src]Struct luminance::tess::Tess

pub struct Tess<B: ?Sized, V, I = (), W = (), S = Interleaved> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: ?Sized
{ /* fields omitted */ }

A GPU vertex set.

Vertex set are the only way to represent space data. The dimension you choose is up to you, but people will typically want to represent objects in 2D or 3D. A vertex is a point in such space and it carries properties — called “vertex attributes”. Those attributes are completely free to use. They must, however, be compatible with the Semantics and Vertex traits.

Tess are built out of TessBuilder and can be sliced to edit their content in-line — by mapping the GPU memory region and access data via slices.

Implementations

impl<B: ?Sized, V, I, W, S> Tess<B, V, I, W, S> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: ?Sized
[src]

pub fn vert_nb(&self) -> usize[src]

Get the number of vertices.

pub fn inst_nb(&self) -> usize[src]

Get the number of indices.

pub fn indices(&mut self) -> Result<Indices<B, V, I, W, S>, TessMapError> where
    B: IndexSliceBackend<V, I, W, S>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying index storage.

pub fn indices_mut(&mut self) -> Result<IndicesMut<B, V, I, W, S>, TessMapError> where
    B: IndexSliceBackend<V, I, W, S>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying index storage.

impl<B: ?Sized, V, I, W> Tess<B, V, I, W, Interleaved> where
    B: TessBackend<V, I, W, Interleaved>,
    V: TessVertexData<Interleaved>,
    I: TessIndex,
    W: TessVertexData<Interleaved>, 
[src]

pub fn vertices(
    &mut self
) -> Result<Vertices<B, V, I, W, Interleaved, V>, TessMapError> where
    B: VertexSliceBackend<V, I, W, Interleaved, V>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying vertex storage.

pub fn vertices_mut(
    &mut self
) -> Result<VerticesMut<B, V, I, W, Interleaved, V>, TessMapError> where
    B: VertexSliceBackend<V, I, W, Interleaved, V>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying vertex storage.

pub fn instances(
    &mut self
) -> Result<Instances<B, V, I, W, Interleaved, V>, TessMapError> where
    B: InstanceSliceBackend<V, I, W, Interleaved, V>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying instance storage.

pub fn instances_mut(
    &mut self
) -> Result<InstancesMut<B, V, I, W, Interleaved, V>, TessMapError> where
    B: InstanceSliceBackend<V, I, W, Interleaved, V>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying instance storage.

impl<B: ?Sized, V, I, W> Tess<B, V, I, W, Deinterleaved> where
    B: TessBackend<V, I, W, Deinterleaved>,
    V: TessVertexData<Deinterleaved>,
    I: TessIndex,
    W: TessVertexData<Deinterleaved>, 
[src]

pub fn vertices<T>(
    &mut self
) -> Result<Vertices<B, V, I, W, Deinterleaved, T>, TessMapError> where
    B: VertexSliceBackend<V, I, W, Deinterleaved, T>,
    V: Deinterleave<T>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying vertex storage.

pub fn vertices_mut<T>(
    &mut self
) -> Result<VerticesMut<B, V, I, W, Deinterleaved, T>, TessMapError> where
    B: VertexSliceBackend<V, I, W, Deinterleaved, T>,
    V: Deinterleave<T>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying vertex storage.

pub fn instances<T>(
    &mut self
) -> Result<Instances<B, V, I, W, Deinterleaved, T>, TessMapError> where
    B: InstanceSliceBackend<V, I, W, Deinterleaved, T>,
    W: Deinterleave<T>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying instance storage.

pub fn instances_mut<T>(
    &mut self
) -> Result<InstancesMut<B, V, I, W, Deinterleaved, T>, TessMapError> where
    B: InstanceSliceBackend<V, I, W, Deinterleaved, T>,
    W: Deinterleave<T>, 
[src]

Slice the Tess in order to read its content via usual slices.

This method gives access to the underlying instance storage.

Trait Implementations

impl<B: Debug + ?Sized, V: Debug, I: Debug, W: Debug, S> Debug for Tess<B, V, I, W, S> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: Debug + ?Sized,
    B::TessRepr: Debug
[src]

impl<'a, B: ?Sized, V, I, W, S> From<&'a Tess<B, V, I, W, S>> for TessView<'a, B, V, I, W, S> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: ?Sized
[src]

impl<B: ?Sized, V, I, W, S> View<B, V, I, W, S, Range<usize>> for Tess<B, V, I, W, S> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: ?Sized
[src]

impl<B: ?Sized, V, I, W, S> View<B, V, I, W, S, RangeFrom<usize>> for Tess<B, V, I, W, S> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: ?Sized
[src]

impl<B: ?Sized, V, I, W, S> View<B, V, I, W, S, RangeFull> for Tess<B, V, I, W, S> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: ?Sized
[src]

impl<B: ?Sized, V, I, W, S> View<B, V, I, W, S, RangeInclusive<usize>> for Tess<B, V, I, W, S> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: ?Sized
[src]

impl<B: ?Sized, V, I, W, S> View<B, V, I, W, S, RangeTo<usize>> for Tess<B, V, I, W, S> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: ?Sized
[src]

impl<B: ?Sized, V, I, W, S> View<B, V, I, W, S, RangeToInclusive<usize>> for Tess<B, V, I, W, S> where
    B: TessBackend<V, I, W, S>,
    V: TessVertexData<S>,
    I: TessIndex,
    W: TessVertexData<S>,
    S: ?Sized
[src]

Auto Trait Implementations

impl<B: ?Sized, V, I, W, S: ?Sized> RefUnwindSafe for Tess<B, V, I, W, S> where
    S: RefUnwindSafe,
    <B as Tess<V, I, W, S>>::TessRepr: RefUnwindSafe

impl<B, V, I = (), W = (), S = Interleaved> !Send for Tess<B, V, I, W, S>

impl<B, V, I = (), W = (), S = Interleaved> !Sync for Tess<B, V, I, W, S>

impl<B: ?Sized, V, I, W, S: ?Sized> Unpin for Tess<B, V, I, W, S> where
    <B as Tess<V, I, W, S>>::TessRepr: Unpin

impl<B: ?Sized, V, I, W, S: ?Sized> UnwindSafe for Tess<B, V, I, W, S> where
    S: RefUnwindSafe,
    <B as Tess<V, I, W, S>>::TessRepr: UnwindSafe

Blanket Implementations

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

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

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

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.