Struct meshopt::VertexStream[][src]

pub struct VertexStream<'a> {
    pub data: *const u8,
    pub stride: usize,
    pub size: usize,
    // some fields omitted
}

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.

Implementations

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]

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]

impl<'a> Debug for VertexStream<'a>[src]

impl<'a> Copy for VertexStream<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for VertexStream<'a>

impl<'a> !Send for VertexStream<'a>

impl<'a> !Sync for VertexStream<'a>

impl<'a> Unpin for VertexStream<'a>

impl<'a> UnwindSafe for VertexStream<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.