Struct rin_graphics::camera::arcball_camera::ArcballCamera [−][src]
pub struct ArcballCamera<C = Camera> { /* fields omitted */ }
Arcball interactive camera that can be controlled with the mouse and keys
By default:
- left mouse drag will rotate the camera around it’s target
- mouse wheel scroll will move camera towards or apart from it’s target for perspective cameras and zoom in/out for orthographic ones
- middle mouse drag translate the camera and it’s target
- keypad 1 will switch front and back views, that is target position plus or minus current distance from camera to target in z axis relative to the camera up axis as y
- keypad 3 will switch left and right views similar to front/back but in the relative x axis
- keypad 7 will switch top and bottom views similat to front/back but in the relative y axis
The key mappings can be modified using a custom ViewEvents stream
Implementations
impl<C: CameraExt + NodeMut> ArcballCamera<C>[src]
impl<C: CameraExt + NodeMut> ArcballCamera<C>[src]Trait Implementations
impl<C: CameraExt + NodeMut> CameraExt for ArcballCamera<C>[src]
impl<C: CameraExt + NodeMut> CameraExt for ArcballCamera<C>[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 set_target(&mut self, target: Pnt3)[src]
fn up(&self) -> &Unit<Vec3>[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<C: CameraOrthographic + NodeMut> CameraOrthographic for ArcballCamera<C>[src]
impl<C: CameraOrthographic + NodeMut> CameraOrthographic for ArcballCamera<C>[src]impl<C: CameraPerspective + NodeMut> CameraPerspective for ArcballCamera<C>[src]
impl<C: CameraPerspective + NodeMut> CameraPerspective for ArcballCamera<C>[src]impl<C: NodeMut> NodeMut for ArcballCamera<C>[src]
impl<C: NodeMut> NodeMut for ArcballCamera<C>[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 set_scale(&mut self, _: Vec3)[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]
impl<C: NodeRef> NodeRef for ArcballCamera<C>[src]
impl<C: NodeRef> NodeRef for ArcballCamera<C>[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<C = Camera> !RefUnwindSafe for ArcballCamera<C>
impl<C> Send for ArcballCamera<C> where
C: Send,
C: Send,
impl<C = Camera> !Sync for ArcballCamera<C>
impl<C> Unpin for ArcballCamera<C> where
C: Unpin,
C: Unpin,
impl<C = Camera> !UnwindSafe for ArcballCamera<C>
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]