more lines

This commit is contained in:
2019-07-28 16:24:07 +02:00
parent 5795d0b635
commit 8f5716238a

View File

@@ -1,5 +1,5 @@
use winit::{Event, WindowEvent, DeviceEvent};
use cgmath::{Matrix4, Rad, Point3, Vector3, Deg, SquareMatrix, Quaternion, Rotation3, One, Rotation};
use cgmath::{Matrix4, Rad, Vector3, Deg, Quaternion, Rotation3, One, Rotation};
mod vulkan;
use crate::vulkan::{GameData, Game, LinePoint};
@@ -122,14 +122,15 @@ fn main() {
log_config: LogConfig::from_file("config/log.toml"),
};
let line_count = 30;
vulkan::init(
"models/iski51.obj",
(-10..10)
(-line_count..=line_count)
.flat_map(|it| vec![
LinePoint { position: [it as f32, -10., 0.] },
LinePoint { position: [it as f32, 10., 0.] },
LinePoint { position: [-10., it as f32, 0.] },
LinePoint { position: [10., it as f32, 0.] },
LinePoint { position: [it as f32, -line_count as f32, 0.] },
LinePoint { position: [it as f32, line_count as f32, 0.] },
LinePoint { position: [-line_count as f32, it as f32, 0.] },
LinePoint { position: [line_count as f32, it as f32, 0.] },
]).collect(),
&mut game
);