Skip to main content

UnityGltf

Struct UnityGltf 

Source
pub struct UnityGltf {
    pub scene_name: String,
    pub root_game_objects: Vec<u32>,
    pub game_objects: HashMap<u32, UnityGameObject>,
    pub meshes: HashMap<u32, UnityMesh>,
    pub images: HashMap<u32, UnityImage>,
    pub pbr_metallic_roughness: HashMap<u32, UnityPbrMetallicRoughness>,
}
Expand description

A Unity-shaped glTF — same structural relationships as glTF but with all data pre-converted to Unity’s left-handed coordinate system.

Fields§

§scene_name: String

The name of the default scene. Falls back to the source filename (without extension) if the glTF scene has no name.

§root_game_objects: Vec<u32>

Indices of the root GameObjects in the default scene.

§game_objects: HashMap<u32, UnityGameObject>

All GameObjects, keyed by their glTF node index.

§meshes: HashMap<u32, UnityMesh>

All meshes, keyed by their glTF mesh index. Each UnityMesh contains a shared vertex array and one sub-mesh per glTF primitive.

§images: HashMap<u32, UnityImage>

All images, keyed by their glTF image index.

§pbr_metallic_roughness: HashMap<u32, UnityPbrMetallicRoughness>

All GLTF/PbrMetallicRoughness materials, keyed by their glTF material index.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.