Skip to content

Commit

Permalink
Add store for surfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Dec 20, 2024
1 parent f776fed commit 6e00260
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions experiments/2024-12-09/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ use crate::{
};

pub fn model(shape: &mut Shape) {
let mut surfaces = Store::<Plane>::new();
let mut vertices = Store::<Vertex>::new();
let mut triangles = Store::<Triangle>::new();

let bottom = Plane {
let bottom = surfaces.insert(Plane {
origin: Point::from([0., 0., -0.5]),
coords: Bivector {
a: Vector::from([1., 0., 0.]),
b: Vector::from([0., 1., 0.]),
},
};
let top = bottom.translate([0., 0., 1.]);
});
let top = surfaces.insert(bottom.translate([0., 0., 1.]));

let sketch =
Sketch::from([[-0.5, -0.5], [0.5, -0.5], [-0.5, 0.5], [0.5, 0.5]]);
Expand Down

0 comments on commit 6e00260

Please sign in to comment.