diff --git a/pathtracer/src/render/mesh.rs b/pathtracer/src/render/mesh.rs index 9f9295d..6c41ae3 100644 --- a/pathtracer/src/render/mesh.rs +++ b/pathtracer/src/render/mesh.rs @@ -27,9 +27,9 @@ pub struct Mesh { #[derive(Debug, PartialEq, Deserialize)] pub(crate) struct Wavefront { pub obj_file: PathBuf, - #[serde(default = "crate::serialize::vector::zeros")] + #[serde(default = "nalgebra::zero")] translation: Vector, - #[serde(default = "crate::serialize::vector::zeros")] + #[serde(default = "nalgebra::zero")] rotation: Vector, #[serde(default = "crate::serialize::coefficient::default_identity")] scale: f32, diff --git a/pathtracer/src/serialize/vector.rs b/pathtracer/src/serialize/vector.rs index 8d02fea..7ffc605 100644 --- a/pathtracer/src/serialize/vector.rs +++ b/pathtracer/src/serialize/vector.rs @@ -14,8 +14,3 @@ where let v: Vector = Deserialize::deserialize(deserializer)?; Ok(Unit::new_normalize(v)) } - -/// Return a vector containing all zeros. -pub fn zeros() -> Vector { - Vector::new(0., 0., 0.) -}