Struct rin_graphics::MeshSlice [−][src]
pub struct MeshSlice<'a, T> { /* fields omitted */ }
Implementations
impl<'a, T> MeshSlice<'a, T>
[src]
impl<'a, T> MeshSlice<'a, T>
[src]pub fn new(
vertices: &'a [T],
indices: &'a [IndexT],
primitive_type: PrimitiveType
) -> MeshSlice<'a, T>
[src]
vertices: &'a [T],
indices: &'a [IndexT],
primitive_type: PrimitiveType
) -> MeshSlice<'a, T>
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]
vertices: &[T],
ty: PrimitiveType
) -> MeshSlice<'_, T>
MeshSlice with no indices from vertices and primitive type
pub fn from_vertices_indices(
vertices: &'a [T],
indices: &'a [IndexT]
) -> MeshSlice<'a, T>
[src]
vertices: &'a [T],
indices: &'a [IndexT]
) -> MeshSlice<'a, T>
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) -> &&[IndexT]
[src]
pub fn vertices(&self) -> &[T]
[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]>>
[src]
impl<'a, T: Clone> MeshSlice<'a, T>
[src]
impl<'a, T: Clone> MeshSlice<'a, T>
[src]Trait Implementations
impl<'a, T: Copy> Copy for MeshSlice<'a, T>
[src]
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for MeshSlice<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for MeshSlice<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Sync for MeshSlice<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for MeshSlice<'a, T>
impl<'a, T> UnwindSafe for MeshSlice<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]