library: render: mesh: use nalgebra::zero instead
This commit is contained in:
parent
15381d4bbd
commit
f0d36c7d7b
|
@ -27,9 +27,9 @@ pub struct Mesh {
|
||||||
#[derive(Debug, PartialEq, Deserialize)]
|
#[derive(Debug, PartialEq, Deserialize)]
|
||||||
pub(crate) struct Wavefront {
|
pub(crate) struct Wavefront {
|
||||||
pub obj_file: PathBuf,
|
pub obj_file: PathBuf,
|
||||||
#[serde(default = "crate::serialize::vector::zeros")]
|
#[serde(default = "nalgebra::zero")]
|
||||||
translation: Vector,
|
translation: Vector,
|
||||||
#[serde(default = "crate::serialize::vector::zeros")]
|
#[serde(default = "nalgebra::zero")]
|
||||||
rotation: Vector,
|
rotation: Vector,
|
||||||
#[serde(default = "crate::serialize::coefficient::default_identity")]
|
#[serde(default = "crate::serialize::coefficient::default_identity")]
|
||||||
scale: f32,
|
scale: f32,
|
||||||
|
|
|
@ -14,8 +14,3 @@ where
|
||||||
let v: Vector = Deserialize::deserialize(deserializer)?;
|
let v: Vector = Deserialize::deserialize(deserializer)?;
|
||||||
Ok(Unit::new_normalize(v))
|
Ok(Unit::new_normalize(v))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return a vector containing all zeros.
|
|
||||||
pub fn zeros() -> Vector {
|
|
||||||
Vector::new(0., 0., 0.)
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue