[][src]Struct amethyst_gltf::GltfPrefab

pub struct GltfPrefab {
    pub transform: Option<Transform>,
    pub mesh: Option<MeshBuilder<'static>>,
    pub mesh_handle: Option<Handle<Mesh>>,
    pub material: Option<MaterialPrefab>,
    pub animatable: Option<AnimatablePrefab<usize, Transform>>,
    pub skinnable: Option<SkinnablePrefab>,
    pub extent: Option<GltfNodeExtent>,
    pub name: Option<Named>,
    // some fields omitted
}

PrefabData for loading Gltf files.

Fields

transform: Option<Transform>

Transform will almost always be placed, the only exception is for the main Entity for certain scenarios (based on the data in the Gltf file)

mesh: Option<MeshBuilder<'static>>

MeshData is placed on all Entitys with graphics primitives

mesh_handle: Option<Handle<Mesh>>

Mesh handle after sub asset loading is done

material: Option<MaterialPrefab>

Material is placed on all Entitys with graphics primitives with material

animatable: Option<AnimatablePrefab<usize, Transform>>

Loaded animations, if applicable, will always only be placed on the main Entity

skinnable: Option<SkinnablePrefab>

Skin data is placed on Entitys involved in the skin, skeleton or graphical primitives using the skin

extent: Option<GltfNodeExtent>

Node extent

name: Option<Named>

Node name

Methods

impl GltfPrefab[src]

pub fn move_to(&mut self, target: Point3<f32>)[src]

Move the scene so the center of the bounding box is at the given target location.

pub fn scale_to(&mut self, max_distance: f32)[src]

Scale the scene to a specific max size

Trait Implementations

impl Default for GltfPrefab[src]

impl Debug for GltfPrefab[src]

impl<'a> PrefabData<'a> for GltfPrefab[src]

type SystemData = (<Transform as PrefabData<'a>>::SystemData, <Named as PrefabData<'a>>::SystemData, <MaterialPrefab as PrefabData<'a>>::SystemData, <AnimatablePrefab<usize, Transform> as PrefabData<'a>>::SystemData, <SkinnablePrefab as PrefabData<'a>>::SystemData, WriteStorage<'a, BoundingSphere>, WriteStorage<'a, Handle<Mesh>>, Read<'a, AssetStorage<Mesh>>, ReadExpect<'a, Loader>, Write<'a, GltfMaterialSet>)

SystemData needed to perform the load

type Result = ()

The result type returned by the load operation

Auto Trait Implementations

impl Send for GltfPrefab

impl Sync for GltfPrefab

Blanket Implementations

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> Any for T where
    T: Any

impl<T> TryDefault for T where
    T: Default

fn unwrap_default() -> Self

Calls try_default and panics on an error case.

impl<T> Erased for T

impl<T> Supports<T> for T

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more