[][src]Struct amethyst_gltf::GltfPrefab

pub struct GltfPrefab {
    pub transform: Option<Transform>,
    pub camera: Option<CameraPrefab>,
    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.


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)

camera: Option<CameraPrefab>

Camera will always be placed

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


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 Debug for GltfPrefab[src]

impl Default for GltfPrefab[src]

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

type SystemData = (<Transform as PrefabData<'a>>::SystemData, <Named as PrefabData<'a>>::SystemData, <CameraPrefab 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 !RefUnwindSafe for GltfPrefab

impl Send for GltfPrefab

impl Sync for GltfPrefab

impl Unpin for GltfPrefab

impl !UnwindSafe for GltfPrefab

Blanket Implementations

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

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

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 

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

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

type Output = T

Should always be Self

impl<T> SetParameter for T[src]

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

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

impl<T> TryDefault for T where
    T: Default

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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>,