pub struct Mesh { /* private fields */ }
Expand description
Mesh is a 3D model, each mesh split into multiple surfaces, each surface represents a patch of the mesh with a single material
assigned to each face. See Surface
docs for more info.
§How to create
Usually there is no need to manually create meshes, it is much easier to make one in a 3d modelling software or just download
some model you like and load it in engine. See crate::resource::model::Model
docs for more info about model resources.
However, sometimes there’s a need to create meshes manually (for example - in games with procedurally-generated content). You can do it like so:
use fyrox_resource::untyped::ResourceKind;
fn create_cube_mesh(graph: &mut Graph) -> Handle<Node> {
let cube_surface_data = SurfaceData::make_cube(Matrix4::identity());
let cube_surface = SurfaceBuilder::new(SurfaceResource::new_ok(ResourceKind::Embedded, cube_surface_data)).build();
MeshBuilder::new(BaseBuilder::new())
.with_surfaces(vec![cube_surface])
.build(graph)
}
This example creates a unit cube surface with default material and then creates a mesh with this surface. If you need to create
custom surface, see crate::scene::mesh::surface::SurfaceData
docs for more info.
Implementations§
Source§impl Mesh
impl Mesh
pub const BASE: &'static str = "base"
pub const SURFACES: &'static str = "surfaces"
pub const RENDER_PATH: &'static str = "render_path"
pub const BATCHING_MODE: &'static str = "batching_mode"
pub const BLEND_SHAPES_PROPERTY_NAME: &'static str = "blend_shapes_property_name"
pub const BLEND_SHAPES: &'static str = "blend_shapes"
Source§impl Mesh
impl Mesh
Sourcepub const DEFAULT_BLEND_SHAPES_PROPERTY_NAME: &'static str = "blendShapesStorage"
pub const DEFAULT_BLEND_SHAPES_PROPERTY_NAME: &'static str = "blendShapesStorage"
Default name of the blend shapes storage property in a shader.
Sourcepub fn set_surfaces(&mut self, surfaces: Vec<Surface>) -> Vec<Surface>
pub fn set_surfaces(&mut self, surfaces: Vec<Surface>) -> Vec<Surface>
Sets surfaces for the mesh.
Sourcepub fn surfaces_mut(&mut self) -> &mut [Surface]
pub fn surfaces_mut(&mut self) -> &mut [Surface]
Returns mutable reference to array of surfaces.
Sourcepub fn clear_surfaces(&mut self)
pub fn clear_surfaces(&mut self)
Removes all surfaces from mesh.
Sourcepub fn add_surface(&mut self, surface: Surface)
pub fn add_surface(&mut self, surface: Surface)
Adds new surface into mesh, can be used to procedurally generate meshes.
Sourcepub fn blend_shapes(&self) -> &[BlendShape]
pub fn blend_shapes(&self) -> &[BlendShape]
Returns a list of blend shapes.
Sourcepub fn blend_shapes_mut(&mut self) -> &mut [BlendShape]
pub fn blend_shapes_mut(&mut self) -> &mut [BlendShape]
Returns a list of blend shapes.
Sourcepub fn set_render_path(&mut self, render_path: RenderPath) -> RenderPath
pub fn set_render_path(&mut self, render_path: RenderPath) -> RenderPath
Sets new render path for the mesh.
Sourcepub fn render_path(&self) -> RenderPath
pub fn render_path(&self) -> RenderPath
Returns current render path of the mesh.
Sourcepub fn accurate_world_bounding_box(
&self,
graph: &Graph,
) -> AxisAlignedBoundingBox
pub fn accurate_world_bounding_box( &self, graph: &Graph, ) -> AxisAlignedBoundingBox
Calculate very accurate bounding box in world coordinates including influence of bones. This method is very heavy and not intended to use every frame!
Sourcepub fn set_batching_mode(&mut self, mode: BatchingMode) -> BatchingMode
pub fn set_batching_mode(&mut self, mode: BatchingMode) -> BatchingMode
Enable or disable dynamic batching. It could be useful to reduce amount of draw calls per frame if you have lots of meshes with small vertex count. Does not work with meshes, that have skin or blend shapes. Such meshes will be drawn in a separate draw call.
Sourcepub fn batching_mode(&self) -> BatchingMode
pub fn batching_mode(&self) -> BatchingMode
Returns true
if the dynamic batching is enabled, false
otherwise.
Methods from Deref<Target = Base>§
pub const NAME: &'static str = "name"
pub const LOCAL_TRANSFORM: &'static str = "local_transform"
pub const VISIBILITY: &'static str = "visibility"
pub const ENABLED: &'static str = "enabled"
pub const LIFETIME: &'static str = "lifetime"
pub const LOD_GROUP: &'static str = "lod_group"
pub const MOBILITY: &'static str = "mobility"
pub const TAG: &'static str = "tag"
pub const CAST_SHADOWS: &'static str = "cast_shadows"
pub const PROPERTIES: &'static str = "properties"
pub const FRUSTUM_CULLING: &'static str = "frustum_culling"
pub const IS_RESOURCE_INSTANCE_ROOT: &'static str = "is_resource_instance_root"
pub const RESOURCE: &'static str = "resource"
pub const SCRIPTS: &'static str = "scripts"
Sourcepub fn handle(&self) -> Handle<Node>
pub fn handle(&self) -> Handle<Node>
Returns handle of the node. A node has valid handle only after it was inserted in a graph!
Sourcepub fn set_name<N: AsRef<str>>(&mut self, name: N)
pub fn set_name<N: AsRef<str>>(&mut self, name: N)
Sets name of node. Can be useful to mark a node to be able to find it later on.
Sourcepub fn name_owned(&self) -> String
pub fn name_owned(&self) -> String
Returns owned name of node.
Sourcepub fn local_transform(&self) -> &Transform
pub fn local_transform(&self) -> &Transform
Returns shared reference to local transform of a node, can be used to fetch some local spatial properties, such as position, rotation, scale, etc.
Sourcepub fn local_transform_mut(&mut self) -> &mut Transform
pub fn local_transform_mut(&mut self) -> &mut Transform
Returns mutable reference to local transform of a node, can be used to set some local spatial properties, such as position, rotation, scale, etc.
Sourcepub fn set_local_transform(&mut self, transform: Transform)
pub fn set_local_transform(&mut self, transform: Transform)
Sets new local transform of a node.
Sourcepub fn find_properties_ref<'a>(
&'a self,
name: &'a str,
) -> impl Iterator<Item = &'a Property>
pub fn find_properties_ref<'a>( &'a self, name: &'a str, ) -> impl Iterator<Item = &'a Property>
Tries to find properties by the name. The method returns an iterator because it possible to have multiple properties with the same name.
Sourcepub fn find_first_property_ref(&self, name: &str) -> Option<&Property>
pub fn find_first_property_ref(&self, name: &str) -> Option<&Property>
Tries to find a first property with the given name.
Sourcepub fn set_properties(&mut self, properties: Vec<Property>) -> Vec<Property>
pub fn set_properties(&mut self, properties: Vec<Property>) -> Vec<Property>
Sets a new set of properties of the node.
Sourcepub fn set_lifetime(&mut self, time_seconds: Option<f32>) -> &mut Self
pub fn set_lifetime(&mut self, time_seconds: Option<f32>) -> &mut Self
Sets lifetime of node in seconds, lifetime is useful for temporary objects. Example - you firing a gun, it produces two particle systems for each shot: one for gunpowder fumes and one when bullet hits some surface. These particle systems won’t last very long - usually they will disappear in 1-2 seconds but nodes will still be in scene consuming precious CPU clocks. This is where lifetimes become handy - you just set appropriate lifetime for a particle system node and it will be removed from scene when time will end. This is efficient algorithm because scene holds every object in pool and allocation or deallocation of node takes very little amount of time.
Sourcepub fn lifetime(&self) -> Option<f32>
pub fn lifetime(&self) -> Option<f32>
Returns current lifetime of a node. Will be None if node has undefined lifetime.
For more info about lifetimes see set_lifetime
.
Sourcepub fn children(&self) -> &[Handle<Node>]
pub fn children(&self) -> &[Handle<Node>]
Returns slice of handles to children nodes. This can be used, for example, to traverse tree starting from some node.
Sourcepub fn global_transform(&self) -> Matrix4<f32>
pub fn global_transform(&self) -> Matrix4<f32>
Returns global transform matrix, such matrix contains combined transformation of transforms of parent nodes. This is the final matrix that describes real location of object in the world.
Sourcepub fn global_transform_without_scaling(&self) -> Matrix4<f32>
pub fn global_transform_without_scaling(&self) -> Matrix4<f32>
Calculates global transform of the node, but discards scaling part of it.
Sourcepub fn inv_bind_pose_transform(&self) -> Matrix4<f32>
pub fn inv_bind_pose_transform(&self) -> Matrix4<f32>
Returns inverse of bind pose matrix. Bind pose matrix - is special matrix for bone nodes, it stores initial transform of bone node at the moment of “binding” vertices to bones.
Sourcepub fn is_resource_instance_root(&self) -> bool
pub fn is_resource_instance_root(&self) -> bool
Returns true if this node is model resource instance root node.
Sourcepub fn resource(&self) -> Option<ModelResource>
pub fn resource(&self) -> Option<ModelResource>
Returns resource from which this node was instantiated from.
Sourcepub fn set_visibility(&mut self, visibility: bool) -> bool
pub fn set_visibility(&mut self, visibility: bool) -> bool
Sets local visibility of a node.
Sourcepub fn visibility(&self) -> bool
pub fn visibility(&self) -> bool
Returns local visibility of a node.
Sourcepub fn local_bounding_box(&self) -> AxisAlignedBoundingBox
pub fn local_bounding_box(&self) -> AxisAlignedBoundingBox
Returns current local-space bounding box. Keep in mind that this value is just a placeholder, because there is not information to calculate actual bounding box.
Sourcepub fn world_bounding_box(&self) -> AxisAlignedBoundingBox
pub fn world_bounding_box(&self) -> AxisAlignedBoundingBox
Returns current world-space bounding box.
Sourcepub fn set_mobility(&mut self, mobility: Mobility) -> Mobility
pub fn set_mobility(&mut self, mobility: Mobility) -> Mobility
Set new mobility for the node. See Mobility
docs for more info.
Sourcepub fn global_visibility(&self) -> bool
pub fn global_visibility(&self) -> bool
Returns combined visibility of an node. This is the final visibility of a node. Global visibility calculated using visibility of all parent nodes until root one, so if some parent node upper on tree is invisible then all its children will be invisible. It defines if object will be rendered. It is not the same as real visibility from point of view of a camera. Use frustum-box intersection test instead.
Sourcepub fn original_handle_in_resource(&self) -> Handle<Node>
pub fn original_handle_in_resource(&self) -> Handle<Node>
Handle to node in scene of model resource from which this node was instantiated from.
§Notes
This handle is extensively used to fetch information about the state of node in the resource to sync properties of instance with its original in the resource.
Sourcepub fn global_position(&self) -> Vector3<f32>
pub fn global_position(&self) -> Vector3<f32>
Returns position of the node in absolute coordinates.
Sourcepub fn look_vector(&self) -> Vector3<f32>
pub fn look_vector(&self) -> Vector3<f32>
Returns “look” vector of global transform basis, in most cases return vector will be non-normalized.
Sourcepub fn side_vector(&self) -> Vector3<f32>
pub fn side_vector(&self) -> Vector3<f32>
Returns “side” vector of global transform basis, in most cases return vector will be non-normalized.
Sourcepub fn up_vector(&self) -> Vector3<f32>
pub fn up_vector(&self) -> Vector3<f32>
Returns “up” vector of global transform basis, in most cases return vector will be non-normalized.
Sourcepub fn set_lod_group(&mut self, lod_group: Option<LodGroup>) -> Option<LodGroup>
pub fn set_lod_group(&mut self, lod_group: Option<LodGroup>) -> Option<LodGroup>
Sets new lod group.
Sourcepub fn take_lod_group(&mut self) -> Option<LodGroup>
pub fn take_lod_group(&mut self) -> Option<LodGroup>
Extracts lod group, leaving None in the node.
Sourcepub fn lod_group_mut(&mut self) -> Option<&mut LodGroup>
pub fn lod_group_mut(&mut self) -> Option<&mut LodGroup>
Returns mutable reference to current lod group.
Sourcepub fn frustum_culling(&self) -> bool
pub fn frustum_culling(&self) -> bool
Return the frustum_culling flag
Sourcepub fn set_frustum_culling(&mut self, frustum_culling: bool) -> bool
pub fn set_frustum_culling(&mut self, frustum_culling: bool) -> bool
Sets whether to use frustum culling or not
Sourcepub fn cast_shadows(&self) -> bool
pub fn cast_shadows(&self) -> bool
Returns true if the node should cast shadows, false - otherwise.
Sourcepub fn set_cast_shadows(&mut self, cast_shadows: bool) -> bool
pub fn set_cast_shadows(&mut self, cast_shadows: bool) -> bool
Sets whether the mesh should cast shadows or not.
Sourcepub fn instance_id(&self) -> SceneNodeId
pub fn instance_id(&self) -> SceneNodeId
Returns current instance id.
Sourcepub fn remove_script(&mut self, index: usize)
pub fn remove_script(&mut self, index: usize)
Removes a script with the given index
from the scene node. The script will be destroyed
in either the current update tick (if it was removed from some other script) or in the next
update tick of the parent graph.
Sourcepub fn remove_all_scripts(&mut self)
pub fn remove_all_scripts(&mut self)
Removes all assigned scripts from the scene node. The scripts will be removed from first-to-last order an their actual destruction will happen either on the current update tick of the parent graph (if it was removed from some other script) or in the next update tick.
Sourcepub fn replace_script(&mut self, index: usize, script: Option<Script>)
pub fn replace_script(&mut self, index: usize, script: Option<Script>)
Sets a new script for the scene node by index. Previous script will be removed (see
Self::remove_script
docs for more info).
Sourcepub fn add_script<T>(&mut self, script: T)where
T: ScriptTrait,
pub fn add_script<T>(&mut self, script: T)where
T: ScriptTrait,
Adds a new script to the scene node. The new script will be initialized either in the current
update tick (if the script was added in one of the ScriptTrait
methods) or on the next
update tick.
Sourcepub fn has_script<T>(&self) -> boolwhere
T: ScriptTrait,
pub fn has_script<T>(&self) -> boolwhere
T: ScriptTrait,
Checks if the node has a script of a particular type. Returns false
if there is no such
script.
Sourcepub fn has_scripts_assigned(&self) -> bool
pub fn has_scripts_assigned(&self) -> bool
Checks if the node has any scripts assigned.
Sourcepub fn try_get_script<T>(&self) -> Option<&T>where
T: ScriptTrait,
pub fn try_get_script<T>(&self) -> Option<&T>where
T: ScriptTrait,
Tries to find a first script of the given type T
, returns None
if there’s no such
script.
Sourcepub fn try_get_scripts<T>(&self) -> impl Iterator<Item = &T>where
T: ScriptTrait,
pub fn try_get_scripts<T>(&self) -> impl Iterator<Item = &T>where
T: ScriptTrait,
Returns an iterator that yields references to the scripts of the given type T
.
Sourcepub fn try_get_script_mut<T>(&mut self) -> Option<&mut T>where
T: ScriptTrait,
pub fn try_get_script_mut<T>(&mut self) -> Option<&mut T>where
T: ScriptTrait,
Tries to find a first script of the given type T
, returns None
if there’s no such
script.
Sourcepub fn try_get_scripts_mut<T>(&mut self) -> impl Iterator<Item = &mut T>where
T: ScriptTrait,
pub fn try_get_scripts_mut<T>(&mut self) -> impl Iterator<Item = &mut T>where
T: ScriptTrait,
Returns an iterator that yields references to the scripts of the given type T
.
Sourcepub fn try_get_script_component<C>(&self) -> Option<&C>where
C: Any,
pub fn try_get_script_component<C>(&self) -> Option<&C>where
C: Any,
Tries find a component of the given type C
across all available scripts of the node.
If you want to search a component C
in a particular script, then use Self::try_get_script
and then search for component in it.
Sourcepub fn try_get_script_component_mut<C>(&mut self) -> Option<&mut C>where
C: Any,
pub fn try_get_script_component_mut<C>(&mut self) -> Option<&mut C>where
C: Any,
Tries find a component of the given type C
across all available scripts of the node.
If you want to search a component C
in a particular script, then use Self::try_get_script
and then search for component in it.
Sourcepub fn script_count(&self) -> usize
pub fn script_count(&self) -> usize
Returns total count of scripts assigned to the node.
Sourcepub fn script(&self, index: usize) -> Option<&Script>
pub fn script(&self, index: usize) -> Option<&Script>
Returns a shared reference to a script instance with the given index
. This method will
return None
if the index
is out of bounds or the script is temporarily not available.
This could happen if this method was called from some method of a ScriptTrait
. It
happens because of borrowing rules - you cannot take another reference to a script that is
already mutably borrowed.
Sourcepub fn scripts(&self) -> impl Iterator<Item = &Script>
pub fn scripts(&self) -> impl Iterator<Item = &Script>
Returns an iterator that yields all assigned scripts.
Sourcepub fn script_mut(&mut self, index: usize) -> Option<&mut Script>
pub fn script_mut(&mut self, index: usize) -> Option<&mut Script>
Returns a mutable reference to a script instance with the given index
. This method will
return None
if the index
is out of bounds or the script is temporarily not available.
This could happen if this method was called from some method of a ScriptTrait
. It
happens because of borrowing rules - you cannot take another reference to a script that is
already mutably borrowed.
§Important notes
Do not replace script instance using mutable reference given to you by this method.
This will prevent correct script de-initialization! Use Self::replace_script
if you need
to replace the script.
Sourcepub fn scripts_mut(&mut self) -> impl Iterator<Item = &mut Script>
pub fn scripts_mut(&mut self) -> impl Iterator<Item = &mut Script>
Returns an iterator that yields all assigned scripts.
Sourcepub fn set_enabled(&mut self, enabled: bool) -> bool
pub fn set_enabled(&mut self, enabled: bool) -> bool
Enables or disables scene node. Disabled scene nodes won’t be updated (including scripts) or rendered.
§Important notes
Enabled/disabled state will affect children nodes. It means that if you have a node with children nodes,
and you disable the node, all children nodes will be disabled too even if their Self::is_enabled
method
returns true
.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true
if the node is enabled, false
- otherwise. The return value does not include the state
of parent nodes. It should be considered as “local” enabled flag. To get actual enabled state, that includes
the state of parent nodes, use Self::is_globally_enabled
method.
Sourcepub fn is_globally_enabled(&self) -> bool
pub fn is_globally_enabled(&self) -> bool
Returns true
if the node and every parent up in hierarchy is enabled, false
- otherwise. This method
returns “true” enabled
flag. Its value could be different from the value returned by Self::is_enabled
.
Sourcepub fn root_resource(&self) -> Option<ModelResource>
pub fn root_resource(&self) -> Option<ModelResource>
Returns a root resource of the scene node. This method crawls up on dependency tree until it finds that the ancestor node does not have any dependencies and returns this resource as the root resource. For example, in case of simple scene node instance, this method will return the resource from which the node was instantiated from. In case of 2 or more levels of dependency, it will always return the “top” dependency in the dependency graph.
Trait Implementations§
Source§impl ComponentProvider for Mesh
impl ComponentProvider for Mesh
Source§impl ConstructorProvider<Node, Graph> for Mesh
impl ConstructorProvider<Node, Graph> for Mesh
fn constructor() -> NodeConstructor
Source§impl NodeTrait for Mesh
impl NodeTrait for Mesh
Source§fn local_bounding_box(&self) -> AxisAlignedBoundingBox
fn local_bounding_box(&self) -> AxisAlignedBoundingBox
Returns current bounding box. Bounding box presented in local coordinates WARNING: This method does not includes bounds of bones!
Source§fn world_bounding_box(&self) -> AxisAlignedBoundingBox
fn world_bounding_box(&self) -> AxisAlignedBoundingBox
Returns current world-space bounding box.
Source§fn id(&self) -> Uuid
fn id(&self) -> Uuid
Source§fn on_global_transform_changed(
&self,
new_global_transform: &Matrix4<f32>,
context: &mut SyncContext<'_, '_>,
)
fn on_global_transform_changed( &self, new_global_transform: &Matrix4<f32>, context: &mut SyncContext<'_, '_>, )
Source§fn collect_render_data(&self, ctx: &mut RenderContext<'_>) -> RdcControlFlow
fn collect_render_data(&self, ctx: &mut RenderContext<'_>) -> RdcControlFlow
Source§fn debug_draw(&self, ctx: &mut SceneDrawingContext)
fn debug_draw(&self, ctx: &mut SceneDrawingContext)
Source§fn on_removed_from_graph(&mut self, graph: &mut Graph)
fn on_removed_from_graph(&mut self, graph: &mut Graph)
Source§fn on_unlink(&mut self, graph: &mut Graph)
fn on_unlink(&mut self, graph: &mut Graph)
Source§fn sync_native(
&self,
self_handle: Handle<Node>,
context: &mut SyncContext<'_, '_>,
)
fn sync_native( &self, self_handle: Handle<Node>, context: &mut SyncContext<'_, '_>, )
crate::scene::rigidbody::RigidBody
node.Source§fn on_local_transform_changed(&self, context: &mut SyncContext<'_, '_>)
fn on_local_transform_changed(&self, context: &mut SyncContext<'_, '_>)
Source§fn is_alive(&self) -> bool
fn is_alive(&self) -> bool
Source§fn update(&mut self, context: &mut UpdateContext<'_>)
fn update(&mut self, context: &mut UpdateContext<'_>)
Source§impl Reflect for Meshwhere
Self: 'static,
Base: Reflect,
InheritableVariable<Vec<Surface>>: Reflect,
InheritableVariable<RenderPath>: Reflect,
InheritableVariable<BatchingMode>: Reflect,
String: Reflect,
InheritableVariable<Vec<BlendShape>>: Reflect,
impl Reflect for Meshwhere
Self: 'static,
Base: Reflect,
InheritableVariable<Vec<Surface>>: Reflect,
InheritableVariable<RenderPath>: Reflect,
InheritableVariable<BatchingMode>: Reflect,
String: Reflect,
InheritableVariable<Vec<BlendShape>>: Reflect,
fn source_path() -> &'static str
fn type_name(&self) -> &'static str
fn doc(&self) -> &'static str
Source§fn assembly_name(&self) -> &'static str
fn assembly_name(&self) -> &'static str
#[derive(Reflect)]
) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.Source§fn type_assembly_name() -> &'static str
fn type_assembly_name() -> &'static str
#[derive(Reflect)]
) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.fn fields_info(&self, func: &mut dyn FnMut(&[FieldInfo<'_, '_>]))
fn into_any(self: Box<Self>) -> Box<dyn Any>
fn set( &mut self, value: Box<dyn Reflect>, ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>
Source§fn set_field(
&mut self,
name: &str,
value: Box<dyn Reflect>,
func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>),
)
fn set_field( &mut self, name: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>), )
#[reflect(setter = ..)]
or falls back to
Reflect::field_mut
fn as_any(&self, func: &mut dyn FnMut(&dyn Any))
fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut dyn Any))
fn as_reflect(&self, func: &mut dyn FnMut(&dyn Reflect))
fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut dyn Reflect))
fn fields(&self, func: &mut dyn FnMut(&[&dyn Reflect]))
fn fields_mut(&mut self, func: &mut dyn FnMut(&mut [&mut dyn Reflect]))
fn field(&self, name: &str, func: &mut dyn FnMut(Option<&dyn Reflect>))
fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut dyn Reflect>), )
fn as_array(&self, func: &mut dyn FnMut(Option<&(dyn ReflectArray + 'static)>))
fn as_array_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectArray + 'static)>), )
fn as_list(&self, func: &mut dyn FnMut(Option<&(dyn ReflectList + 'static)>))
fn as_list_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectList + 'static)>), )
fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&(dyn ReflectInheritableVariable + 'static)>), )
fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectInheritableVariable + 'static)>), )
fn as_hash_map( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHashMap + 'static)>), )
fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHashMap + 'static)>), )
Source§impl Visit for Meshwhere
Base: Visit,
InheritableVariable<Vec<Surface>>: Visit,
InheritableVariable<RenderPath>: Visit,
InheritableVariable<BatchingMode>: Visit,
String: Visit,
InheritableVariable<Vec<BlendShape>>: Visit,
impl Visit for Meshwhere
Base: Visit,
InheritableVariable<Vec<Surface>>: Visit,
InheritableVariable<RenderPath>: Visit,
InheritableVariable<BatchingMode>: Visit,
String: Visit,
InheritableVariable<Vec<BlendShape>>: Visit,
Source§fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult
Auto Trait Implementations§
impl !Freeze for Mesh
impl !RefUnwindSafe for Mesh
impl Send for Mesh
impl !Sync for Mesh
impl Unpin for Mesh
impl !UnwindSafe for Mesh
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
Source§impl<T> BaseNodeTrait for T
impl<T> BaseNodeTrait for T
Source§fn clone_box(&self) -> Node
fn clone_box(&self) -> Node
Source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Any
Source§fn as_any_ref_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_ref_mut(&mut self) -> &mut (dyn Any + 'static)
Any
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Any
. Could be used to downcast a trait object
to a particular type.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Any
. Could be used to downcast a trait object
to a particular type.fn into_any(self: Box<T>) -> Box<dyn Any>
Source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.Source§impl<T> ReflectBase for Twhere
T: Reflect,
impl<T> ReflectBase for Twhere
T: Reflect,
fn as_any_raw(&self) -> &(dyn Any + 'static)
fn as_any_raw_mut(&mut self) -> &mut (dyn Any + 'static)
Source§impl<T> ResolvePath for Twhere
T: Reflect,
impl<T> ResolvePath for Twhere
T: Reflect,
fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>), )
fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>), )
fn get_resolve_path<'p, T>(
&self,
path: &'p str,
func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>),
)where
T: Reflect,
fn get_resolve_path_mut<'p, T>(
&mut self,
path: &'p str,
func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>),
)where
T: Reflect,
Source§impl<T> ScriptMessagePayload for T
impl<T> ScriptMessagePayload for T
Source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
self
as &dyn Any
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
self
as &dyn Any
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.