Struct rin_graphics::camera::ortho_camera::OrthoCamera [−][src]
pub struct OrthoCamera { /* fields omitted */ }
Orthographic camera
Implementations
impl OrthoCamera
[src]
impl OrthoCamera
[src]pub fn new(
eye: Pnt3,
look_at: Pnt3,
up: Unit<Vec3>,
aspect_ratio: f32
) -> Result<OrthoCamera>
[src]
eye: Pnt3,
look_at: Pnt3,
up: Unit<Vec3>,
aspect_ratio: f32
) -> Result<OrthoCamera>
pub fn new_with_frustum(
eye: Pnt3,
look_at: Pnt3,
up: Unit<Vec3>,
left: f32,
right: f32,
bottom: f32,
top: f32,
znear: f32,
zfar: f32
) -> Result<OrthoCamera>
[src]
eye: Pnt3,
look_at: Pnt3,
up: Unit<Vec3>,
left: f32,
right: f32,
bottom: f32,
top: f32,
znear: f32,
zfar: f32
) -> Result<OrthoCamera>
Creates a new camera from frustrum values.
pub fn with_pixel_coordinates(
size: Vec2<i32>,
coordinate_origin: CoordinateOrigin
) -> OrthoCamera
[src]
size: Vec2<i32>,
coordinate_origin: CoordinateOrigin
) -> OrthoCamera
Creates an orthographic camera ready to be used in two dimensional applications
The resulting view will have the same coordinates as the passed size and everything drawn at z = 0 within that viewport will be visible at it’s size in pixels
pub fn projection(&self) -> Mat4
[src]
Projection matrix
pub fn view(&self) -> Mat4
[src]
View matrix
pub fn projection_view(&self) -> Mat4
[src]
Projection * View
pub fn near_far_clip(&self) -> (f32, f32)
[src]
Near and far clip planes as a tuple
pub fn near_clip(&self) -> f32
[src]
Near clip
pub fn far_clip(&self) -> f32
[src]
Far clip
pub fn set_near(&mut self, near: f32)
[src]
pub fn set_far(&mut self, far: f32)
[src]
pub fn set_near_far(&mut self, near: f32, far: f32)
[src]
pub fn set_aspect_ratio(&mut self, aspect: f32)
[src]
pub fn target(&self) -> &Pnt3
[src]
Target the camera will look at, the target will change if the camera is moved or re-oriented
pub fn set_target(&mut self, target: Pnt3)
[src]
pub fn left(&self) -> f32
[src]
Left most distance of the camera frustum from the camera
pub fn right(&self) -> f32
[src]
Right most distance of the camera frustum from the camera
pub fn bottom(&self) -> f32
[src]
Bottom most distance of the camera frustum from the camera
pub fn top(&self) -> f32
[src]
Top most distance of the camera frustum from the camera
pub fn set_left(&mut self, left: f32)
[src]
pub fn set_right(&mut self, right: f32)
[src]
pub fn set_bottom(&mut self, bottom: f32)
[src]
pub fn set_top(&mut self, top: f32)
[src]
pub fn set_reversed_z(&mut self, reversed_z: bool)
[src]
pub fn enable_depth_clamp(&mut self)
[src]
Enables depth clamping
Doesn’t really change the projection or view matrices of the camera but can be use as a flag to signal a renderer to do depth clamping.
pub fn disable_depth_clamp(&mut self)
[src]
Disables depth clamping
Doesn’t really change the projection or view matrices of the camera but can be use as a flag to signal a renderer to not do depth clamping.
pub fn depth_clamp(&self) -> bool
[src]
Returns if depth clamping is enabled
Doesn’t really change the projection or view matrices of the camera but can be use as a flag to signal a renderer to do depth clamping or not.
pub fn reversed_z(&self) -> bool
[src]
pub fn set_oblique_near_clip_plane<P: Into<Option<Vec4>>>(&mut self, plane: P)
[src]
Changes the projection matrix to set an oblique clip plane
Useful for reflections / refractions
pub fn oblique_clip_plane(&self) -> Option<&Vec4>
[src]
pub fn update(&mut self) -> bool
[src]
Call every frame to update the camera matrices
Returns true if the camera changed since the last udpate
Trait Implementations
impl CameraExt for OrthoCamera
[src]
impl CameraExt for OrthoCamera
[src]fn projection(&self) -> Mat4
[src]
fn view(&self) -> Mat4
[src]
fn projection_view(&self) -> Mat4
[src]
fn fov(&self) -> Option<Deg<f32>>
[src]
fn width(&self) -> Option<f32>
[src]
fn near_far_clip(&self) -> (f32, Option<f32>)
[src]
fn near_clip(&self) -> f32
[src]
fn far_clip(&self) -> Option<f32>
[src]
fn set_near(&mut self, near: f32)
[src]
fn set_far(&mut self, far: f32)
[src]
fn set_near_far(&mut self, near: f32, far: f32)
[src]
fn set_aspect_ratio(&mut self, aspect: f32)
[src]
fn aspect_ratio(&self) -> f32
[src]
fn target(&self) -> &Pnt3
[src]
fn up(&self) -> &Unit<Vec3>
[src]
fn set_target(&mut self, target: Pnt3)
[src]
fn enable_depth_clamp(&mut self)
[src]
fn disable_depth_clamp(&mut self)
[src]
fn depth_clamp(&self) -> bool
[src]
fn set_reversed_z(&mut self, reversed_z: bool)
[src]
fn reversed_z(&self) -> bool
[src]
fn far_at_infinity(&self) -> bool
[src]
fn hfov(&self) -> Option<Deg<f32>>
[src]
fn focal_length(&self) -> Option<f32>
[src]
fn sensor_width_mm(&self) -> Option<f32>
[src]
fn update(&mut self) -> bool
[src]
impl CameraOrthographic for OrthoCamera
[src]
impl CameraOrthographic for OrthoCamera
[src]impl NodeMut for OrthoCamera
[src]
impl NodeMut for OrthoCamera
[src]fn node_mut(&mut self) -> &mut Node
[src]
fn update_with_parent_parts(
&mut self,
parent_loc: Option<&Node>,
parent_orientation: Option<&Node>,
parent_scale: Option<&Node>
) -> bool
[src]
&mut self,
parent_loc: Option<&Node>,
parent_orientation: Option<&Node>,
parent_scale: Option<&Node>
) -> bool
fn update_with_parent(&mut self, parent: Option<&Node>) -> bool
[src]
fn look_at(&mut self, at: &Pnt3, up: &Vec3) -> Result<()>
[src]
fn rotate(&mut self, angle: Rad<f32>, axis: &Unit<Vec3>)
[src]
fn append_orientation(&mut self, orientation: &UnitQuat)
[src]
fn tilt(&mut self, angle: Rad<f32>)
[src]
fn pan(&mut self, angle: Rad<f32>)
[src]
fn roll(&mut self, angle: Rad<f32>)
[src]
fn translate(&mut self, t: &Vec3)
[src]
fn set_position(&mut self, pos: Pnt3)
[src]
fn set_angle_axis(&mut self, angle: Rad<f32>, axis: &Unit<Vec3>)
[src]
fn set_orientation(&mut self, orientation: UnitQuat)
[src]
fn set_scale(&mut self, s: Vec3)
[src]
impl NodeRef for OrthoCamera
[src]
impl NodeRef for OrthoCamera
[src]fn node(&self) -> &Node
[src]
fn position(&self) -> Pnt3
[src]
fn orientation(&self) -> UnitQuat
[src]
fn rotation(&self) -> Rotation3<f32>
[src]
fn scale(&self) -> Vec3
[src]
fn local_x_axis(&self) -> Unit<Vec3>
[src]
fn local_y_axis(&self) -> Unit<Vec3>
[src]
fn local_z_axis(&self) -> Unit<Vec3>
[src]
fn global_x_axis(&self) -> Unit<Vec3>
[src]
fn global_y_axis(&self) -> Unit<Vec3>
[src]
fn global_z_axis(&self) -> Unit<Vec3>
[src]
fn local_transformation(&self) -> Mat4
[src]
fn global_transformation(&self) -> Mat4
[src]
fn global_position(&self) -> Pnt3
[src]
fn global_orientation(&self) -> UnitQuat
[src]
fn global_scale(&self) -> Vec3
[src]
fn inv_local_transformation(&self) -> Mat4
[src]
fn inv_global_transformation(&self) -> Mat4
[src]
Auto Trait Implementations
impl RefUnwindSafe for OrthoCamera
impl Send for OrthoCamera
impl Sync for OrthoCamera
impl Unpin for OrthoCamera
impl UnwindSafe for OrthoCamera
Blanket Implementations
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]