|
1 | 1 | use super::glam::{DMat3, DMat4, DQuat, DVec2, DVec3, Mat3, Mat4, Quat, Vec2, Vec3}; |
2 | | -use crate::{Isometry2, Isometry3, Matrix3, Matrix4}; |
| 2 | +use crate::{Isometry2, Isometry3, Matrix3, Matrix4, Translation3, UnitQuaternion, Vector2}; |
3 | 3 | use std::convert::TryFrom; |
4 | 4 |
|
5 | 5 | impl From<Isometry2<f32>> for Mat3 { |
@@ -102,61 +102,61 @@ impl From<(DVec2, f64)> for Isometry2<f64> { |
102 | 102 |
|
103 | 103 | impl From<Quat> for Isometry3<f32> { |
104 | 104 | fn from(rot: Quat) -> Self { |
105 | | - Isometry3::from_parts(crate::one(), rot.into()) |
| 105 | + Isometry3::from_parts(Translation3::identity(), rot.into()) |
106 | 106 | } |
107 | 107 | } |
108 | 108 |
|
109 | 109 | impl From<DQuat> for Isometry3<f64> { |
110 | 110 | fn from(rot: DQuat) -> Self { |
111 | | - Isometry3::from_parts(crate::one(), rot.into()) |
| 111 | + Isometry3::from_parts(Translation3::identity(), rot.into()) |
112 | 112 | } |
113 | 113 | } |
114 | 114 |
|
115 | 115 | impl From<Quat> for Isometry2<f32> { |
116 | 116 | fn from(rot: Quat) -> Self { |
117 | | - Isometry2::new(crate::zero(), rot.to_axis_angle().1) |
| 117 | + Isometry2::new(Vector2::zeros(), rot.to_axis_angle().1) |
118 | 118 | } |
119 | 119 | } |
120 | 120 |
|
121 | 121 | impl From<DQuat> for Isometry2<f64> { |
122 | 122 | fn from(rot: DQuat) -> Self { |
123 | | - Isometry2::new(crate::zero(), rot.to_axis_angle().1) |
| 123 | + Isometry2::new(Vector2::zeros(), rot.to_axis_angle().1) |
124 | 124 | } |
125 | 125 | } |
126 | 126 |
|
127 | 127 | impl From<Vec3> for Isometry3<f32> { |
128 | 128 | fn from(tra: Vec3) -> Self { |
129 | | - Isometry3::from_parts(tra.into(), crate::one()) |
| 129 | + Isometry3::from_parts(tra.into(), UnitQuaternion::identity()) |
130 | 130 | } |
131 | 131 | } |
132 | 132 |
|
133 | 133 | impl From<DVec3> for Isometry3<f64> { |
134 | 134 | fn from(tra: DVec3) -> Self { |
135 | | - Isometry3::from_parts(tra.into(), crate::one()) |
| 135 | + Isometry3::from_parts(tra.into(), UnitQuaternion::identity()) |
136 | 136 | } |
137 | 137 | } |
138 | 138 |
|
139 | 139 | impl From<Vec2> for Isometry2<f32> { |
140 | 140 | fn from(tra: Vec2) -> Self { |
141 | | - Isometry2::new(tra.into(), crate::one()) |
| 141 | + Isometry2::new(tra.into(), 0.0) |
142 | 142 | } |
143 | 143 | } |
144 | 144 |
|
145 | 145 | impl From<DVec2> for Isometry2<f64> { |
146 | 146 | fn from(tra: DVec2) -> Self { |
147 | | - Isometry2::new(tra.into(), crate::one()) |
| 147 | + Isometry2::new(tra.into(), 0.0) |
148 | 148 | } |
149 | 149 | } |
150 | 150 |
|
151 | 151 | impl From<Vec3> for Isometry2<f32> { |
152 | 152 | fn from(tra: Vec3) -> Self { |
153 | | - Isometry2::new([tra.x, tra.y].into(), crate::one()) |
| 153 | + Isometry2::new([tra.x, tra.y].into(), 0.0) |
154 | 154 | } |
155 | 155 | } |
156 | 156 |
|
157 | 157 | impl From<DVec3> for Isometry2<f64> { |
158 | 158 | fn from(tra: DVec3) -> Self { |
159 | | - Isometry2::new([tra.x, tra.y].into(), crate::one()) |
| 159 | + Isometry2::new([tra.x, tra.y].into(), 0.0) |
160 | 160 | } |
161 | 161 | } |
162 | 162 |
|
|
0 commit comments