Display multiple instances of OBJs
This commit is contained in:
@@ -13,14 +13,15 @@ pub struct CameraState {
|
||||
rotate_right: bool,
|
||||
}
|
||||
|
||||
const SPEED: f32 = 100.0; //1.0;
|
||||
const SPEED: f32 = 1.0; //1.0;
|
||||
|
||||
impl CameraState {
|
||||
pub fn new() -> CameraState {
|
||||
CameraState {
|
||||
aspect_ratio: 1_024.0 / 768.0,
|
||||
// The second coordinate is for the altitude.
|
||||
position: (3_646.41, 12.3622, 13_113.7),
|
||||
//position: (3_646.41, 12.3622, 13_113.7),
|
||||
position: (0.0, 0.0, 0.0),
|
||||
direction: (0.0, 0.0, -1.0),
|
||||
moving_up: false,
|
||||
moving_left: false,
|
||||
@@ -36,7 +37,7 @@ impl CameraState {
|
||||
pub fn get_perspective(&self) -> [[f32; 4]; 4] {
|
||||
let fov: f32 = std::f32::consts::PI / 2.0;
|
||||
let zfar = 53_209.0;
|
||||
let znear = 1.0; //0.01;
|
||||
let znear = 0.01;
|
||||
|
||||
let f = 1.0 / (fov / 2.0).tan();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user