[−][src]Struct mutiny::geometry::Geometry
Methods
impl<T: 'static + Clone> Geometry<T>
[src]
impl<T: 'static + Clone> Geometry<T>
pub fn new(mesh: Mesh<T>) -> Geometry<T>
[src]
pub fn new(mesh: Mesh<T>) -> Geometry<T>
pub fn has_changed(&self) -> bool
[src]
pub fn has_changed(&self) -> bool
pub fn reset_has_changed(&mut self)
[src]
pub fn reset_has_changed(&mut self)
pub fn set(&mut self, mesh: Mesh<T>)
[src]
pub fn set(&mut self, mesh: Mesh<T>)
Methods from Deref<Target = Mesh<T>>
pub fn set_vertices(&mut self, vertices: Vec<T>)
[src]
pub fn set_vertices(&mut self, vertices: Vec<T>)
Set the mesh vertices
pub fn set_indices(&mut self, indices: Vec<u32>)
[src]
pub fn set_indices(&mut self, indices: Vec<u32>)
Set the mesh vertices
pub fn indices(&self) -> &Vec<u32>
[src]
pub fn indices(&self) -> &Vec<u32>
pub fn indices_mut(&mut self) -> &mut Vec<u32>
[src]
pub fn indices_mut(&mut self) -> &mut Vec<u32>
pub fn vertices(&self) -> &[T]
[src]
pub fn vertices(&self) -> &[T]
pub fn vertices_mut(&mut self) -> &mut [T]
[src]
pub fn vertices_mut(&mut self) -> &mut [T]
pub fn iter(&self) -> Iter<T>
[src]
pub fn iter(&self) -> Iter<T>
Iterator over the mesh vertices in the order they where inserted
pub fn iter_mut(&mut self) -> IterMut<T>
[src]
pub fn iter_mut(&mut self) -> IterMut<T>
Mutable iterator over the mesh vertices in the order they where inserted
pub fn pop(&mut self) -> Option<T>
[src]
pub fn pop(&mut self) -> Option<T>
Pop the last vertex
pub fn push(&mut self, value: T)
[src]
pub fn push(&mut self, value: T)
Push a vertex at the end of the mesh
pub fn extend_from_slice(&mut self, other: &[T])
[src]
pub fn extend_from_slice(&mut self, other: &[T])
Extend the mesh with a slice of new vertices
pub fn extend_from_mesh(&mut self, other: &Mesh<T>)
[src]
pub fn extend_from_mesh(&mut self, other: &Mesh<T>)
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<I>(&mut self, other: I) where
I: IntoIterator<Item = T>,
[src]
pub fn extend<I>(&mut self, other: I) where
I: IntoIterator<Item = T>,
Extend the mesh with an iterator of new vertices
pub fn insert(&mut self, index: usize, element: T)
[src]
pub fn insert(&mut self, index: usize, element: T)
Insert a vertex at a certain position
pub fn get_mut(&mut self, index: usize) -> &mut T
[src]
pub fn get_mut(&mut self, index: usize) -> &mut T
Mutably get the vertex at the specified position.
Will panic if the vertex doesn't exist
pub fn reserve(&mut self, capacity: usize)
[src]
pub fn reserve(&mut self, capacity: usize)
Reserve as much capacity for vertices
pub unsafe fn set_len(&mut self, len: usize)
[src]
pub unsafe fn set_len(&mut self, len: usize)
Unsafe operation that sets the len of the vertices collection
pub fn truncate(&mut self, len: usize)
[src]
pub fn truncate(&mut self, len: usize)
Truncate the mesh vertices at the specified len
pub fn last(&self) -> Option<&T>
[src]
pub fn last(&self) -> Option<&T>
Last vertex if there's any
pub fn last_mut(&mut self) -> Option<&mut T>
[src]
pub fn last_mut(&mut self) -> Option<&mut T>
Last vertex mutably if there's any
pub fn primitive_type(&self) -> PrimitiveType
[src]
pub fn primitive_type(&self) -> PrimitiveType
Primitive type
pub fn set_primitive_type(&mut self, ty: PrimitiveType)
[src]
pub fn set_primitive_type(&mut self, ty: PrimitiveType)
pub fn add_face(&mut self, i0: u32, i1: u32, i2: u32)
[src]
pub fn add_face(&mut self, i0: u32, i1: u32, i2: u32)
Add a triangle face (only for Triangles primitive type)
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
Clear the mesh vertices and indices
pub fn clear_vertices(&mut self)
[src]
pub fn clear_vertices(&mut self)
Clear the vertices
pub fn clear_indices(&mut self)
[src]
pub fn clear_indices(&mut self)
Clear the indices
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Number of vertices
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Contains any vertices
pub fn faces(&self) -> Box<dyn Iterator<Item = [&T; 3]>>
[src]
pub fn faces(&self) -> Box<dyn Iterator<Item = [&T; 3]>>
pub fn faces_mut(&mut self) -> Box<dyn Iterator<Item = [&mut T; 3]>>
[src]
pub fn faces_mut(&mut self) -> Box<dyn Iterator<Item = [&mut T; 3]>>
Trait Implementations
impl<T: 'static + Clone> Debug for Geometry<T>
[src]
impl<T: 'static + Clone> Debug for Geometry<T>
impl<T: 'static + Clone> Deref for Geometry<T>
[src]
impl<T: 'static + Clone> Deref for Geometry<T>
impl<T: 'static + Clone> DerefMut for Geometry<T>
[src]
impl<T: 'static + Clone> DerefMut for Geometry<T>
impl<T: 'static + Clone> Component for Geometry<T>
[src]
impl<T: 'static + Clone> Component for Geometry<T>
impl<'a, T: 'static + Clone> DebugParameter for Geometry<T>
[src]
impl<'a, T: 'static + Clone> DebugParameter for Geometry<T>
fn debug<S: Serializer>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
[src]
fn debug<S: Serializer>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<C> ComponentSend for C where
C: Component + Send,
[src]
impl<C> ComponentSend for C where
C: Component + Send,
impl<C> ComponentThreadLocal for C where
C: Component,
[src]
impl<C> ComponentThreadLocal for C where
C: Component,
impl<T> Any for T where
T: Any,
[src]
impl<T> Any for T where
T: Any,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> SetParameter for T
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> Same for T
[src]
impl<T> Same for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
[src]
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
[src]
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
[src]
fn from_subset(element: &SS) -> SP
impl<V> IntoVec for V
[src]
impl<V> IntoVec for V
impl<V> IntoPnt for V
[src]
impl<V> IntoPnt for V
impl<B, P> IntoControlBuilder for P where
B: BuilderFromProperty<P>,
[src]
impl<B, P> IntoControlBuilder for P where
B: BuilderFromProperty<P>,
fn into_builder<S>(self, name: &str, events: S) -> B where
S: Stream<'static, Event>,
[src]
fn into_builder<S>(self, name: &str, events: S) -> B where
S: Stream<'static, Event>,
impl<T, U> IntoDuration for T where
U: FromDuration<T>,
[src]
impl<T, U> IntoDuration for T where
U: FromDuration<T>,
type Error = <U as FromDuration<T>>::Error
fn into_duration(self) -> Result<U, <U as FromDuration<T>>::Error>
[src]
fn into_duration(self) -> Result<U, <U as FromDuration<T>>::Error>