pixels/src
Aeledfyr c96e46d3d4
Add a method to convert cursor coords to pixel coords (#77)
* Add a method to convert cursor coords to pixel coords

* Add method `window_pos_to_pixel` to Pixels struct
   * Converts cursor / window physical coordinates to pixel coords

* Fix formatting

* Return result rather than clamping pixel coordinates

* Use transformation matrices to convert from cursor coord to pixel

* Adds a struct ScalingMatrix that manages the creation and usage
  of the transformation matrix used in the renderer.
* Added an inverse function on ScalingMatrix - 4x4 matrix inverse
  (This should probably use a library, but it doesn't seem worth
  adding a dependancy for one function)

* Optimize matrix multiplication for cursor position calculation

* Use ultraviolet for matrix and vector math

* Add suggested changes

This keeps the split between usize and isize
This also changes the input cursor position to f32, because it was
immediately cast to an f32 for the transformations.
2020-05-20 21:37:29 -07:00
..
lib.rs Add a method to convert cursor coords to pixel coords (#77) 2020-05-20 21:37:29 -07:00
macros.rs Remove Unsafe in macro.rs (#43) 2019-11-19 21:27:55 -08:00
render_pass.rs Fix screen scaling when window is resized (#25) 2019-10-27 16:35:22 -07:00
renderers.rs Add a method to convert cursor coords to pixel coords (#77) 2020-05-20 21:37:29 -07:00