[−][src]Struct urdf_viz::ArcBall
Arc-ball camera mode.
An arc-ball camera is a camera rotating around a fixed point (the focus point) and always looking at it. The following inputs are handled:
- Left button press + drag - rotates the camera around the focus point
- Right button press + drag - translates the focus point on the plane orthogonal to the view direction
- Scroll in/out - zoom in/out
- Enter key - set the focus point to the origin
Implementations
impl ArcBall
[src]
pub fn new(eye: Point3<f32>, at: Point3<f32>) -> ArcBall
[src]
Create a new arc-ball camera.
pub fn new_with_frustrum(
fov: f32,
znear: f32,
zfar: f32,
eye: Point3<f32>,
at: Point3<f32>
) -> ArcBall
[src]
fov: f32,
znear: f32,
zfar: f32,
eye: Point3<f32>,
at: Point3<f32>
) -> ArcBall
Creates a new arc ball camera with default sensitivity values.
pub fn at(&self) -> Point3<f32>
[src]
The point the arc-ball is looking at.
pub fn set_at(&mut self, at: Point3<f32>)
[src]
Get a mutable reference to the point the camera is looking at.
pub fn yaw(&self) -> f32
[src]
The arc-ball camera yaw
.
pub fn set_yaw(&mut self, yaw: f32)
[src]
Sets the camera yaw
. Change this to modify the rotation along the up
axis.
pub fn pitch(&self) -> f32
[src]
The arc-ball camera pitch
.
pub fn set_pitch(&mut self, pitch: f32)
[src]
Sets the camera pitch
.
pub fn min_pitch(&self) -> f32
[src]
The minimum pitch of the camera.
pub fn set_min_pitch(&mut self, min_pitch: f32)
[src]
Set the minimum pitch of the camera.
pub fn max_pitch(&self) -> f32
[src]
The maximum pitch of the camera.
pub fn set_max_pitch(&mut self, max_pitch: f32)
[src]
Set the maximum pitch of the camera.
pub fn dist(&self) -> f32
[src]
The distance from the camera position to its view point.
pub fn set_dist(&mut self, dist: f32)
[src]
Move the camera such that it is at a given distance from the view point.
pub fn min_dist(&self) -> f32
[src]
The minimum distance from the camera position to its view point.
pub fn set_min_dist(&mut self, min_dist: f32)
[src]
Set the minimum distance from the camera position to its view point.
pub fn max_dist(&self) -> f32
[src]
The maximum distance from the camera position to its view point.
pub fn set_max_dist(&mut self, max_dist: f32)
[src]
Set the maximum distance from the camera position to its view point.
pub fn look_at(&mut self, eye: Point3<f32>, at: Point3<f32>)
[src]
Move and orient the camera such that it looks at a specific point.
pub fn rotate_button(&self) -> Option<MouseButton>
[src]
The button used to rotate the ArcBall camera.
pub fn rebind_rotate_button(&mut self, new_button: Option<MouseButton>)
[src]
Set the button used to rotate the ArcBall camera. Use None to disable rotation.
pub fn drag_button(&self) -> Option<MouseButton>
[src]
The button used to drag the ArcBall camera.
pub fn rebind_drag_button(&mut self, new_button: Option<MouseButton>)
[src]
Set the button used to drag the ArcBall camera. Use None to disable dragging.
pub fn reset_key(&self) -> Option<Key>
[src]
The key used to reset the ArcBall camera.
pub fn rebind_reset_key(&mut self, new_key: Option<Key>)
[src]
Set the key used to reset the ArcBall camera. Use None to disable reset.
pub fn set_up_axis(&mut self, up_axis: Vector3<f32>)
[src]
Sets the up vector of this camera.
Trait Implementations
impl Camera for ArcBall
[src]
pub fn clip_planes(&self) -> (f32, f32)
[src]
pub fn view_transform(&self) -> Isometry3<f32>
[src]
pub fn eye(&self) -> Point3<f32>
[src]
pub fn handle_event(&mut self, canvas: &Canvas, event: &WindowEvent)
[src]
pub fn upload(
&self,
_: usize,
proj: &mut ShaderUniform<Matrix4<f32>>,
view: &mut ShaderUniform<Matrix4<f32>>
)
[src]
&self,
_: usize,
proj: &mut ShaderUniform<Matrix4<f32>>,
view: &mut ShaderUniform<Matrix4<f32>>
)
pub fn transformation(&self) -> Matrix4<f32>
[src]
pub fn inverse_transformation(&self) -> Matrix4<f32>
[src]
pub fn update(&mut self, _: &Canvas)
[src]
pub fn num_passes(&self) -> usize
[src]
pub fn start_pass(&self, _pass: usize, _canvas: &Canvas)
[src]
pub fn render_complete(&self, _canvas: &Canvas)
[src]
pub fn project(
&self,
world_coord: &Point<f32, U3>,
size: &Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) -> Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
[src]
&self,
world_coord: &Point<f32, U3>,
size: &Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) -> Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
pub fn unproject(
&self,
window_coord: &Point<f32, U2>,
size: &Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) -> (Point<f32, U3>, Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>)
[src]
&self,
window_coord: &Point<f32, U2>,
size: &Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) -> (Point<f32, U3>, Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>)
impl Clone for ArcBall
[src]
impl Debug for ArcBall
[src]
Auto Trait Implementations
impl RefUnwindSafe for ArcBall
[src]
impl Send for ArcBall
[src]
impl Sync for ArcBall
[src]
impl Unpin for ArcBall
[src]
impl UnwindSafe for ArcBall
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,