mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-03 17:38:27 +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()
|
||||
}
|
||||
|
||||
pub fn vertex(&mut self, vertex: Vertex) {
|
||||
self.vertices.push(vertex);
|
||||
pub fn vertex(&mut self, point: Point) {
|
||||
self.vertices.push(Vertex { point });
|
||||
}
|
||||
|
||||
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> {
|
||||
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], // 7
|
||||
]
|
||||
.map(|vertex| mesh.vertex(Vertex { point: vertex }));
|
||||
.map(|vertex| mesh.vertex(vertex));
|
||||
|
||||
[
|
||||
[0, 4, 6], // left
|
||||
|
Loading…
Reference in New Issue
Block a user