[−][src]Struct luminance::tess::Tess
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]
B: TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
pub fn vert_nb(&self) -> usize
[src]
Get the number of vertices.
pub fn inst_nb(&self) -> usize
[src]
Get the number of instances.
pub fn indices(&mut self) -> Result<Indices<B, V, I, W, S>, TessMapError> where
B: IndexSliceBackend<V, I, W, S>,
[src]
B: IndexSliceBackend<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(&mut self) -> Result<IndicesMut<B, V, I, W, S>, TessMapError> where
B: IndexSliceBackend<V, I, W, S>,
[src]
B: IndexSliceBackend<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: ?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]
B: TessBackend<V, I, W, Interleaved>,
V: TessVertexData<Interleaved>,
I: TessIndex,
W: TessVertexData<Interleaved>,
pub fn vertices(
&mut self
) -> Result<Vertices<B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSliceBackend<V, I, W, Interleaved, V>,
[src]
&mut self
) -> Result<Vertices<B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSliceBackend<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(
&mut self
) -> Result<VerticesMut<B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSliceBackend<V, I, W, Interleaved, V>,
[src]
&mut self
) -> Result<VerticesMut<B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSliceBackend<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(
&mut self
) -> Result<Instances<B, V, I, W, Interleaved, V>, TessMapError> where
B: InstanceSliceBackend<V, I, W, Interleaved, V>,
[src]
&mut self
) -> Result<Instances<B, V, I, W, Interleaved, V>, TessMapError> where
B: InstanceSliceBackend<V, I, W, Interleaved, V>,
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]
&mut self
) -> Result<InstancesMut<B, V, I, W, Interleaved, V>, TessMapError> where
B: InstanceSliceBackend<V, I, W, Interleaved, V>,
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]
B: TessBackend<V, I, W, Deinterleaved>,
V: TessVertexData<Deinterleaved>,
I: TessIndex,
W: TessVertexData<Deinterleaved>,
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]
&mut self
) -> Result<Vertices<B, V, I, W, Deinterleaved, T>, TessMapError> where
B: VertexSliceBackend<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<T>(
&mut self
) -> Result<VerticesMut<B, V, I, W, Deinterleaved, T>, TessMapError> where
B: VertexSliceBackend<V, I, W, Deinterleaved, T>,
V: Deinterleave<T>,
[src]
&mut self
) -> Result<VerticesMut<B, V, I, W, Deinterleaved, T>, TessMapError> where
B: VertexSliceBackend<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<T>(
&mut self
) -> Result<Instances<B, V, I, W, Deinterleaved, T>, TessMapError> where
B: InstanceSliceBackend<V, I, W, Deinterleaved, T>,
W: Deinterleave<T>,
[src]
&mut self
) -> Result<Instances<B, V, I, W, Deinterleaved, T>, TessMapError> where
B: InstanceSliceBackend<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<T>(
&mut self
) -> Result<InstancesMut<B, V, I, W, Deinterleaved, T>, TessMapError> where
B: InstanceSliceBackend<V, I, W, Deinterleaved, T>,
W: Deinterleave<T>,
[src]
&mut self
) -> Result<InstancesMut<B, V, I, W, Deinterleaved, T>, TessMapError> where
B: InstanceSliceBackend<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<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]
B: TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: Debug + ?Sized,
B::TessRepr: Debug,
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]
B: TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
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]
B: TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
pub fn view(
&self,
range: Range<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
range: Range<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
pub fn inst_view(
&self,
range: Range<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
range: Range<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
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]
B: TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
pub fn view(
&self,
from: RangeFrom<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
from: RangeFrom<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
pub fn inst_view(
&self,
from: RangeFrom<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
from: RangeFrom<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
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]
B: TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
pub fn view(
&self,
_: RangeFull
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
_: RangeFull
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
pub fn inst_view(
&self,
_: RangeFull,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
_: RangeFull,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
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]
B: TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
pub fn view(
&self,
range: RangeInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
range: RangeInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
pub fn inst_view(
&self,
range: RangeInclusive<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
range: RangeInclusive<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
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]
B: TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
pub fn view(
&self,
to: RangeTo<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
to: RangeTo<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
pub fn inst_view(
&self,
to: RangeTo<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
to: RangeTo<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
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]
B: TessBackend<V, I, W, S>,
V: TessVertexData<S>,
I: TessIndex,
W: TessVertexData<S>,
S: ?Sized,
pub fn view(
&self,
to: RangeToInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
to: RangeToInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
pub fn inst_view(
&self,
to: RangeToInclusive<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
[src]
&self,
to: RangeToInclusive<usize>,
inst_nb: usize
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
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,
[src]
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>
[src]
impl<B, V, I = (), W = (), S = Interleaved> !Sync for Tess<B, V, I, W, S>
[src]
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,
[src]
<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,
[src]
S: RefUnwindSafe,
<B as Tess<V, I, W, S>>::TessRepr: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &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.
pub 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>,