Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
20
third-party/vendor/metal/examples/raytracing/camera.rs
vendored
Normal file
20
third-party/vendor/metal/examples/raytracing/camera.rs
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use glam::f32::Vec4;
|
||||
|
||||
#[repr(C)]
|
||||
pub struct Camera {
|
||||
pub position: Vec4,
|
||||
pub right: Vec4,
|
||||
pub up: Vec4,
|
||||
pub forward: Vec4,
|
||||
}
|
||||
|
||||
impl Camera {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
position: Vec4::new(0.0, 3.0, 10.0, 0.0),
|
||||
right: Vec4::new(1.0, 0.0, 0.0, 0.0),
|
||||
up: Vec4::new(0.0, 1.0, 0.0, 0.0),
|
||||
forward: Vec4::new(0.0, 0.0, -1.0, 0.0),
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue