Struct amethyst_gltf::GltfPrefab [−][src]
pub struct GltfPrefab { pub transform: Option<Transform>, pub mesh: Option<MeshData>, pub mesh_handle: Option<Handle<Mesh>>, pub material: Option<MaterialPrefab<TextureFormat>>, pub animatable: Option<AnimatablePrefab<usize, Transform>>, pub skinnable: Option<SkinnablePrefab>, pub extent: Option<GltfNodeExtent>, }
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<MeshData>
MeshData
is placed on all Entity
s with graphics primitives
mesh_handle: Option<Handle<Mesh>>
Mesh handle after sub asset loading is done
material: Option<MaterialPrefab<TextureFormat>>
MeshData
is placed on all Entity
s 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 Entity
s involved in the skin, skeleton or graphical primitives
using the skin
extent: Option<GltfNodeExtent>
Node extent
Methods
impl GltfPrefab
[src]
impl GltfPrefab
pub fn move_to(&mut self, target: Point3<f32>)
[src]
pub fn move_to(&mut self, target: Point3<f32>)
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]
pub fn scale_to(&mut self, max_distance: f32)
Scale the scene to a specific max size
Trait Implementations
impl Debug for GltfPrefab
[src]
impl Debug for GltfPrefab
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for GltfPrefab
[src]
impl Clone for GltfPrefab
fn clone(&self) -> GltfPrefab
[src]
fn clone(&self) -> GltfPrefab
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for GltfPrefab
[src]
impl Default for GltfPrefab
fn default() -> GltfPrefab
[src]
fn default() -> GltfPrefab
Returns the "default value" for a type. Read more
impl<'a> PrefabData<'a> for GltfPrefab
[src]
impl<'a> PrefabData<'a> for GltfPrefab
type SystemData = (<Transform as PrefabData<'a>>::SystemData, <MeshData as PrefabData<'a>>::SystemData, <MaterialPrefab<TextureFormat> as PrefabData<'a>>::SystemData, <AnimatablePrefab<usize, Transform> as PrefabData<'a>>::SystemData, <SkinnablePrefab as PrefabData<'a>>::SystemData, WriteStorage<'a, GltfNodeExtent>)
SystemData
needed to perform the load
type Result = ()
The result type returned by the load operation
fn load_prefab(
&self,
entity: Entity,
system_data: &mut Self::SystemData,
entities: &[Entity]
) -> Result<(), Error>
[src]
fn load_prefab(
&self,
entity: Entity,
system_data: &mut Self::SystemData,
entities: &[Entity]
) -> Result<(), Error>
Load the data for this prefab onto the given Entity
Read more
fn trigger_sub_loading(
&mut self,
progress: &mut ProgressCounter,
system_data: &mut Self::SystemData
) -> Result<bool, Error>
[src]
fn trigger_sub_loading(
&mut self,
progress: &mut ProgressCounter,
system_data: &mut Self::SystemData
) -> Result<bool, Error>
Trigger asset loading for any sub assets. Read more
Auto Trait Implementations
impl Send for GltfPrefab
impl Send for GltfPrefab
impl Sync for GltfPrefab
impl Sync for GltfPrefab