Struct rin::graphics::MeshSlice[][src]

pub struct MeshSlice<'a, T> { /* fields omitted */ }

Implementations

impl<'a, T> MeshSlice<'a, T>[src]

pub fn new(
    vertices: &'a [T],
    indices: &'a [u32],
    primitive_type: PrimitiveType
) -> MeshSlice<'a, T>
[src]

MeshSlice from vertices, indices and primitive type

pub fn from_vertices(vertices: &[T]) -> MeshSlice<'_, T>[src]

Triangles mesh from vertices with no indices

pub fn from_vertices_and_type(
    vertices: &[T],
    ty: PrimitiveType
) -> MeshSlice<'_, T>
[src]

MeshSlice with no indices from vertices and primitive type

pub fn from_vertices_indices(
    vertices: &'a [T],
    indices: &'a [u32]
) -> MeshSlice<'a, T>
[src]

Triangles mesh from vertices and indices

pub fn with_type(ty: PrimitiveType) -> MeshSlice<'a, T>[src]

Empty mesh with the specified primitive type

pub fn indices(&self) -> &&[u32]

Notable traits for &'_ mut [u8]

impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
[src]

pub fn vertices(&self) -> &[T]

Notable traits for &'_ mut [u8]

impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
[src]

pub fn iter(&self) -> Iter<'_, T>[src]

Iterator over the mesh vertices in the order they where inserted

pub fn into_iter(self) -> Iter<'a, T>[src]

Consume the mesh into an iterator over it’s vertices in the order they where inserted

pub fn last(&self) -> Option<&T>[src]

Last vertex if there’s any

pub fn primitive_type(&self) -> PrimitiveType[src]

Primitive type

pub fn set_primitive_type(&mut self, ty: PrimitiveType)[src]

pub fn len(&self) -> usize[src]

Number of vertices

pub fn is_empty(&self) -> bool[src]

Contains any vertices

pub fn faces(&self) -> Box<dyn Iterator<Item = [&T; 3]>, Global>[src]

impl<'a, T> MeshSlice<'a, T> where
    T: Clone
[src]

pub fn into_faces(self) -> Box<dyn Iterator<Item = [T; 3]> + 'a, Global> where
    T: 'static, 
[src]

pub fn to_owned(&self) -> Mesh<T>[src]

Trait Implementations

impl<'a, T> AsRef<[T]> for MeshSlice<'a, T>[src]

impl<'a, T> Borrow<[T]> for MeshSlice<'a, T>[src]

impl<'a, T> Clone for MeshSlice<'a, T> where
    T: Clone
[src]

impl<'a, T> Debug for MeshSlice<'a, T> where
    T: Debug
[src]

impl<'a, T> Index<usize> for MeshSlice<'a, T>[src]

type Output = T

The returned type after indexing.

impl<'a> ToSimpleVao<Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>, Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>> for MeshSlice<'a, Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>>[src]

impl<'a> ToSimpleVao<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>, Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>> for MeshSlice<'a, Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>[src]

impl<'a, T> ToSimpleVao<T, MeshSlice<'a, T>> for MeshSlice<'a, T> where
    T: 'static + VertexFormat + Clone
[src]

impl<'a, T> Copy for MeshSlice<'a, T> where
    T: Copy
[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for MeshSlice<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for MeshSlice<'a, T> where
    T: Sync

impl<'a, T> Sync for MeshSlice<'a, T> where
    T: Sync

impl<'a, T> Unpin for MeshSlice<'a, T>

impl<'a, T> UnwindSafe for MeshSlice<'a, T> where
    T: RefUnwindSafe

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

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

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

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> Slottable for T where
    T: Copy
[src]