[−][src]Struct meshopt::VertexStream
Vertex attribute stream, similar to glVertexPointer
Each element takes size bytes, with stride controlling the spacing between successive elements.
Fields
data: *const u8
Pointer to buffer which contains vertex data.
stride: usize
Space between vertices inside the buffer (in bytes).
size: usize
The size in bytes of the vertex attribute this Stream is representing.
Methods
impl<'a> VertexStream<'a>
[src]
pub fn new<T>(ptr: *const T) -> VertexStream<'a>
[src]
Create a VertexStream
for a buffer consisting only of elements of type T
.
pub fn new_with_stride<T, VertexType>(
ptr: *const VertexType,
stride: usize
) -> VertexStream<'a>
[src]
ptr: *const VertexType,
stride: usize
) -> VertexStream<'a>
Create a VertexStream
for a buffer that contains elements of type VertexType
.
The buffer pointed to by ptr
starts with one value of T
, the next value of T
is *(ptr + stride)
.
(The VertexType
does not need to be a concrete type,
it is only used here to avoid casts on the caller side).
Trait Implementations
impl<'a> Copy for VertexStream<'a>
[src]
impl<'a> Clone for VertexStream<'a>
[src]
fn clone(&self) -> VertexStream<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Debug for VertexStream<'a>
[src]
Auto Trait Implementations
impl<'a> !Send for VertexStream<'a>
impl<'a> !Sync for VertexStream<'a>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,