/// Calculate the center of a child node
Calculate the center of a child node
Calculate the center of a child node
fn child_center(ch: usize, c: Vec3, h: f32) -> Vec3 {
		let h = if h < 0.000001 { 1.0 } else { h };
		match ch {
			0 => Vec3::new(c.x - h, c.y - h, c.z - h),
			1 => Vec3::new(c.x - h, c.y - h, c.z + h),
			2 => Vec3::new(c.x - h, c.y + h, c.z - h),
			3 => Vec3::new(c.x - h, c.y + h, c.z + h),
			4 => Vec3::new(c.x + h, c.y - h, c.z - h),
			5 => Vec3::new(c.x + h, c.y - h, c.z + h),
			6 => Vec3::new(c.x + h, c.y + h, c.z - h),
			_ => Vec3::new(c.x + h, c.y + h, c.z + h),
		}
	}
fn child_center ( ch : usize , c : Vec3 , h : f32 ) -> Vec3 { let h = if h < 0.000001 { 1.0 } else { h } ; match ch { 0 => Vec3 :: new ( c . x - h , c . y - h , c . z - h ) , 1 => Vec3 :: new ( c . x - h , c . y - h , c . z + h ) , 2 => Vec3 :: new ( c . x - h , c . y + h , c . z - h ) , 3 => Vec3 :: new ( c . x - h , c . y + h , c . z + h ) , 4 => Vec3 :: new ( c . x + h , c . y - h , c . z - h ) , 5 => Vec3 :: new ( c . x + h , c . y - h , c . z + h ) , 6 => Vec3 :: new ( c . x + h , c . y + h , c . z - h ) , _ => Vec3 :: new ( c . x + h , c . y + h , c . z + h ) , } }
Calculate the center of a child node
Calculate the center of a child node
ch
usize
<not_specific>
c
Vec3
<not_specific>
h
f32
<not_specific>