Struct truck_rendimpl::ShapeInstance[][src]

pub struct ShapeInstance { /* fields omitted */ }

Instance of shape: Shell and Solid with geometric data.

One can duplicate shapes with different postures and materials that have the same mesh data. To save memory, mesh data on the GPU can be used again.

The duplicated shape by Clone::clone has the same mesh data and descriptor with original, however, its render id is different from the one of original.

Implementations

impl ShapeInstance[src]

pub fn clone_instance(&self) -> Self[src]

Clone the instance as another drawn element.

pub fn descriptor(&self) -> &InstanceDescriptor[src]

Returns a reference to the instance descriptor.

pub fn descriptor_mut(&mut self) -> &mut InstanceDescriptor[src]

Returns the mutable reference to the instance descriptor.

pub fn render_faces(&self) -> Vec<RenderFace<'_>>

Notable traits for Vec<u8, Global>

impl Write for Vec<u8, Global>
[src]

Creates the vector of RenderFace for rendering the shape.

Trait Implementations

impl Clone for ShapeInstance[src]

impl Debug for ShapeInstance[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

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.