pub struct Mesh {
pub container: Container,
pub texture: Texture,
pub tint: Color,
pub rotation_y: f32,
pub perspective_strength: f32,
}Expand description
Textured quad with 3D perspective rotation around the Y axis.
Fields§
§container: ContainerTransform / visibility container.
texture: TextureTexture sampled across the quad.
tint: ColorMultiplicative tint applied to the sampled texel.
rotation_y: f32Rotation angle around the Y (vertical) axis, in radians.
perspective_strength: f32Perspective strength: 0.0 = orthographic, 1.0 = strong foreshortening.
Implementations§
Source§impl Mesh
impl Mesh
Sourcepub fn from_texture(texture: Texture) -> Self
pub fn from_texture(texture: Texture) -> Self
Construct a Mesh from a texture, with no rotation and mild perspective.
Sourcepub fn with_rotation_y(self, radians: f32) -> Self
pub fn with_rotation_y(self, radians: f32) -> Self
Builder: set the Y-axis rotation.
Sourcepub fn with_perspective(self, strength: f32) -> Self
pub fn with_perspective(self, strength: f32) -> Self
Builder: set the perspective strength (0.0–1.0 typical).
Trait Implementations§
Auto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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