Struct kiss3d::planar_camera::Sidescroll [−][src]
pub struct Sidescroll { /* fields omitted */ }
A 2D camera that can be zoomed and panned.
Methods
impl Sidescroll
[src]
impl Sidescroll
pub fn new() -> Sidescroll
[src]
pub fn new() -> Sidescroll
Create a new arc-ball camera.
pub fn at(&self) -> Point2<f32>
[src]
pub fn at(&self) -> Point2<f32>
The point the arc-ball is looking at.
pub fn set_at(&mut self, at: Point2<f32>)
[src]
pub fn set_at(&mut self, at: Point2<f32>)
Get a mutable reference to the point the camera is looking at.
pub fn zoom(&self) -> f32
[src]
pub fn zoom(&self) -> f32
Gets the zoom of the camera.
pub fn set_zoom(&mut self, zoom: f32)
[src]
pub fn set_zoom(&mut self, zoom: f32)
Sets the zoom of the camera.
pub fn look_at(&mut self, at: Point2<f32>, zoom: f32)
[src]
pub fn look_at(&mut self, at: Point2<f32>, zoom: f32)
Move the camera such that it is centered on a specific point.
The button used to drag the Sidescroll camera.
Set the button used to drag the Sidescroll camera. Use None to disable dragging.
Trait Implementations
impl Clone for Sidescroll
[src]
impl Clone for Sidescroll
fn clone(&self) -> Sidescroll
[src]
fn clone(&self) -> Sidescroll
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)
Performs copy-assignment from source
. Read more
impl Debug for Sidescroll
[src]
impl Debug for Sidescroll
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PlanarCamera for Sidescroll
[src]
impl PlanarCamera for Sidescroll
fn handle_event(&mut self, canvas: &Canvas, event: &WindowEvent)
[src]
fn handle_event(&mut self, canvas: &Canvas, event: &WindowEvent)
Handle a mouse event.
fn upload(
&self,
proj: &mut ShaderUniform<Matrix3<f32>>,
view: &mut ShaderUniform<Matrix3<f32>>
)
[src]
fn upload(
&self,
proj: &mut ShaderUniform<Matrix3<f32>>,
view: &mut ShaderUniform<Matrix3<f32>>
)
Upload the camera view and projection to the gpu. This can be called multiple times on the render loop. Read more
fn update(&mut self, _: &Canvas)
[src]
fn update(&mut self, _: &Canvas)
Update the camera. This is called once at the beginning of the render loop.
fn unproject(
&self,
window_coord: &Point2<f32>,
size: &Vector2<f32>
) -> Point2<f32>
[src]
fn unproject(
&self,
window_coord: &Point2<f32>,
size: &Vector2<f32>
) -> Point2<f32>
Computes the 2D world-space coordiates corresponding to the given screen-space coordiates.
Auto Trait Implementations
impl Send for Sidescroll
impl Send for Sidescroll
impl Sync for Sidescroll
impl Sync for Sidescroll