mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-12 13:58:28 +00:00
Prepare for making Scalar
NaN-safe
This commit is contained in:
parent
babe357f11
commit
378047b79a
@ -14,7 +14,7 @@ pub fn export(mesh: &Mesh) -> anyhow::Result<()> {
|
|||||||
vertex: mesh_vertices
|
vertex: mesh_vertices
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|Vertex { point }| point)
|
.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 })
|
.map(|[x, y, z]| threemf::model::Vertex { x, y, z })
|
||||||
.collect(),
|
.collect(),
|
||||||
},
|
},
|
||||||
|
@ -9,4 +9,8 @@ impl Scalar {
|
|||||||
pub fn new(value: f64) -> Self {
|
pub fn new(value: f64) -> Self {
|
||||||
Self { inner: value }
|
Self { inner: value }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn value(&self) -> f64 {
|
||||||
|
self.inner
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ impl Renderer {
|
|||||||
.get(index as usize)
|
.get(index as usize)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.point
|
.point
|
||||||
.map(|coord| coord.inner as f32),
|
.map(|coord| coord.value() as f32),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
let normal = {
|
let normal = {
|
||||||
|
Loading…
Reference in New Issue
Block a user