Struct kiss3d::camera::FirstPersonStereo
[−]
[src]
pub struct FirstPersonStereo { /* fields omitted */ }
First-person camera mode.
- Left button press + drag - look around
- Right button press + drag - translates the camera position on the plane orthogonal to the view direction
- Scroll in/out - zoom in/out
Methods
impl FirstPersonStereo
[src]
fn new(eye: Point3<f32>, at: Point3<f32>, ipd: f32) -> FirstPersonStereo
Creates a first person camera with default sensitivity values.
fn new_with_frustrum(fov: f32,
znear: f32,
zfar: f32,
eye: Point3<f32>,
at: Point3<f32>,
ipd: f32)
-> FirstPersonStereo
znear: f32,
zfar: f32,
eye: Point3<f32>,
at: Point3<f32>,
ipd: f32)
-> FirstPersonStereo
Creates a new first person camera with default sensitivity values.
fn look_at(&mut self, eye: Point3<f32>, at: Point3<f32>)
Changes the orientation and position of the camera to look at the specified point.
fn at(&self) -> Point3<f32>
The point the camera is looking at.
fn ipd(&self) -> f32
return Inter Pupilary Distance
fn set_ipd(&mut self, ipd: f32)
change Inter Pupilary Distance
Trait Implementations
impl Debug for FirstPersonStereo
[src]
impl Camera for FirstPersonStereo
[src]
fn clip_planes(&self) -> (f32, f32)
The clipping planes, aka. (znear
, zfar
).
fn view_transform(&self) -> Isometry3<f32>
The imaginary middle eye camera view transformation (i-e transformation without projection).
fn handle_event(&mut self, window: &Window, event: &WindowEvent)
Handle a mouse event.
fn eye(&self) -> Point3<f32>
The camera position.
fn transformation(&self) -> Matrix4<f32>
The transformation applied by the camera to transform a point in world coordinates to a point in device coordinates. Read more
fn inverse_transformation(&self) -> Matrix4<f32>
The transformation applied by the camera to transform point in device coordinates to a point in world coordinate. Read more
fn update(&mut self, window: &Window)
Update the camera. This is called once at the beginning of the render loop.
fn upload(&self, pass: usize, uniform: &mut ShaderUniform<Matrix4<f32>>)
Upload the camera transformation to the gpu. This can be called multiple times on the render loop. Read more
fn num_passes(&self) -> usize
The number of passes required by this camera.
fn start_pass(&self, pass: usize, window: &Window)
Indicates that a pass will begin.
fn render_complete(&self, window: &Window)
Indicates that the scene has been rendered and the post-processing is being run.
fn project(&self,
world_coord: &Point3<f32>,
size: &Vector2<f32>)
-> Vector2<f32>
world_coord: &Point3<f32>,
size: &Vector2<f32>)
-> Vector2<f32>
Converts a 3d point to 2d screen coordinates, assuming the screen has the size size
.
fn unproject(&self,
window_coord: &Point2<f32>,
size: &Vector2<f32>)
-> (Point3<f32>, Vector3<f32>)
window_coord: &Point2<f32>,
size: &Vector2<f32>)
-> (Point3<f32>, Vector3<f32>)
Converts a point in 2d screen coordinates to a ray (a 3d position and a direction). Read more