diff --git a/experiments/2024-10-30/src/export.rs b/experiments/2024-10-30/src/export.rs index 03f0ed063..84b353194 100644 --- a/experiments/2024-10-30/src/export.rs +++ b/experiments/2024-10-30/src/export.rs @@ -14,7 +14,7 @@ pub fn export(mesh: &Mesh) -> anyhow::Result<()> { vertex: mesh_vertices .into_iter() .map(|Vertex { point }| point) - .map(|point| point.map(|coord| coord.inner)) + .map(|point| point.map(|coord| coord.value())) .map(|[x, y, z]| threemf::model::Vertex { x, y, z }) .collect(), }, diff --git a/experiments/2024-10-30/src/math.rs b/experiments/2024-10-30/src/math.rs index f96a59e98..2aba05c18 100644 --- a/experiments/2024-10-30/src/math.rs +++ b/experiments/2024-10-30/src/math.rs @@ -9,4 +9,8 @@ impl Scalar { pub fn new(value: f64) -> Self { Self { inner: value } } + + pub fn value(&self) -> f64 { + self.inner + } } diff --git a/experiments/2024-10-30/src/render.rs b/experiments/2024-10-30/src/render.rs index 23267a132..5a591d043 100644 --- a/experiments/2024-10-30/src/render.rs +++ b/experiments/2024-10-30/src/render.rs @@ -204,7 +204,7 @@ impl Renderer { .get(index as usize) .unwrap() .point - .map(|coord| coord.inner as f32), + .map(|coord| coord.value() as f32), ) }); let normal = {