Struct three_d_asset::Node
source · pub struct Node {
pub name: String,
pub children: Vec<Node>,
pub transformation: Mat4,
pub animations: Vec<(Option<String>, KeyFrames)>,
pub geometry: Option<Geometry>,
pub material_index: Option<usize>,
}Expand description
A node in a Scene graph. Each node may contain a set of children nodes, hence the whole Scene representaion has a tree structure.
Each node may also contain a transformation, animations, geometry and an index to the Scene::materials.
Fields§
§name: StringThe name. Might not be anything meaningful.
children: Vec<Node>Children Nodes.
transformation: Mat4A transformation that should be applied to all Geometry referenced by this and all children nodes.
animations: Vec<(Option<String>, KeyFrames)>Optional animation applied to this node and all of its children. A transformation should be computed for a specific time and then multiplied together with Node::transformation.
geometry: Option<Geometry>Optional geometry for this node.
material_index: Option<usize>Optional index into Scene::materials, indicating which material should be applied to geometry below this node in the tree.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
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
Auto Trait Implementations§
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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