Struct ringraphics::Camera [−][src]
pub struct Camera { /* fields omitted */ }
Methods
impl Camera
[src]
impl Camera
pub fn new(
eye: Pnt3,
look_at: Pnt3,
up: Unit<Vec3>,
fov: Deg<f32>,
aspect_ratio: f32
) -> Camera
[src]
pub fn new(
eye: Pnt3,
look_at: Pnt3,
up: Unit<Vec3>,
fov: Deg<f32>,
aspect_ratio: f32
) -> Camera
Create a new camera.
pub fn new_with_frustrum(
eye: Pnt3,
look_at: Pnt3,
up: Unit<Vec3>,
fov: Deg<f32>,
aspect_ratio: f32,
znear: f32,
zfar: f32
) -> Camera
[src]
pub fn new_with_frustrum(
eye: Pnt3,
look_at: Pnt3,
up: Unit<Vec3>,
fov: Deg<f32>,
aspect_ratio: f32,
znear: f32,
zfar: f32
) -> Camera
Creates a new camera from frustrum values.
pub fn projection(&self) -> Mat4
[src]
pub fn projection(&self) -> Mat4
pub fn view(&self) -> Mat4
[src]
pub fn view(&self) -> Mat4
pub fn proj_view(&self) -> Mat4
[src]
pub fn proj_view(&self) -> Mat4
pub fn fov(&self) -> Deg<f32>
[src]
pub fn fov(&self) -> Deg<f32>
pub fn set_fov(&mut self, fov: Deg<f32>)
[src]
pub fn set_fov(&mut self, fov: Deg<f32>)
pub fn near_far_clip(&self) -> (f32, f32)
[src]
pub fn near_far_clip(&self) -> (f32, f32)
pub fn set_near(&mut self, near: f32)
[src]
pub fn set_near(&mut self, near: f32)
pub fn set_far(&mut self, far: f32)
[src]
pub fn set_far(&mut self, far: f32)
pub fn set_near_far(&mut self, near: f32, far: f32)
[src]
pub fn set_near_far(&mut self, near: f32, far: f32)
pub fn set_aspect_ratio(&mut self, aspect: f32)
[src]
pub fn set_aspect_ratio(&mut self, aspect: f32)
Trait Implementations
impl Clone for Camera
[src]
impl Clone for Camera
fn clone(&self) -> Camera
[src]
fn clone(&self) -> Camera
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl NodeT for Camera
[src]
impl NodeT for Camera
fn node(&self) -> &Node
[src]
fn node(&self) -> &Node
fn node_mut(&mut self) -> &mut Node
[src]
fn node_mut(&mut self) -> &mut Node
fn set_scale(&mut self, _scale: &Vec3)
[src]
fn set_scale(&mut self, _scale: &Vec3)
fn update_with_parent_flags(
&mut self,
parent: Option<&Node>,
flags: Flags
) -> bool
[src]
fn update_with_parent_flags(
&mut self,
parent: Option<&Node>,
flags: Flags
) -> bool
fn set_position(&mut self, pos: &Pnt3)
[src]
fn set_position(&mut self, pos: &Pnt3)
fn position(&self) -> Pnt3
[src]
fn position(&self) -> Pnt3
fn set_angle_axis(&mut self, angle: f32, axis: &Vec3)
[src]
fn set_angle_axis(&mut self, angle: f32, axis: &Vec3)
fn set_orientation(&mut self, q: &UnitQuat)
[src]
fn set_orientation(&mut self, q: &UnitQuat)
fn orientation(&self) -> UnitQuat
[src]
fn orientation(&self) -> UnitQuat
fn rotation(&self) -> Rot3
[src]
fn rotation(&self) -> Rot3
fn look_at(&mut self, at: &Pnt3, up: &Vec3)
[src]
fn look_at(&mut self, at: &Pnt3, up: &Vec3)
fn rotate(&mut self, angle: Rad<f32>, axis: &Unit<Vec3>)
[src]
fn rotate(&mut self, angle: Rad<f32>, axis: &Unit<Vec3>)
fn append_rotation(&mut self, rot: &UnitQuat)
[src]
fn append_rotation(&mut self, rot: &UnitQuat)
fn translate(&mut self, t: &Vec3)
[src]
fn translate(&mut self, t: &Vec3)
fn scale(&self) -> Vec3
[src]
fn scale(&self) -> Vec3
fn x_axis(&self) -> Unit<Vec3>
[src]
fn x_axis(&self) -> Unit<Vec3>
fn y_axis(&self) -> Unit<Vec3>
[src]
fn y_axis(&self) -> Unit<Vec3>
fn z_axis(&self) -> Unit<Vec3>
[src]
fn z_axis(&self) -> Unit<Vec3>
fn tilt(&mut self, angle: Rad<f32>)
[src]
fn tilt(&mut self, angle: Rad<f32>)
fn pan(&mut self, angle: Rad<f32>)
[src]
fn pan(&mut self, angle: Rad<f32>)
fn roll(&mut self, angle: Rad<f32>)
[src]
fn roll(&mut self, angle: Rad<f32>)
fn local_transformation(&self) -> Mat4
[src]
fn local_transformation(&self) -> Mat4
fn global_transformation(&self) -> Mat4
[src]
fn global_transformation(&self) -> Mat4
fn global_position(&self) -> Pnt3
[src]
fn global_position(&self) -> Pnt3
fn global_orientation(&self) -> UnitQuat
[src]
fn global_orientation(&self) -> UnitQuat
fn global_scale(&self) -> Vec3
[src]
fn global_scale(&self) -> Vec3
fn inv_local_transformation(&self) -> Mat4
[src]
fn inv_local_transformation(&self) -> Mat4
fn inv_global_transformation(&self) -> Mat4
[src]
fn inv_global_transformation(&self) -> Mat4
fn update_with_parent(&mut self, parent: Option<&Node>) -> bool
[src]
fn update_with_parent(&mut self, parent: Option<&Node>) -> bool
impl CameraT for Camera
[src]
impl CameraT for Camera
fn projection(&self) -> Mat4
[src]
fn projection(&self) -> Mat4
fn view(&self) -> Mat4
[src]
fn view(&self) -> Mat4
fn proj_view(&self) -> Mat4
[src]
fn proj_view(&self) -> Mat4
fn fov(&self) -> Deg<f32>
[src]
fn fov(&self) -> Deg<f32>
fn set_fov(&mut self, fov: Deg<f32>)
[src]
fn set_fov(&mut self, fov: Deg<f32>)
fn near_far_clip(&self) -> (f32, f32)
[src]
fn near_far_clip(&self) -> (f32, f32)
fn set_near(&mut self, near: f32)
[src]
fn set_near(&mut self, near: f32)
fn set_far(&mut self, far: f32)
[src]
fn set_far(&mut self, far: f32)
fn set_near_far(&mut self, near: f32, far: f32)
[src]
fn set_near_far(&mut self, near: f32, far: f32)
fn set_aspect_ratio(&mut self, aspect: f32)
[src]
fn set_aspect_ratio(&mut self, aspect: f32)