Struct bevy_retrograde::core::luminance::tess::Tess [−]
pub struct Tess<B, V, I = (), W = (), S = Interleaved> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, 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 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, V, I, W, S> Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
impl<B, V, I, W, S> Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
pub fn indices(&mut self) -> Result<Indices<B, V, I, W, S>, TessMapError> where
B: IndexSlice<V, I, W, S>,
pub fn indices(&mut self) -> Result<Indices<B, V, I, W, S>, TessMapError> where
B: IndexSlice<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: IndexSlice<V, I, W, S>,
pub fn indices_mut(&mut self) -> Result<IndicesMut<B, V, I, W, S>, TessMapError> where
B: IndexSlice<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
V: TessVertexData<Interleaved>,
W: TessVertexData<Interleaved>,
I: TessIndex,
B: Tess<V, I, W, Interleaved> + ?Sized,
impl<B, V, I, W> Tess<B, V, I, W, Interleaved> where
V: TessVertexData<Interleaved>,
W: TessVertexData<Interleaved>,
I: TessIndex,
B: Tess<V, I, W, Interleaved> + ?Sized,
pub fn vertices(
&mut self
) -> Result<Vertices<B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSlice<V, I, W, Interleaved, V>,
pub fn vertices(
&mut self
) -> Result<Vertices<B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSlice<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: VertexSlice<V, I, W, Interleaved, V>,
pub fn vertices_mut(
&mut self
) -> Result<VerticesMut<B, V, I, W, Interleaved, V>, TessMapError> where
B: VertexSlice<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: InstanceSlice<V, I, W, Interleaved, V>,
pub fn instances(
&mut self
) -> Result<Instances<B, V, I, W, Interleaved, V>, TessMapError> where
B: InstanceSlice<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: InstanceSlice<V, I, W, Interleaved, V>,
pub fn instances_mut(
&mut self
) -> Result<InstancesMut<B, V, I, W, Interleaved, V>, TessMapError> where
B: InstanceSlice<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, V, I, W> Tess<B, V, I, W, Deinterleaved> where
V: TessVertexData<Deinterleaved>,
W: TessVertexData<Deinterleaved>,
I: TessIndex,
B: Tess<V, I, W, Deinterleaved> + ?Sized,
impl<B, V, I, W> Tess<B, V, I, W, Deinterleaved> where
V: TessVertexData<Deinterleaved>,
W: TessVertexData<Deinterleaved>,
I: TessIndex,
B: Tess<V, I, W, Deinterleaved> + ?Sized,
pub fn vertices<T>(
&mut self
) -> Result<Vertices<B, V, I, W, Deinterleaved, T>, TessMapError> where
V: Deinterleave<T>,
B: VertexSlice<V, I, W, Deinterleaved, T>,
pub fn vertices<T>(
&mut self
) -> Result<Vertices<B, V, I, W, Deinterleaved, T>, TessMapError> where
V: Deinterleave<T>,
B: VertexSlice<V, I, W, Deinterleaved, 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
V: Deinterleave<T>,
B: VertexSlice<V, I, W, Deinterleaved, T>,
pub fn vertices_mut<T>(
&mut self
) -> Result<VerticesMut<B, V, I, W, Deinterleaved, T>, TessMapError> where
V: Deinterleave<T>,
B: VertexSlice<V, I, W, Deinterleaved, 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
W: Deinterleave<T>,
B: InstanceSlice<V, I, W, Deinterleaved, T>,
pub fn instances<T>(
&mut self
) -> Result<Instances<B, V, I, W, Deinterleaved, T>, TessMapError> where
W: Deinterleave<T>,
B: InstanceSlice<V, I, W, Deinterleaved, 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
W: Deinterleave<T>,
B: InstanceSlice<V, I, W, Deinterleaved, T>,
pub fn instances_mut<T>(
&mut self
) -> Result<InstancesMut<B, V, I, W, Deinterleaved, T>, TessMapError> where
W: Deinterleave<T>,
B: InstanceSlice<V, I, W, Deinterleaved, 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
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, 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
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, Range<usize>> for Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, Range<usize>> for Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, 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
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeFrom<usize>> for Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, 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
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeFull> for Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeInclusive<usize>> for Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeInclusive<usize>> for Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
pub fn view(
&self,
range: RangeInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
pub 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.
pub fn inst_view(
&self,
range: RangeInclusive<usize>,
inst_nb: 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>
impl<B, V, I, W, S> View<B, V, I, W, S, RangeTo<usize>> for Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeTo<usize>> for Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, 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
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
impl<B, V, I, W, S> View<B, V, I, W, S, RangeToInclusive<usize>> for Tess<B, V, I, W, S> where
V: TessVertexData<S>,
S: ?Sized,
W: TessVertexData<S>,
I: TessIndex,
B: Tess<V, I, W, S> + ?Sized,
pub fn view(
&self,
to: RangeToInclusive<usize>
) -> Result<TessView<'_, B, V, I, W, S>, TessViewError>
pub 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.
pub fn inst_view(
&self,
to: RangeToInclusive<usize>,
inst_nb: 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>
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
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V