fix indexing of cubes
This commit is contained in:
parent
680039cdfa
commit
3f199ce4a6
4 changed files with 10 additions and 9 deletions
src/scene
|
@ -124,6 +124,12 @@ pub fn generate_test_scene(scene: &mut Scene, data: &mut AppData) -> Result<(Poi
|
|||
comp.excluded_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 5.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 11.5 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 1.5, Vector3 { x: 0, y: 255, z: 0 }, 64, false))));
|
||||
scene.volumetrics.push(Rc::new(RefCell::new(comp)));
|
||||
|
||||
let mut comp = ShapeComposition::new(64);
|
||||
comp.included_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 20.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 10.0 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 2.0, Vector3 { x: 0, y: 255, z: 0 }, 64, false))));
|
||||
comp.included_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 20.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 10.0 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 2.5, Vector3 { x: 255, y: 0, z: 0 }, 64, false))));
|
||||
comp.excluded_shapes.push(Rc::new(RefCell::new(Sphere::new(Vector3 { x: 20.0 + grid_size as f32, y: 5.0 + grid_size as f32, z: 11.5 }, Vector3 { x: 0.0, y: 0.0, z: 0.0 }, 1.5, Vector3 { x: 0, y: 255, z: 0 }, 64, false))));
|
||||
scene.volumetrics.push(Rc::new(RefCell::new(comp)));
|
||||
|
||||
Ok((cgmath::point3(5.0, 5.0, 10.0)))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue