graphics_rs/tools/camera.rs
1use crate::math::vec3::Vec3;
2
3pub struct Camera<T: Sized + Copy> {
4 position: Vec3<T>,
5 direction: Vec3<T>,
6 fov_angle: T,
7}
8
9impl<T> Camera<T>
10where
11 T: Sized + Copy,
12{
13 pub fn new(position: Vec3<T>, direction: Vec3<T>, fov_angle: T) -> Self {
14 Self {
15 position,
16 direction,
17 fov_angle,
18 }
19 }
20
21 pub fn position(&self) -> &Vec3<T> {
22 &self.position
23 }
24}