pub struct Node {
pub index: usize,
pub children: Vec<usize>,
pub mesh: Option<Rc<Mesh>>,
pub rotation: Quaternion,
pub scale: Vector3,
pub translation: Vector3,
pub camera: Option<Camera>,
pub name: Option<String>,
pub final_transform: Matrix4,
pub bounds: Aabb3,
}
Fields§
§index: usize
§children: Vec<usize>
§mesh: Option<Rc<Mesh>>
§rotation: Quaternion
§scale: Vector3
§translation: Vector3
§camera: Option<Camera>
§name: Option<String>
§final_transform: Matrix4
§bounds: Aabb3
Implementations§
Source§impl Node
impl Node
pub fn from_gltf( g_node: &Node<'_>, root: &mut Root, imp: &ImportData, base_path: &Path, ) -> Node
pub fn update_transform(&mut self, root: &mut Root, parent_transform: &Matrix4)
Sourcepub fn update_bounds(&mut self, root: &mut Root)
pub fn update_bounds(&mut self, root: &mut Root)
Should be called after update_transforms
pub fn draw(&mut self, root: &mut Root, cam_params: &CameraParams)
Auto Trait Implementations§
impl Freeze for Node
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<Trait>
(where Trait: Downcast
) to Box<Any>
. Box<Any>
can then be
further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.