pub struct Transform {
pub position: Point3<f32>,
pub rotation: Quaternion<f32>,
pub scale: Vector3<f32>,
}
Expand description
A 3D transform, with position, rotation, and scale.
Fields
position: Point3<f32>
rotation: Quaternion<f32>
scale: Vector3<f32>
Implementations
sourceimpl Transform
impl Transform
sourcepub fn from_position(position: Point3<f32>) -> Transform
pub fn from_position(position: Point3<f32>) -> Transform
Creates a transform with the given position.
sourcepub fn from_rotation(rotation: Quaternion<f32>) -> Transform
pub fn from_rotation(rotation: Quaternion<f32>) -> Transform
Creates a transform with the given rotation.
sourcepub fn from_scale(scale: Vector3<f32>) -> Transform
pub fn from_scale(scale: Vector3<f32>) -> Transform
Creates a transform with the given scale.
sourcepub fn from_uniform_scale(scale: f32) -> Transform
pub fn from_uniform_scale(scale: f32) -> Transform
Creates a transform with the given uniform scale (scaling all axes by the same amount).
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more