diff --git a/src/structs/iso.rs b/src/structs/iso.rs index 1b45b44b..00bfcbae 100644 --- a/src/structs/iso.rs +++ b/src/structs/iso.rs @@ -61,9 +61,9 @@ impl Iso3 { /// aligned with. /// * up - Vector pointing up. The only requirement of this parameter is to not be colinear /// with `at`. Non-colinearity is not checked. - pub fn look_at(&mut self, eye: &Vec3, at: &Vec3, up: &Vec3) { + pub fn look_at(&mut self, eye: &Pnt3, at: &Pnt3, up: &Vec3) { self.rotation.look_at(&(*at - *eye), up); - self.translation = eye.clone(); + self.translation = eye.as_vec().clone(); } /// Reorient and translate this transformation such that its local `z` axis points to a given @@ -75,9 +75,9 @@ impl Iso3 { /// aligned with /// * up - Vector pointing `up`. The only requirement of this parameter is to not be colinear /// with `at`. Non-colinearity is not checked. - pub fn look_at_z(&mut self, eye: &Vec3, at: &Vec3, up: &Vec3) { + pub fn look_at_z(&mut self, eye: &Pnt3, at: &Pnt3, up: &Vec3) { self.rotation.look_at_z(&(*at - *eye), up); - self.translation = eye.clone(); + self.translation = eye.as_vec().clone(); } } diff --git a/src/structs/iso_macros.rs b/src/structs/iso_macros.rs index 58972174..93e472f0 100644 --- a/src/structs/iso_macros.rs +++ b/src/structs/iso_macros.rs @@ -358,7 +358,7 @@ macro_rules! to_homogeneous_impl( // copy the translation let dim = Dim::dim(None::<$th>); - res.set_col(dim - 1, ToHomogeneous::to_homogeneous(&m.translation)); + res.set_col(dim - 1, ToHomogeneous::to_homogeneous(m.translation.as_pnt()).to_vec()); res }