Struct rin_scene::geometry::Geometry[][src]

pub struct Geometry<T: 'static + Clone> { /* fields omitted */ }

Implementations

impl<T: 'static + Clone> Geometry<T>[src]

pub fn new(mesh: Mesh<T>) -> Geometry<T>[src]

pub fn set(&mut self, mesh: Mesh<T>)[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]

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]

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: 'static + Clone> Changes for Geometry<T>[src]

impl<T: Clone + 'static> Clone for Geometry<T>[src]

impl<T: 'static + Clone> Component for Geometry<T>[src]

type Storage = AutoChanged<DenseVec<Geometry<T>>, Geometry<T>>

type MutStorageCacheGuard = ()

impl<T: 'static + Clone> Debug for Geometry<T>[src]

impl<'a, T: 'static + Clone> DebugParameter for Geometry<T>[src]

impl<T: 'static + Clone> Deref for Geometry<T>[src]

type Target = Mesh<T>

The resulting type after dereferencing.

impl<T: 'static + Clone> DerefMut for Geometry<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Geometry<T> where
    T: RefUnwindSafe

impl<T> Send for Geometry<T> where
    T: Send

impl<T> Sync for Geometry<T> where
    T: Sync

impl<T> Unpin for Geometry<T> where
    T: Unpin

impl<T> UnwindSafe for Geometry<T> where
    T: UnwindSafe

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<C> ComponentSend for C where
    C: Component + Send
[src]

impl<C> ComponentThreadLocal for C where
    C: Component
[src]