Struct three_d_asset::Scene
source · pub struct Scene {
pub name: String,
pub children: Vec<Node>,
pub materials: Vec<PbrMaterial>,
}Expand description
Representation of a set of objects as a scene graph. Specifically, a Scene contains a tree of Nodes, where the nodes contain the Geometry data. A Scene can easily be converted into a Model, if it is more desirable with a flat arrays instead of a tree structure.
To visualise the Geometry in the Scene correctly, it is necessary to traverse the scene from the root (the Scene) to the leaves and along the way calculate a transformation. For each node containing Geometry, the Geometry should be visualised with the calculated transformation applied.
Fields§
§name: StringThe name. Might not be anything meaningful.
children: Vec<Node>Children nodes.
materials: Vec<PbrMaterial>A list of materials used in this scene. The materials are referenced by index in the relevant nodes.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Scene
impl<'de> Deserialize<'de> for Scene
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Deserialize for Scene
impl Deserialize for Scene
Auto Trait Implementations§
impl RefUnwindSafe for Scene
impl Send for Scene
impl Sync for Scene
impl Unpin for Scene
impl UnwindSafe for Scene
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more