pub struct ModelNode { /* private fields */ }Implementations§
Trait Implementations§
Source§impl SceneNode for ModelNode
impl SceneNode for ModelNode
Source§fn update_world_transforms(
&mut self,
range: Range<usize>,
parents_world_transform: &Vec<Instance>,
)
fn update_world_transforms( &mut self, range: Range<usize>, parents_world_transform: &Vec<Instance>, )
Multiple instances of a parent can be passed down to multiple instances of multiple children.
The argument parents_world_transform with a matching range size provides control over which instances are transformed.
Source§fn add_child(&mut self, child: Box<dyn SceneNode>) -> usize
fn add_child(&mut self, child: Box<dyn SceneNode>) -> usize
Adds a child node to the tree and returns the childs index
fn set_local_transform(&mut self, idx: usize, instance: Instance)
fn set_local_transform_all(&mut self, mutation: &mut dyn FnMut(&mut Instance))
fn get_world_transforms(&self) -> Vec<Instance>
fn get_children_mut(&mut self) -> &mut Vec<Box<dyn SceneNode>>
fn get_local_transform(&self, idx: usize) -> Option<&Instance>
fn write_to_buffers(&mut self, queue: &Queue, device: &Device)
fn draw<'a, 'b>(
&self,
camera_bind_group: &'a BindGroup,
light_bind_group: &'a BindGroup,
render_pass: &'b mut RenderPass<'a>,
)where
'a: 'b,
fn get_children(&self) -> &Vec<Box<dyn SceneNode>>
fn to_clickable(&self, device: &Device, id: PickId) -> Box<dyn SceneNode>
Source§fn add_instance(&mut self, instance: Instance) -> usize
fn add_instance(&mut self, instance: Instance) -> usize
Adds an instance to the scene node (and its children) and returns the index of the added instance
fn update_world_transform_all(&mut self)
fn duplicate_instance(&mut self, i: usize) -> usize
fn get_animation(&self) -> &Vec<ModelAnimation>
fn get_render(&self) -> Vec<Instanced<'_>>
fn remove_instance(&mut self, idx: usize) -> (Instance, Instance)
Source§fn add_instances(&mut self, instances: Vec<Instance>) -> usize
fn add_instances(&mut self, instances: Vec<Instance>) -> usize
Adds multiple instance to the scene node (and its children) and returns index of the last instance
fn get_world_transform(&self, idx: usize) -> Option<&Instance>
fn remove_child(&mut self, idx: usize) -> Box<dyn SceneNode>
fn set_instances(&mut self, instances: Vec<Instance>) -> usize
fn render_inverted(&mut self)
fn get_render_dir(&self) -> FrontFace
Auto Trait Implementations§
impl Freeze for ModelNode
impl !RefUnwindSafe for ModelNode
impl Send for ModelNode
impl !Sync for ModelNode
impl Unpin for ModelNode
impl UnsafeUnpin for ModelNode
impl !UnwindSafe for ModelNode
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<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<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.Source§impl<'a, 'pass, T> GPUResource<'a, 'pass> for Twhere
T: SceneNode,
impl<'a, 'pass, T> GPUResource<'a, 'pass> for Twhere
T: SceneNode,
fn write_to_buffer(&mut self, queue: &Queue, device: &Device)
fn get_render(&'a self) -> Render<'a, 'pass>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more