Struct rin::scene::geometry::Geometry [−][src]
pub struct Geometry<T> where
T: 'static + Clone, { /* fields omitted */ }
Implementations
impl<T> Geometry<T> where
T: 'static + Clone,
[src]
impl<T> Geometry<T> where
T: 'static + Clone,
[src]Methods from Deref<Target = Mesh<T>>
pub fn set_vertices(&mut self, vertices: Vec<T, Global>)
[src]
Set the mesh vertices
pub fn set_indices(&mut self, indices: Vec<u32, Global>)
[src]
Set the mesh vertices
pub fn indices(&self) -> &Vec<u32, Global>ⓘ
[src]
pub fn indices_mut(&mut self) -> &mut Vec<u32, Global>ⓘ
[src]
pub fn vertices(&self) -> &[T]ⓘ
[src]
pub fn vertices_mut(&mut self) -> &mut Vec<T, Global>ⓘ
[src]
pub fn vertices_indices_mut(
&mut self
) -> (&mut Vec<T, Global>, &mut Vec<u32, Global>)
[src]
&mut self
) -> (&mut Vec<T, Global>, &mut Vec<u32, Global>)
pub fn iter(&self) -> Iter<'_, T>
[src]
Iterator over the mesh vertices in the order they where inserted
pub fn iter_mut(&mut self) -> IterMut<'_, T>
[src]
Mutable iterator over the mesh vertices in the order they where inserted
pub fn pop(&mut self) -> Option<T>
[src]
Pop the last vertex
pub fn push(&mut self, value: T)
[src]
Push a vertex at the end of the mesh
pub fn extend<I>(&mut self, other: I) where
I: IntoIterator<Item = T>,
[src]
I: IntoIterator<Item = T>,
Extend the mesh with an iterator of new vertices
pub fn insert(&mut self, index: usize, element: T)
[src]
Insert a vertex at a certain position
pub fn get_mut(&mut self, index: usize) -> &mut T
[src]
Mutably get the vertex at the specified position.
Will panic if the vertex doesn’t exist
pub fn reserve(&mut self, capacity: usize)
[src]
Reserve as much capacity for vertices
pub unsafe fn set_len(&mut self, len: usize)
[src]
Unsafe operation that sets the len of the vertices collection
pub fn truncate(&mut self, len: usize)
[src]
Truncate the mesh vertices at the specified len
pub fn last(&self) -> Option<&T>
[src]
Last vertex if there’s any
pub fn last_mut(&mut self) -> Option<&mut T>
[src]
Last vertex mutably 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 add_face(&mut self, i0: u32, i1: u32, i2: u32)
[src]
Add a triangle face (only for Triangles primitive type)
pub fn clear(&mut self)
[src]
Clear the mesh vertices and indices
pub fn clear_vertices(&mut self)
[src]
Clear the vertices
pub fn clear_indices(&mut self)
[src]
Clear the indices
pub fn len(&self) -> usize
[src]
Number of vertices
pub fn is_empty(&self) -> bool
[src]
Contains any vertices
pub fn as_slice(&self) -> MeshSlice<'_, T>
[src]
pub fn faces(&self) -> Box<dyn Iterator<Item = [&T; 3]>, Global>
[src]
pub fn faces_mut(&mut self) -> Box<dyn Iterator<Item = [&mut T; 3]>, Global>
[src]
pub fn extend_from_mesh(&mut self, other: &Mesh<T>)
[src]
Extend the mesh with another mesh
The vertices and indices will just be inserted at the end without taking into account the primitive types
pub fn extend_from_slice(&mut self, other: &[T])
[src]
Extend the mesh with a slice of new vertices
Trait Implementations
impl<T> Changes for Geometry<T> where
T: 'static + Clone,
[src]
impl<T> Changes for Geometry<T> where
T: 'static + Clone,
[src]pub fn has_changed(&self) -> bool
[src]
pub fn reset_changed(&mut self)
[src]
impl<T> Component for Geometry<T> where
T: 'static + Clone,
[src]
impl<T> Component for Geometry<T> where
T: 'static + Clone,
[src]type Storage = AutoChanged<KeyedDenseVec<usize, Geometry<T>>, Geometry<T>>
type MutStorageCacheGuard = ()
pub fn type_name() -> &'static str
[src]
pub fn is_reference() -> bool
[src]
pub fn id() -> TypeId
[src]
pub fn references_other(
) -> Option<Box<dyn Fn(&Storages, &Entity) + 'static, Global>>
[src]
) -> Option<Box<dyn Fn(&Storages, &Entity) + 'static, Global>>
impl<'a, T> DebugParameter for Geometry<T> where
T: 'static + Clone,
[src]
impl<'a, T> DebugParameter for Geometry<T> where
T: 'static + Clone,
[src]pub fn debug<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Auto Trait Implementations
impl<T> RefUnwindSafe for Geometry<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Geometry<T> where
T: Send,
T: Send,
impl<T> Sync for Geometry<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Geometry<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Geometry<T> where
T: UnwindSafe,
T: UnwindSafe,
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<C> ComponentSend for C where
C: Component + Send,
[src]
C: Component + Send,
impl<C> ComponentThreadLocal for C where
C: Component,
[src]
C: Component,