Rename box generator extent to half_extent
This commit is contained in:
parent
dd73410d0a
commit
d41909860e
|
@ -4,7 +4,7 @@ use csg::{
|
||||||
plane::Plane,
|
plane::Plane,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn generate_box_brush(position: Vec3, extent: Vec3) -> Brush {
|
fn generate_box_brush(position: Vec3, half_extent: Vec3) -> Brush {
|
||||||
let normals = vec![
|
let normals = vec![
|
||||||
glam::vec3(1.0, 0.0, 0.0),
|
glam::vec3(1.0, 0.0, 0.0),
|
||||||
glam::vec3(-1.0, 0.0, 0.0),
|
glam::vec3(-1.0, 0.0, 0.0),
|
||||||
|
@ -16,7 +16,7 @@ fn generate_box_brush(position: Vec3, extent: Vec3) -> Brush {
|
||||||
|
|
||||||
let mut brush_planes = vec![];
|
let mut brush_planes = vec![];
|
||||||
for normal in &normals {
|
for normal in &normals {
|
||||||
let point = position + *normal * extent;
|
let point = position + *normal * half_extent;
|
||||||
|
|
||||||
brush_planes.push(BrushPlane {
|
brush_planes.push(BrushPlane {
|
||||||
plane: Plane::from_point_normal(point, *normal),
|
plane: Plane::from_point_normal(point, *normal),
|
||||||
|
|
Loading…
Reference in New Issue