pub struct SnapSettings {
pub translation: Vec3,
pub rotation_radians: f32,
pub scale: Vec3,
}Expand description
Quantization increments for editor transforms. Zero disables a component.
Fields§
§translation: Vec3Translation increments per axis.
rotation_radians: f32Rotation increment in radians.
scale: Vec3Scale increments per axis.
Implementations§
Source§impl SnapSettings
impl SnapSettings
Sourcepub fn snap_translation(self, delta: Vec3) -> Vec3
pub fn snap_translation(self, delta: Vec3) -> Vec3
Quantizes a translation relative to the operation start.
Sourcepub fn snap_rotation(self, radians: f32) -> f32
pub fn snap_rotation(self, radians: f32) -> f32
Quantizes a rotation angle relative to the operation start.
Sourcepub fn snap_scale(self, delta: Vec3) -> Vec3
pub fn snap_scale(self, delta: Vec3) -> Vec3
Quantizes a scale delta relative to the operation start.
Trait Implementations§
Source§impl Clone for SnapSettings
impl Clone for SnapSettings
Source§fn clone(&self) -> SnapSettings
fn clone(&self) -> SnapSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SnapSettings
Source§impl Debug for SnapSettings
impl Debug for SnapSettings
Source§impl Default for SnapSettings
impl Default for SnapSettings
Source§fn default() -> SnapSettings
fn default() -> SnapSettings
Returns the “default value” for a type. Read more
Source§impl PartialEq for SnapSettings
impl PartialEq for SnapSettings
impl StructuralPartialEq for SnapSettings
Auto Trait Implementations§
impl Freeze for SnapSettings
impl RefUnwindSafe for SnapSettings
impl Send for SnapSettings
impl Sync for SnapSettings
impl Unpin for SnapSettings
impl UnsafeUnpin for SnapSettings
impl UnwindSafe for SnapSettings
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