[][src]Struct crystal_engine::ModelBuilder

pub struct ModelBuilder<'a> { /* fields omitted */ }

A builder that is used to configure a model being loaded

Implementations

impl<'a> ModelBuilder<'a>[src]

pub fn with_fallback_color(self, color: impl Into<Vector3<f32>>) -> Self[src]

Set the fallback color of the model in case the model has no texture

pub fn with_texture_from_file(self, texture_src: &'a str) -> Self[src]

Set the texture to be used in this model

pub fn with_position(self, position: impl Into<Vector3<f32>>) -> Self[src]

Set the initial position of the model

pub fn with_rotation(self, rotation: Euler<Rad<f32>>) -> Self[src]

Set the initial rotation of the model

pub fn with_scale(self, scale: f32) -> Self[src]

Set the initial scale of the model

pub fn build(self) -> Result<ModelHandle, ModelError>[src]

Finish configuring the model and try to load it.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for ModelBuilder<'a>

impl<'a> !Send for ModelBuilder<'a>

impl<'a> !Sync for ModelBuilder<'a>

impl<'a> Unpin for ModelBuilder<'a>

impl<'a> !UnwindSafe for ModelBuilder<'a>

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> Content for T[src]

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

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

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

impl<T> SetParameter for T

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.