blob: 7abb9af18fbe66f90cd91e08ae3b5966cc7d7397 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
use crate::vector::Vec3;
pub trait Camera
{
/// Returns the current camera position.
fn position(&self) -> Vec3<f32>;
/// Returns the position of the camera target.
fn target(&self) -> Vec3<f32>;
/// Returns the global direction upwards.
///
/// The default implementation which returns [`Vec3::UP`] should be fine in most
/// cases.
fn global_up(&self) -> Vec3<f32>
{
Vec3::UP
}
}
|