[−][src]Trait kiss3d::planar_camera::PlanarCamera
Trait every 2D camera must implement.
Required methods
fn handle_event(&mut self, canvas: &Canvas, event: &WindowEvent)
Handle a mouse event.
fn update(&mut self, canvas: &Canvas)
Update the camera. This is called once at the beginning of the render loop.
fn upload(
&self,
proj: &mut ShaderUniform<Matrix3<f32>>,
view: &mut ShaderUniform<Matrix3<f32>>
)
&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.
fn unproject(
&self,
window_coord: &Point2<f32>,
window_size: &Vector2<f32>
) -> Point2<f32>
&self,
window_coord: &Point2<f32>,
window_size: &Vector2<f32>
) -> Point2<f32>
Computes the 2D world-space coordiates corresponding to the given screen-space coordiates.
Implementors
impl PlanarCamera for FixedView
[src]
fn handle_event(&mut self, canvas: &Canvas, event: &WindowEvent)
[src]
fn upload(
&self,
proj: &mut ShaderUniform<Matrix3<f32>>,
view: &mut ShaderUniform<Matrix3<f32>>
)
[src]
&self,
proj: &mut ShaderUniform<Matrix3<f32>>,
view: &mut ShaderUniform<Matrix3<f32>>
)
fn update(&mut self, _: &Canvas)
[src]
fn unproject(
&self,
window_coord: &Point2<f32>,
size: &Vector2<f32>
) -> Point2<f32>
[src]
&self,
window_coord: &Point2<f32>,
size: &Vector2<f32>
) -> Point2<f32>