pub struct Mesh { /* private fields */ }Expand description
Implementations§
Source§impl Mesh
impl Mesh
Sourcepub const fn torus_knot(radius: f32, tube: f32) -> Self
pub const fn torus_knot(radius: f32, tube: f32) -> Self
A torus knot.
Sourcepub const fn icosahedron(radius: f32) -> Self
pub const fn icosahedron(radius: f32) -> Self
An icosahedron.
Sourcepub const fn dodecahedron(radius: f32) -> Self
pub const fn dodecahedron(radius: f32) -> Self
A dodecahedron.
Sourcepub const fn octahedron(radius: f32) -> Self
pub const fn octahedron(radius: f32) -> Self
An octahedron.
Sourcepub const fn tetrahedron(radius: f32) -> Self
pub const fn tetrahedron(radius: f32) -> Self
A tetrahedron.
Sourcepub const fn material(self, material: Material) -> Self
pub const fn material(self, material: Material) -> Self
Sets the material. Default: Material::Standard.
Sourcepub const fn emissive(self, color: Color) -> Self
pub const fn emissive(self, color: Color) -> Self
Sets the emissive (glow) color. Lit materials only.
Sourcepub const fn metalness(self, value: f32) -> Self
pub const fn metalness(self, value: f32) -> Self
Sets the metalness, 0..=1. PBR materials only.
Sourcepub const fn roughness(self, value: f32) -> Self
pub const fn roughness(self, value: f32) -> Self
Sets the roughness, 0..=1. PBR materials only.
Sourcepub const fn opacity(self, value: f32) -> Self
pub const fn opacity(self, value: f32) -> Self
Sets the opacity, 0..=1. A value below 1 makes the material
transparent.
Sourcepub fn rotation(self, degrees: impl Into<Vec3>) -> Self
pub fn rotation(self, degrees: impl Into<Vec3>) -> Self
Sets the rotation in degrees (X, Y, Z order).
Sourcepub fn scale(self, scale: impl Into<Vec3>) -> Self
pub fn scale(self, scale: impl Into<Vec3>) -> Self
Sets the scale. Use Vec3::splat for a uniform scale.
Sourcepub fn spin(self, degrees_per_second: impl Into<Vec3>) -> Self
pub fn spin(self, degrees_per_second: impl Into<Vec3>) -> Self
Spins the object, in degrees per second on each axis.
Spin stops when the user prefers reduced motion, unless the scene
calls Scene::animate_reduced_motion.
Trait Implementations§
impl Copy for Mesh
Source§impl From<Mesh> for SceneObject
impl From<Mesh> for SceneObject
impl StructuralPartialEq for Mesh
Auto Trait Implementations§
impl Forget for Mesh
impl Freeze for Mesh
impl RefUnwindSafe for Mesh
impl Send for Mesh
impl Sync for Mesh
impl Unpin for Mesh
impl UnsafeUnpin for Mesh
impl UnwindSafe for Mesh
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
Open a deferred
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.