pub struct Transform {
pub position: [f32; 3],
pub rotation: [f32; 3],
pub scale: [f32; 3],
}Fields§
§position: [f32; 3]§rotation: [f32; 3]§scale: [f32; 3]Implementations§
Source§impl Transform
impl Transform
pub fn new(position: [f32; 3]) -> Self
pub fn with_position(self, x: f32, y: f32, z: f32) -> Self
pub fn with_rotation(self, x: f32, y: f32, z: f32) -> Self
pub fn with_scale(self, x: f32, y: f32, z: f32) -> Self
pub fn to_matrix(&self) -> [[f32; 4]; 4]
pub fn from_matrix(m: Matrix4<f32>) -> Self
Trait Implementations§
impl Copy for Transform
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnsafeUnpin for Transform
impl UnwindSafe for Transform
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,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.