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 [u32],
primitive_type: PrimitiveType
) -> MeshSlice<'a, T>
[src]
vertices: &'a [T],
indices: &'a [u32],
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 [u32]
) -> MeshSlice<'a, T>
[src]
vertices: &'a [T],
indices: &'a [u32]
) -> 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) -> &&[u32]ⓘ
[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]>, Global>
[src]
impl<'a, T> MeshSlice<'a, T> where
T: Clone,
[src]
impl<'a, T> MeshSlice<'a, T> where
T: Clone,
[src]Trait Implementations
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, 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]pub fn to_simple_vao<C, B>(
&self,
gl: &C,
bindings: &B,
usage: u32
) -> Result<SimpleVao<Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>>, Error> where
C: CreationContext,
B: Bindings,
[src]
&self,
gl: &C,
bindings: &B,
usage: u32
) -> Result<SimpleVao<Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>>, Error> where
C: CreationContext,
B: Bindings,
pub fn as_simple_vao_data(
&self
) -> Data<'_, Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>>
[src]
&self
) -> Data<'_, Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>>
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> 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]pub fn to_simple_vao<C, B>(
&self,
gl: &C,
bindings: &B,
usage: u32
) -> Result<SimpleVao<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>, Error> where
C: CreationContext,
B: Bindings,
[src]
&self,
gl: &C,
bindings: &B,
usage: u32
) -> Result<SimpleVao<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>, Error> where
C: CreationContext,
B: Bindings,
pub fn as_simple_vao_data(
&self
) -> Data<'_, Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]
&self
) -> Data<'_, Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
impl<'a, T> ToSimpleVao<T, MeshSlice<'a, T>> for MeshSlice<'a, T> where
T: 'static + VertexFormat + Clone,
[src]
impl<'a, T> ToSimpleVao<T, MeshSlice<'a, T>> for MeshSlice<'a, T> where
T: 'static + VertexFormat + Clone,
[src]pub fn to_simple_vao<C, B>(
&self,
gl: &C,
bindings: &B,
usage: u32
) -> Result<SimpleVao<T>, Error> where
C: CreationContext,
B: Bindings,
[src]
&self,
gl: &C,
bindings: &B,
usage: u32
) -> Result<SimpleVao<T>, Error> where
C: CreationContext,
B: Bindings,
pub fn as_simple_vao_data(&self) -> Data<'_, T>
[src]
impl<'a, T> Copy for MeshSlice<'a, T> where
T: Copy,
[src]
T: Copy,
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<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[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]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]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<T> Slottable for T where
T: Copy,
[src]
T: Copy,