Struct rin::graphics::camera::Builder [−][src]
pub struct Builder { /* fields omitted */ }
Implementations
impl Builder
[src]
impl Builder
[src]pub fn new(aspect_ratio: f32) -> Builder
[src]
Create a new builder from the aspect ratio of the viewport
pub fn from_window<W>(window: &W) -> Builder where
W: WindowExt,
[src]
W: WindowExt,
Creates a camera Builder using a window to extract the needed info
Takes the viewport from the window passed as parameter
pub fn clip_planes(&mut self, znear: f32, zfar: f32) -> &mut Builder
[src]
👎 Deprecated since 0.11:
Please use near_far instead
Near and far clip planes
pub fn near_far<F>(&mut self, znear: f32, zfar: F) -> &mut Builder where
F: Into<Option<f32>>,
[src]
F: Into<Option<f32>>,
Near and far clip planes
pub fn near_with_far_at_infinity(&mut self, znear: f32) -> &mut Builder
[src]
Near clip plane and far at infinity
pub fn up_axis(
&mut self,
up: Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
) -> &mut Builder
[src]
&mut self,
up: Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
) -> &mut Builder
Up vector (defaults to Vec3::y_axis())
pub fn position(&mut self, pos: Point<f32, U3>) -> &mut Builder
[src]
Position of the camera (defaults to origin)
pub fn look_at(&mut self, target: Point<f32, U3>) -> &mut Builder
[src]
Position the camera will look at (defaults to pnt3(0., 0., -1))
pub fn fov(&mut self, fov: Deg<f32>) -> &mut Builder
[src]
Vertical field of view
pub fn hfov(&mut self, hfov: Deg<f32>) -> &mut Builder
[src]
Horizontal field of view
pub fn aspect_ratio(&mut self, aspect_ratio: f32) -> &mut Builder
[src]
Aspect ratio of the viewport
pub fn clamp_depth(&mut self) -> &mut Builder
[src]
pub fn reversed_z(&mut self) -> &mut Builder
[src]
pub fn oblique_near_clip_plane(
&mut self,
plane: Matrix<f32, U4, U1, <DefaultAllocator as Allocator<f32, U4, U1>>::Buffer>
) -> &mut Builder
[src]
&mut self,
plane: Matrix<f32, U4, U1, <DefaultAllocator as Allocator<f32, U4, U1>>::Buffer>
) -> &mut Builder
pub fn sensor_width_mm(&mut self, sensor_width: f32) -> &mut Builder
[src]
pub fn focal_length(&mut self, f: f32) -> &mut Builder
[src]
pub fn build(&self) -> Result<Camera, Error>
[src]
Create the camera
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[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]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]