diff --git a/src/third_party/glam/common/glam_isometry.rs b/src/third_party/glam/common/glam_isometry.rs index 6bd970d29..3a8d49618 100644 --- a/src/third_party/glam/common/glam_isometry.rs +++ b/src/third_party/glam/common/glam_isometry.rs @@ -1,5 +1,5 @@ use super::glam::{DMat3, DMat4, DQuat, DVec2, DVec3, Mat3, Mat4, Quat, Vec2, Vec3}; -use crate::{Isometry2, Isometry3, Matrix3, Matrix4}; +use crate::{Isometry2, Isometry3, Matrix3, Matrix4, Translation3, UnitQuaternion, Vector2}; use std::convert::TryFrom; impl From> for Mat3 { @@ -102,61 +102,61 @@ impl From<(DVec2, f64)> for Isometry2 { impl From for Isometry3 { fn from(rot: Quat) -> Self { - Isometry3::from_parts(crate::one(), rot.into()) + Isometry3::from_parts(Translation3::identity(), rot.into()) } } impl From for Isometry3 { fn from(rot: DQuat) -> Self { - Isometry3::from_parts(crate::one(), rot.into()) + Isometry3::from_parts(Translation3::identity(), rot.into()) } } impl From for Isometry2 { fn from(rot: Quat) -> Self { - Isometry2::new(crate::zero(), rot.to_axis_angle().1) + Isometry2::new(Vector2::zeros(), rot.to_axis_angle().1) } } impl From for Isometry2 { fn from(rot: DQuat) -> Self { - Isometry2::new(crate::zero(), rot.to_axis_angle().1) + Isometry2::new(Vector2::zeros(), rot.to_axis_angle().1) } } impl From for Isometry3 { fn from(tra: Vec3) -> Self { - Isometry3::from_parts(tra.into(), crate::one()) + Isometry3::from_parts(tra.into(), UnitQuaternion::identity()) } } impl From for Isometry3 { fn from(tra: DVec3) -> Self { - Isometry3::from_parts(tra.into(), crate::one()) + Isometry3::from_parts(tra.into(), UnitQuaternion::identity()) } } impl From for Isometry2 { fn from(tra: Vec2) -> Self { - Isometry2::new(tra.into(), crate::one()) + Isometry2::new(tra.into(), 0.0) } } impl From for Isometry2 { fn from(tra: DVec2) -> Self { - Isometry2::new(tra.into(), crate::one()) + Isometry2::new(tra.into(), 0.0) } } impl From for Isometry2 { fn from(tra: Vec3) -> Self { - Isometry2::new([tra.x, tra.y].into(), crate::one()) + Isometry2::new([tra.x, tra.y].into(), 0.0) } } impl From for Isometry2 { fn from(tra: DVec3) -> Self { - Isometry2::new([tra.x, tra.y].into(), crate::one()) + Isometry2::new([tra.x, tra.y].into(), 0.0) } }