projects
/
mandelwow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://codewiz.org/~/public_git/mandelwow
[mandelwow.git]
/
support
/
camera.rs
diff --git
a/support/camera.rs
b/support/camera.rs
index 10ad1f0086d17e396a3f5a6075443f80be39e2ed..9f0e3bac45ea2422d0335a545b0e8c21b158dd28 100644
(file)
--- a/
support/camera.rs
+++ b/
support/camera.rs
@@
-31,7
+31,7
@@
impl CameraState {
CameraState {
aspect_ratio: 1024.0 / 768.0,
pos: Vec3(0.0, 0.0, 0.0),
CameraState {
aspect_ratio: 1024.0 / 768.0,
pos: Vec3(0.0, 0.0, 0.0),
- dir: Vec3(0.0, 0.0, 1.0),
+ dir: Vec3(0.0, 0.0,
-
1.0),
.. Default::default()
}
}
.. Default::default()
}
}
@@
-40,6
+40,10
@@
impl CameraState {
self.pos = pos;
}
self.pos = pos;
}
+ pub fn get_pos(&self) -> Vec3 {
+ self.pos
+ }
+
pub fn set_dir(&mut self, dir: Vec3) {
self.dir = dir;
}
pub fn set_dir(&mut self, dir: Vec3) {
self.dir = dir;
}
@@
-60,7
+64,6
@@
impl CameraState {
]
}
]
}
-
pub fn get_view(&self) -> [[f32; 4]; 4] {
let f = norm(&self.dir);
pub fn get_view(&self) -> [[f32; 4]; 4] {
let f = norm(&self.dir);