pub struct VisualWorld { /* private fields */ }Implementations§
Source§impl VisualWorld
impl VisualWorld
pub fn instance(&self, handle: InstanceHandle) -> Option<&VisualInstance>
Sourcepub fn skin(&self, id: SkinId) -> Option<&Skin>
pub fn skin(&self, id: SkinId) -> Option<&Skin>
Examples found in repository?
422fn debug_print_selected_joint_influence(
423 universe: &engine::Universe,
424 mesh_key: &str,
425 model_root: engine::ecs::ComponentId,
426 selected: &[(usize, engine::ecs::ComponentId)],
427) {
428 let Some(renderable) = find_renderable_by_mesh_key(&universe.world, model_root, mesh_key)
429 else {
430 println!(
431 "[vtuber-joints-example] influence: mesh_key='{}' renderable not found",
432 mesh_key
433 );
434 return;
435 };
436
437 let renderable_handle = universe
438 .world
439 .get_component_by_id_as::<RenderableComponent>(renderable)
440 .and_then(|r| r.get_handle());
441 println!(
442 "[vtuber-joints-example] influence: mesh_key='{}' renderable={:?} instance_handle={:?}",
443 mesh_key, renderable, renderable_handle
444 );
445 let Some(skin_id) = find_skin_id_for_renderable(&universe.world, renderable) else {
446 println!(
447 "[vtuber-joints-example] influence: mesh_key='{}' has no skin_id",
448 mesh_key
449 );
450 return;
451 };
452 let Some(skin) = universe.visuals.skin(skin_id) else {
453 println!(
454 "[vtuber-joints-example] influence: skin_id={:?} missing in visuals",
455 skin_id
456 );
457 return;
458 };
459 let Some(cpu_h) = universe.render_assets.imported_mesh(mesh_key) else {
460 println!(
461 "[vtuber-joints-example] influence: mesh_key='{}' missing in RenderAssets (did meshes register?)",
462 mesh_key
463 );
464 return;
465 };
466 let Some(cpu) = universe.render_assets.cpu_mesh(cpu_h) else {
467 println!(
468 "[vtuber-joints-example] influence: mesh_key='{}' cpu mesh handle invalid",
469 mesh_key
470 );
471 return;
472 };
473 let (Some(joints0), Some(weights0)) = (cpu.joints0.as_ref(), cpu.weights0.as_ref()) else {
474 println!(
475 "[vtuber-joints-example] influence: mesh_key='{}' has no skin attributes",
476 mesh_key
477 );
478 return;
479 };
480
481 let joint_count = skin.joint_count();
482 let totals = compute_total_weight_per_joint(joints0, weights0, joint_count);
483
484 println!(
485 "[vtuber-joints-example] influence: mesh_key='{}' verts={} joints={}",
486 mesh_key,
487 cpu.vertices.len(),
488 joint_count
489 );
490
491 for &(node_index, joint_tx) in selected.iter() {
492 // Find the skin joint index that maps to this node.
493 let skin_joint_index = skin
494 .joint_node_indices
495 .iter()
496 .position(|&ni| ni == node_index);
497
498 let name = universe
499 .world
500 .get_component_record(joint_tx)
501 .map(|r| r.name.as_str())
502 .unwrap_or("<unknown>");
503
504 match skin_joint_index {
505 Some(j) => {
506 let total = totals.get(j).copied().unwrap_or(0.0);
507 println!(
508 " influence: name='{}' node_index={} skin_joint_index={} total_weight={:.3}",
509 name, node_index, j, total
510 );
511 }
512 None => {
513 println!(
514 " influence: name='{}' node_index={} skin_joint_index=<none>",
515 name, node_index
516 );
517 }
518 }
519 }
520}
521
522fn compute_total_weight_per_joint(
523 joints0: &[[u16; 4]],
524 weights0: &[[f32; 4]],
525 joint_count: usize,
526) -> Vec<f32> {
527 let mut totals = vec![0.0f32; joint_count];
528 if joint_count == 0 {
529 return totals;
530 }
531 for (jv, wv) in joints0.iter().zip(weights0.iter()) {
532 for lane in 0..4 {
533 let j = jv[lane] as usize;
534 if j >= joint_count {
535 continue;
536 }
537 let w = wv[lane];
538 if w > 0.0 {
539 totals[j] += w;
540 }
541 }
542 }
543 totals
544}
545
546fn select_body_prim0_influencers(
547 universe: &engine::Universe,
548 model_root: engine::ecs::ComponentId,
549 mesh_key: &str,
550 count: usize,
551 node_index_to_transform: &HashMap<usize, engine::ecs::ComponentId>,
552) -> Option<Vec<(usize, engine::ecs::ComponentId)>> {
553 if count == 0 {
554 return Some(Vec::new());
555 }
556
557 let renderable = find_renderable_by_mesh_key(&universe.world, model_root, mesh_key)?;
558 let skin_id = find_skin_id_for_renderable(&universe.world, renderable)?;
559 let skin = universe.visuals.skin(skin_id)?;
560
561 let cpu_h = universe.render_assets.imported_mesh(mesh_key)?;
562 let cpu = universe.render_assets.cpu_mesh(cpu_h)?;
563 let joints0 = cpu.joints0.as_ref()?;
564 let weights0 = cpu.weights0.as_ref()?;
565
566 let joint_count = skin.joint_count();
567 if joint_count == 0 {
568 return None;
569 }
570
571 let mut total_weight_per_joint: Vec<f32> = vec![0.0; joint_count];
572 for (jv, wv) in joints0.iter().zip(weights0.iter()) {
573 for lane in 0..4 {
574 let j = jv[lane] as usize;
575 if j >= joint_count {
576 continue;
577 }
578 let w = wv[lane];
579 if w > 0.0 {
580 total_weight_per_joint[j] += w;
581 }
582 }
583 }
584
585 let mut ranked: Vec<(usize, f32)> =
586 total_weight_per_joint.iter().copied().enumerate().collect();
587 ranked.sort_by(|a, b| b.1.partial_cmp(&a.1).unwrap_or(std::cmp::Ordering::Equal));
588
589 let min_total: f32 = 10.0;
590
591 println!(
592 "[vtuber-joints-example] auto joints for mesh_key='{}': verts={} joint_count={} min_total={}",
593 mesh_key,
594 cpu.vertices.len(),
595 joint_count,
596 min_total
597 );
598
599 let mut out: Vec<(usize, engine::ecs::ComponentId)> = Vec::with_capacity(count);
600 let mut seen: HashSet<engine::ecs::ComponentId> = HashSet::new();
601
602 for (joint_index, total) in ranked.into_iter() {
603 if out.len() >= count {
604 break;
605 }
606 if total < min_total {
607 continue;
608 }
609
610 let node_index = *skin.joint_node_indices.get(joint_index)?;
611 let Some(&joint_tx) = node_index_to_transform.get(&node_index) else {
612 continue;
613 };
614 if !seen.insert(joint_tx) {
615 continue;
616 }
617
618 let name = universe
619 .world
620 .get_component_record(joint_tx)
621 .map(|n| n.name.clone())
622 .unwrap_or_else(|| "<unknown>".to_string());
623
624 println!(
625 " auto[{:<2}] joint_index={:<3} total_weight={:<10.3} node_index={:<3} name={} tx={:?}",
626 out.len(),
627 joint_index,
628 total,
629 node_index,
630 name,
631 joint_tx
632 );
633
634 out.push((node_index, joint_tx));
635 }
636
637 if out.is_empty() { None } else { Some(out) }
638}
639
640fn find_renderable_by_mesh_key(
641 world: &engine::ecs::World,
642 root: engine::ecs::ComponentId,
643 mesh_key: &str,
644) -> Option<engine::ecs::ComponentId> {
645 let mut stack = vec![root];
646 while let Some(node) = stack.pop() {
647 if let Some(m) = world.get_component_by_id_as::<MeshComponent>(node) {
648 if m.key == mesh_key {
649 return find_parent_renderable(world, node);
650 }
651 }
652 for &ch in world.children_of(node) {
653 stack.push(ch);
654 }
655 }
656 None
657}
658
659fn find_parent_renderable(
660 world: &engine::ecs::World,
661 mut cid: engine::ecs::ComponentId,
662) -> Option<engine::ecs::ComponentId> {
663 while let Some(parent) = world.parent_of(cid) {
664 if world
665 .get_component_by_id_as::<RenderableComponent>(parent)
666 .is_some()
667 {
668 return Some(parent);
669 }
670 cid = parent;
671 }
672 None
673}
674
675fn find_skin_id_for_renderable(
676 world: &engine::ecs::World,
677 renderable: engine::ecs::ComponentId,
678) -> Option<engine::graphics::SkinId> {
679 let mut stack = vec![renderable];
680 while let Some(node) = stack.pop() {
681 if let Some(sm) = world.get_component_by_id_as::<SkinnedMeshComponent>(node) {
682 if let Some(id) = sm.skin_id {
683 return Some(id);
684 }
685 }
686 for &ch in world.children_of(node) {
687 stack.push(ch);
688 }
689 }
690 None
691}
692
693fn collect_joint_transforms(
694 world: &engine::ecs::World,
695 skinned_mesh: &engine::ecs::system::SkinnedMeshSystem,
696 visuals: &engine::graphics::VisualWorld,
697 gltf_component: engine::ecs::ComponentId,
698 root: engine::ecs::ComponentId,
699) -> Vec<(usize, engine::ecs::ComponentId)> {
700 fn find_first_skin_id_in_subtree(
701 world: &engine::ecs::World,
702 root: engine::ecs::ComponentId,
703 ) -> Option<engine::graphics::SkinId> {
704 let mut stack = vec![root];
705 while let Some(node) = stack.pop() {
706 if let Some(sm) = world.get_component_by_id_as::<SkinnedMeshComponent>(node) {
707 if let Some(id) = sm.skin_id {
708 return Some(id);
709 }
710 }
711 for &ch in world.children_of(node) {
712 stack.push(ch);
713 }
714 }
715 None
716 }
717
718 let Some(skin_id) = find_first_skin_id_in_subtree(world, root) else {
719 return Vec::new();
720 };
721 let Some(skin) = visuals.skin(skin_id) else {
722 return Vec::new();
723 };
724 let Some(joints) = skinned_mesh.instance_joints_for_skin(gltf_component, skin_id) else {
725 return Vec::new();
726 };
727
728 let joint_count = skin.joint_count().min(joints.len());
729 let mut out: Vec<(usize, engine::ecs::ComponentId)> = Vec::with_capacity(joint_count);
730 for i in 0..joint_count {
731 let Some(joint_tx) = joints[i] else {
732 continue;
733 };
734 let node_index = skin.joint_node_indices[i];
735 out.push((node_index, joint_tx));
736 }
737
738 out
739}pub fn skin_id_for(&self, uri: &str, skin_index: usize) -> Option<SkinId>
pub fn upsert_skin( &mut self, uri: &str, skin_index: usize, joint_node_indices: Vec<usize>, inverse_bind_matrices: Vec<TransformMatrix>, ) -> SkinId
Sourcepub fn set_skin_matrices(
&mut self,
handle: InstanceHandle,
bones: &[TransformMatrix],
) -> bool
pub fn set_skin_matrices( &mut self, handle: InstanceHandle, bones: &[TransformMatrix], ) -> bool
Assigns the skin matrices for an instance into the shared palette.
This keeps bones_base stable for an instance unless its bone count changes.
pub fn bones_palette(&self) -> &[TransformMatrix] ⓘ
Sourcepub fn take_bones_palette_dirty(&mut self) -> bool
pub fn take_bones_palette_dirty(&mut self) -> bool
Returns whether the bones palette changed since the last call, and clears the dirty flag.
Sourcepub fn update_skin_range(
&mut self,
handle: InstanceHandle,
bones_base: u32,
bones_count: u32,
) -> bool
pub fn update_skin_range( &mut self, handle: InstanceHandle, bones_base: u32, bones_count: u32, ) -> bool
Compatibility helper: updates the skin palette range for an instance.
Prefer set_skin_matrices() for stable allocation.
Source§impl VisualWorld
impl VisualWorld
pub fn new() -> Self
pub fn clear_color(&self) -> [f32; 4]
pub fn set_clear_color(&mut self, rgba: [f32; 4])
pub fn renderer_msaa_mode(&self) -> MsaaMode
pub fn set_renderer_msaa_mode(&mut self, mode: MsaaMode)
pub fn preferred_window_size(&self) -> Option<[u32; 2]>
pub fn set_preferred_window_size(&mut self, size: Option<[u32; 2]>)
pub fn take_preferred_window_size(&mut self) -> Option<[u32; 2]>
pub fn window_frame_dt_sec(&self) -> f32
pub fn window_frame_fps(&self) -> f32
pub fn set_window_frame_dt_sec(&mut self, dt_sec: f32)
pub fn xr_frame_dt_sec(&self) -> Option<f32>
pub fn xr_frame_fps(&self) -> Option<f32>
pub fn set_xr_frame_dt_sec(&mut self, dt_sec: Option<f32>)
pub fn ambient_light(&self) -> [f32; 3]
pub fn set_ambient_light(&mut self, rgb: [f32; 3])
pub fn clear(&mut self)
pub fn active_xr_camera(&self) -> Option<ComponentId>
pub fn set_active_xr_camera(&mut self, component: Option<ComponentId>)
pub fn lights_dirty(&self) -> bool
pub fn take_lights_dirty(&mut self) -> bool
pub fn point_lights(&self) -> &[VisualPointLight]
pub fn upsert_point_light(&mut self, cid: ComponentId, light: VisualPointLight)
pub fn camera_dirty(&self) -> bool
pub fn take_camera_dirty(&mut self) -> bool
pub fn visual_cameras(&self) -> &[VisualCamera]
pub fn visual_camera(&self, target: CameraTarget) -> Option<&VisualCamera>
Sourcepub fn camera_view(&self) -> [[f32; 4]; 4]
pub fn camera_view(&self) -> [[f32; 4]; 4]
Window-facing compatibility: returns the first eye’s view matrix for the window target.
Sourcepub fn camera_proj(&self) -> [[f32; 4]; 4]
pub fn camera_proj(&self) -> [[f32; 4]; 4]
Window-facing compatibility: returns the first eye’s projection matrix for the window target.
pub fn camera_view_for(&self, target: CameraTarget) -> [[f32; 4]; 4]
pub fn camera_view_for_eye( &self, target: CameraTarget, eye: usize, ) -> [[f32; 4]; 4]
pub fn camera_proj_for(&self, target: CameraTarget) -> [[f32; 4]; 4]
pub fn camera_proj_for_eye( &self, target: CameraTarget, eye: usize, ) -> [[f32; 4]; 4]
pub fn viewport(&self) -> [f32; 2]
pub fn set_viewport(&mut self, viewport: [f32; 2])
pub fn camera_2d(&self) -> [[f32; 4]; 3]
pub fn set_camera(&mut self, view: [[f32; 4]; 4], proj: [[f32; 4]; 4])
Sourcepub fn set_camera_for_target(
&mut self,
target: CameraTarget,
eyes: Vec<CameraData>,
)
pub fn set_camera_for_target( &mut self, target: CameraTarget, eyes: Vec<CameraData>, )
Set all eyes for a target.
- For
CameraTarget::Window, pass a 1-elementeyesvector. - For
CameraTarget::Xr, pass 2 (or more) eyes.
Sourcepub fn set_camera_mono_for_target(
&mut self,
target: CameraTarget,
view: [[f32; 4]; 4],
proj: [[f32; 4]; 4],
)
pub fn set_camera_mono_for_target( &mut self, target: CameraTarget, view: [[f32; 4]; 4], proj: [[f32; 4]; 4], )
Convenience: set a single-eye camera for a target.
pub fn set_camera_mono_for_target_with_transform( &mut self, target: CameraTarget, view: [[f32; 4]; 4], proj: [[f32; 4]; 4], transform: Transform, )
Sourcepub fn set_xr_camera(&mut self, eyes: Vec<CameraData>)
pub fn set_xr_camera(&mut self, eyes: Vec<CameraData>)
Convenience: set XR eyes.
pub fn set_camera_2d(&mut self, m: [[f32; 4]; 3])
pub fn register_mirror(&mut self, mirror: VisualMirror)
pub fn clear_mirrors(&mut self)
pub fn mirrors(&self) -> &[VisualMirror]
pub fn mirror_texture_key_for_view( &self, mirror_component: ComponentId, family: MirrorViewerFamily, view_index: usize, ) -> Option<&str>
pub fn mirror_count(&self) -> usize
Sourcepub fn instance_data_dirty(&self) -> bool
pub fn instance_data_dirty(&self) -> bool
Returns whether any per-instance data has changed since the last time it was consumed.
Sourcepub fn take_instance_data_dirty(&mut self) -> bool
pub fn take_instance_data_dirty(&mut self) -> bool
Consume the instance-data dirty flag.
pub fn instances(&self) -> &[VisualInstance]
pub fn instance_count(&self) -> usize
Sourcepub fn background_order(&self) -> &[u32]
pub fn background_order(&self) -> &[u32]
Indices into instances() in the order they should be drawn (opaque batching).
pub fn background_batches(&self) -> &[DrawBatch]
pub fn background_occluded_lit_order(&self) -> &[u32]
pub fn background_occluded_lit_batches(&self) -> &[DrawBatch]
pub fn background_occluded_lit_emissive_order(&self) -> &[u32]
pub fn background_occluded_lit_emissive_batches(&self) -> &[DrawBatch]
pub fn has_background_occluded_lit_emissive(&self) -> bool
Sourcepub fn draw_order(&self) -> &[u32]
pub fn draw_order(&self) -> &[u32]
Indices into instances() in the order they should be drawn (opaque batching).
pub fn draw_batches(&self) -> &[DrawBatch]
Sourcepub fn emissive_draw_order(&self) -> &[u32]
pub fn emissive_draw_order(&self) -> &[u32]
Indices into instances() in the order they should be drawn (emissive opaque batching).
pub fn emissive_draw_batches(&self) -> &[DrawBatch]
Sourcepub fn cutout_order(&self) -> &[u32]
pub fn cutout_order(&self) -> &[u32]
Indices into instances() in the order they should be drawn (alpha-to-coverage cutout pass).
pub fn cutout_batches(&self) -> &[DrawBatch]
Sourcepub fn cutout_stream(&self) -> (&[RenderOp], &[u32])
pub fn cutout_stream(&self) -> (&[RenderOp], &[u32])
DFS-ordered render stream for the alpha-to-coverage cutout phase.
pub fn cutout_stream_excluding( &self, excluded_instance: Option<InstanceHandle>, ) -> (Vec<RenderOp>, Vec<u32>)
Sourcepub fn emissive_cutout_order(&self) -> &[u32]
pub fn emissive_cutout_order(&self) -> &[u32]
Indices into instances() in the order they should be drawn (emissive cutout batching).
pub fn emissive_cutout_batches(&self) -> &[DrawBatch]
Sourcepub fn overlay_order(&self) -> &[u32]
pub fn overlay_order(&self) -> &[u32]
Indices into instances() in the order they should be drawn (overlay pass).
pub fn overlay_batches(&self) -> &[DrawBatch]
Sourcepub fn transparent_single_stream(&self) -> (&[RenderOp], &[u32])
pub fn transparent_single_stream(&self) -> (&[RenderOp], &[u32])
DFS-ordered render stream for the single-layer transparent phase.
pub fn transparent_single_stream_excluding( &self, excluded_instance: Option<InstanceHandle>, ) -> (Vec<RenderOp>, Vec<u32>)
Sourcepub fn overlay_stream(&self) -> (&[RenderOp], &[u32])
pub fn overlay_stream(&self) -> (&[RenderOp], &[u32])
DFS-ordered render stream for the overlay phase.
Returns (ops, instance_indices).
opsis the sequence ofEnterClip,DrawBatch, andExitClipcommands.instance_indices[batch.start .. batch.start + batch.count]gives theVisualInstanceindices for eachDrawBatchop.
pub fn overlay_stream_excluding( &self, excluded_instance: Option<InstanceHandle>, ) -> (Vec<RenderOp>, Vec<u32>)
Sourcepub fn opaque_stream(&self) -> (&[RenderOp], &[u32])
pub fn opaque_stream(&self) -> (&[RenderOp], &[u32])
DFS-ordered render stream for the opaque phase.
Returns (ops, instance_indices).
pub fn opaque_stream_excluding( &self, excluded_instance: Option<InstanceHandle>, ) -> (Vec<RenderOp>, Vec<u32>)
Sourcepub fn stencil_clip_order(&self) -> &[u32]
pub fn stencil_clip_order(&self) -> &[u32]
Indices into instances() where is_stencil_clip=true, sorted by stencil_ref ascending.
Used by the renderer to inject stencil write/restore draws around clipped batch groups.
Sourcepub fn register_stencil_clip(
&mut self,
handle: InstanceHandle,
stencil_ref: u8,
) -> bool
pub fn register_stencil_clip( &mut self, handle: InstanceHandle, stencil_ref: u8, ) -> bool
Mark an instance as a stencil clip source with the given reference value. Triggers draw cache rebuild.
Sourcepub fn unregister_stencil_clip(&mut self, handle: InstanceHandle) -> bool
pub fn unregister_stencil_clip(&mut self, handle: InstanceHandle) -> bool
Remove stencil clip status from an instance.
Sourcepub fn update_stencil_ref(
&mut self,
handle: InstanceHandle,
stencil_ref: u8,
) -> bool
pub fn update_stencil_ref( &mut self, handle: InstanceHandle, stencil_ref: u8, ) -> bool
Update the stencil reference value for a clipped instance (not the clip source itself).
Sourcepub fn transparent_single_draw_order(&self) -> &[u32]
pub fn transparent_single_draw_order(&self) -> &[u32]
Indices into instances() in the order they should be drawn (single-layer transparent pass).
pub fn transparent_single_draw_batches(&self) -> &[DrawBatch]
Sourcepub fn transparent_multi_draw_order(&self) -> &[u32]
pub fn transparent_multi_draw_order(&self) -> &[u32]
Indices into instances() in the order they should be drawn (multi-layer transparent pass).
pub fn transparent_multi_draw_batches(&self) -> &[DrawBatch]
pub fn transparent_multi_draw_excluding( &self, excluded_instance: Option<InstanceHandle>, ) -> (Vec<u32>, Vec<DrawBatch>)
Sourcepub fn prepare_draw_cache(&mut self) -> bool
pub fn prepare_draw_cache(&mut self) -> bool
Call once per frame before rendering. Cheap if nothing changed.
Returns true if the cached draw order/batches were rebuilt this call.
pub fn prepare_transparent_multi_draw_cache_for_eye( &mut self, target: CameraTarget, eye: usize, )
Sourcepub fn prepare_transparent_multi_draw_cache_for_view(
&mut self,
view: [[f32; 4]; 4],
)
pub fn prepare_transparent_multi_draw_cache_for_view( &mut self, view: [[f32; 4]; 4], )
Rebuild multi-layer transparent draw order/batches for a specific view matrix.
pub fn register( &mut self, cid: ComponentId, renderable: GpuRenderable, transform: Transform, color: [f32; 4], opacity: f32, multiple_layers: bool, transparent_cutout: bool, background: bool, background_occluded_lit: bool, overlay: bool, emissive: f32, texture: Option<TextureHandle>, quant_steps: f32, ) -> InstanceHandle
pub fn update_quant_steps( &mut self, handle: InstanceHandle, quant_steps: f32, ) -> bool
pub fn remove(&mut self, handle: InstanceHandle) -> bool
pub fn update_transform( &mut self, handle: InstanceHandle, transform: Transform, ) -> bool
pub fn update_model( &mut self, handle: InstanceHandle, model: TransformMatrix, ) -> bool
pub fn update_color(&mut self, handle: InstanceHandle, color: [f32; 4]) -> bool
pub fn update_opacity(&mut self, handle: InstanceHandle, opacity: f32) -> bool
pub fn update_opacity_state( &mut self, handle: InstanceHandle, opacity: f32, multiple_layers: impl Into<Option<bool>>, ) -> bool
pub fn update_transparent_cutout( &mut self, handle: InstanceHandle, enabled: bool, ) -> bool
pub fn update_emissive(&mut self, handle: InstanceHandle, emissive: f32) -> bool
pub fn update_material( &mut self, handle: InstanceHandle, material: MaterialHandle, ) -> bool
pub fn post_processing(&self) -> &PostProcessingConfig
pub fn post_processing_mut(&mut self) -> &mut PostProcessingConfig
pub fn set_post_processing(&mut self, config: PostProcessingConfig)
pub fn runtime_texture_handle(&self, key: &str) -> Option<TextureHandle>
pub fn stencil_clip_debug_requested(&self) -> bool
pub fn set_stencil_clip_debug_requested(&mut self, requested: bool)
pub fn set_runtime_texture_handle( &mut self, key: impl Into<String>, handle: TextureHandle, )
pub fn update_texture( &mut self, handle: InstanceHandle, texture: Option<TextureHandle>, ) -> bool
pub fn update_texture_filtering( &mut self, handle: InstanceHandle, filtering: TextureFiltering, ) -> bool
pub fn update( &mut self, handle: InstanceHandle, renderable: GpuRenderable, transform: Transform, ) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VisualWorld
impl RefUnwindSafe for VisualWorld
impl Send for VisualWorld
impl Sync for VisualWorld
impl Unpin for VisualWorld
impl UnsafeUnpin for VisualWorld
impl UnwindSafe for VisualWorld
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
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.