Struct luminance::tess::Tess [−][src]
pub struct Tess<B, V, I = (), W = (), S = Interleaved> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized, { /* fields omitted */ }
Expand description
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 with a 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, V, I, W, S> Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
impl<B, V, I, W, S> Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
Default number of vertices to render.
This number represents the number of vertices that will be rendered when not explicitly asked to render a given amount of vertices.
Default number of vertex instances to render.
This number represents the number of vertex instances that will be rendered when not explicitly asked to render a given amount of instances.
pub fn indices<'a>(
&'a mut self
) -> Result<Indices<'a, B, V, I, W, S>, TessMapError> where
B: IndexSliceBackend<'a, V, I, W, S>,
pub fn indices<'a>(
&'a mut self
) -> Result<Indices<'a, B, V, I, W, S>, TessMapError> where
B: IndexSliceBackend<'a, V, I, W, S>,
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<'a>(
&'a mut self
) -> Result<IndicesMut<'a, B, V, I, W, S>, TessMapError> where
B: IndexSliceBackend<'a, V, I, W, S>,
pub fn indices_mut<'a>(
&'a mut self
) -> Result<IndicesMut<'a, B, V, I, W, S>, TessMapError> where
B: IndexSliceBackend<'a, V, I, W, S>,
Slice the Tess
in order to read its content via usual slices.
This method gives access to the underlying index storage.
impl<B, V, I, W> Tess<B, V, I, W, Interleaved> where
B: ?Sized + TessBackend<V, I, W, Interleaved>,
V: TessVertexData<Interleaved>,
I: TessIndex,
W: TessVertexData<Interleaved>,
impl<B, V, I, W> Tess<B, V, I, W, Interleaved> where
B: ?Sized + TessBackend<V, I, W, Interleaved>,
V: TessVertexData<Interleaved>,
I: TessIndex,
W: TessVertexData<Interleaved>,
pub fn vertices<'a>(
&'a mut self
) -> Result<Vertices<'a, B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSliceBackend<'a, V, I, W, Interleaved, V>,
pub fn vertices<'a>(
&'a mut self
) -> Result<Vertices<'a, B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSliceBackend<'a, V, I, W, Interleaved, V>,
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<'a>(
&'a mut self
) -> Result<VerticesMut<'a, B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSliceBackend<'a, V, I, W, Interleaved, V>,
pub fn vertices_mut<'a>(
&'a mut self
) -> Result<VerticesMut<'a, B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSliceBackend<'a, V, I, W, Interleaved, V>,
Slice the Tess
in order to read its content via usual slices.
This method gives access to the underlying vertex storage.
pub fn instances<'a>(
&'a mut self
) -> Result<Instances<'a, B, V, I, W, Interleaved, W>, TessMapError> where
B: InstanceSliceBackend<'a, V, I, W, Interleaved, W>,
pub fn instances<'a>(
&'a mut self
) -> Result<Instances<'a, B, V, I, W, Interleaved, W>, TessMapError> where
B: InstanceSliceBackend<'a, V, I, W, Interleaved, W>,
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<'a>(
&'a mut self
) -> Result<InstancesMut<'a, B, V, I, W, Interleaved, W>, TessMapError> where
B: InstanceSliceBackend<'a, V, I, W, Interleaved, W>,
pub fn instances_mut<'a>(
&'a mut self
) -> Result<InstancesMut<'a, B, V, I, W, Interleaved, W>, TessMapError> where
B: InstanceSliceBackend<'a, V, I, W, Interleaved, W>,
Slice the Tess
in order to read its content via usual slices.
This method gives access to the underlying instance storage.
impl<B, V, I, W> Tess<B, V, I, W, Deinterleaved> where
B: ?Sized + TessBackend<V, I, W, Deinterleaved>,
V: TessVertexData<Deinterleaved>,
I: TessIndex,
W: TessVertexData<Deinterleaved>,
impl<B, V, I, W> Tess<B, V, I, W, Deinterleaved> where
B: ?Sized + TessBackend<V, I, W, Deinterleaved>,
V: TessVertexData<Deinterleaved>,
I: TessIndex,
W: TessVertexData<Deinterleaved>,
pub fn vertices<'a, T>(
&'a mut self
) -> Result<Vertices<'a, B, V, I, W, Deinterleaved, T>, TessMapError> where
B: VertexSliceBackend<'a, V, I, W, Deinterleaved, T>,
V: Deinterleave<T>,
pub fn vertices<'a, T>(
&'a mut self
) -> Result<Vertices<'a, B, V, I, W, Deinterleaved, T>, TessMapError> where
B: VertexSliceBackend<'a, V, I, W, Deinterleaved, T>,
V: Deinterleave<T>,
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<'a, T>(
&'a mut self
) -> Result<VerticesMut<'a, B, V, I, W, Deinterleaved, T>, TessMapError> where
B: VertexSliceBackend<'a, V, I, W, Deinterleaved, T>,
V: Deinterleave<T>,
pub fn vertices_mut<'a, T>(
&'a mut self
) -> Result<VerticesMut<'a, B, V, I, W, Deinterleaved, T>, TessMapError> where
B: VertexSliceBackend<'a, V, I, W, Deinterleaved, T>,
V: Deinterleave<T>,
Slice the Tess
in order to read its content via usual slices.
This method gives access to the underlying vertex storage.
pub fn instances<'a, T>(
&'a mut self
) -> Result<Instances<'a, B, V, I, W, Deinterleaved, T>, TessMapError> where
B: InstanceSliceBackend<'a, V, I, W, Deinterleaved, T>,
W: Deinterleave<T>,
pub fn instances<'a, T>(
&'a mut self
) -> Result<Instances<'a, B, V, I, W, Deinterleaved, T>, TessMapError> where
B: InstanceSliceBackend<'a, V, I, W, Deinterleaved, T>,
W: Deinterleave<T>,
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<'a, T>(
&'a mut self
) -> Result<InstancesMut<'a, B, V, I, W, Deinterleaved, T>, TessMapError> where
B: InstanceSliceBackend<'a, V, I, W, Deinterleaved, T>,
W: Deinterleave<T>,
pub fn instances_mut<'a, T>(
&'a mut self
) -> Result<InstancesMut<'a, B, V, I, W, Deinterleaved, T>, TessMapError> where
B: InstanceSliceBackend<'a, V, I, W, Deinterleaved, T>,
W: Deinterleave<T>,
Slice the Tess
in order to read its content via usual slices.
This method gives access to the underlying instance storage.
Trait Implementations
impl<'a, B, V, I, W, S> From<&'a Tess<B, V, I, W, S>> for TessView<'a, B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
impl<'a, B, V, I, W, S> From<&'a Tess<B, V, I, W, S>> for TessView<'a, B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, Range<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, Range<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
Slice a tessellation object and yields a TessView
according to the index range.
impl<B, V, I, W, S> View<B, V, I, W, S, RangeFrom<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeFrom<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
Slice a tessellation object and yields a TessView
according to the index range.
impl<B, V, I, W, S> View<B, V, I, W, S, RangeFull> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeFull> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
Slice a tessellation object and yields a TessView
according to the index range.
impl<B, V, I, W, S> View<B, V, I, W, S, RangeInclusive<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeInclusive<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
fn view(
&self,
range: RangeInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
fn view(
&self,
range: RangeInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
Slice a tessellation object and yields a TessView
according to the index range.
fn inst_view(
&self,
range: RangeInclusive<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
fn inst_view(
&self,
range: RangeInclusive<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
impl<B, V, I, W, S> View<B, V, I, W, S, RangeTo<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeTo<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
Slice a tessellation object and yields a TessView
according to the index range.
impl<B, V, I, W, S> View<B, V, I, W, S, RangeToInclusive<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeToInclusive<usize>> for Tess<B, V, I, W, S> where
B: ?Sized + TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
fn view(
&self,
to: RangeToInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
fn view(
&self,
to: RangeToInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
Slice a tessellation object and yields a TessView
according to the index range.