mirror of
https://github.com/hannobraun/Fornjot
synced 2025-08-18 15:16:07 +00:00
Use f64
on the geometry side
This commit is contained in:
parent
9b4ae17a13
commit
f04983e6ad
@ -24,7 +24,7 @@ impl Mesh {
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Vertex {
|
||||
pub point: [f32; 3],
|
||||
pub point: [f64; 3],
|
||||
}
|
||||
|
||||
pub type Index = u32;
|
||||
|
@ -192,8 +192,13 @@ impl Renderer {
|
||||
let mut vertices = Vec::new();
|
||||
|
||||
for triangle in mesh.triangles() {
|
||||
let triangle = triangle
|
||||
.map(|index| Vec3::from(mesh.vertices()[index as usize].point));
|
||||
let triangle = triangle.map(|index| {
|
||||
Vec3::from(
|
||||
mesh.vertices()[index as usize]
|
||||
.point
|
||||
.map(|coord| coord as f32),
|
||||
)
|
||||
});
|
||||
let normal = {
|
||||
let [a, b, c] = triangle;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user