mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-11 13:28:28 +00:00
Simplify type of function parameter
This commit is contained in:
parent
68b97e02a2
commit
bc62168984
@ -15,8 +15,8 @@ impl Mesh {
|
|||||||
self.triangles.iter().copied()
|
self.triangles.iter().copied()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn vertex(&mut self, vertex: Vertex) {
|
pub fn vertex(&mut self, point: Point) {
|
||||||
self.vertices.push(vertex);
|
self.vertices.push(Vertex { point });
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn triangle(&mut self, triangle: Triangle) {
|
pub fn triangle(&mut self, triangle: Triangle) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::geometry::{Mesh, Vertex};
|
use crate::geometry::Mesh;
|
||||||
|
|
||||||
pub fn model() -> anyhow::Result<Mesh> {
|
pub fn model() -> anyhow::Result<Mesh> {
|
||||||
let mut mesh = Mesh::default();
|
let mut mesh = Mesh::default();
|
||||||
@ -13,7 +13,7 @@ pub fn model() -> anyhow::Result<Mesh> {
|
|||||||
[-0.5, 0.5, 0.5], // 6
|
[-0.5, 0.5, 0.5], // 6
|
||||||
[0.5, 0.5, 0.5], // 7
|
[0.5, 0.5, 0.5], // 7
|
||||||
]
|
]
|
||||||
.map(|vertex| mesh.vertex(Vertex { point: vertex }));
|
.map(|vertex| mesh.vertex(vertex));
|
||||||
|
|
||||||
[
|
[
|
||||||
[0, 4, 6], // left
|
[0, 4, 6], // left
|
||||||
|
Loading…
Reference in New Issue
Block a user