[−][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> Clone for VertexStream<'a>
[src]
fn clone(&self) -> VertexStream<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for VertexStream<'a>
[src]
impl<'a> Debug for VertexStream<'a>
[src]
Auto Trait Implementations
impl<'a> !Send for VertexStream<'a>
impl<'a> !Sync for VertexStream<'a>
impl<'a> Unpin for VertexStream<'a>
impl<'a> UnwindSafe for VertexStream<'a>
impl<'a> RefUnwindSafe for VertexStream<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,