diff --git a/csg/src/brush.rs b/csg/src/brush.rs index b8568b7..8b10781 100644 --- a/csg/src/brush.rs +++ b/csg/src/brush.rs @@ -2,6 +2,7 @@ use glam::Vec3; use crate::plane::{Plane, PlaneIntersection}; +#[derive(Default)] pub struct MaterialId(pub String); pub struct TextureProjection { @@ -24,6 +25,7 @@ impl Default for TextureProjection { } } +#[derive(Default)] pub struct BrushPlane { pub plane: Plane, pub material: MaterialId, diff --git a/editor/src/main.rs b/editor/src/main.rs index aa298cb..7d63486 100644 --- a/editor/src/main.rs +++ b/editor/src/main.rs @@ -1,6 +1,6 @@ use csg::{ - brush::{Brush, BrushPlane, MaterialId, TextureProjection}, - glam::{self, Vec3}, + brush::{Brush, BrushPlane}, + glam::{self, Mat3, Vec3}, plane::Plane, }; @@ -20,8 +20,7 @@ fn generate_box_brush(position: Vec3, extent: Vec3) -> Brush { brush_planes.push(BrushPlane { plane: Plane::from_point_normal(point, *normal), - material: MaterialId("Epic".to_string()), - tex_projection: TextureProjection::default(), + ..Default::default() }); println!("Plane: {:?}", brush_planes.last().unwrap().plane);