pub struct Ray2D { /* private fields */ }Expand description
A 2D ray defined by an origin point and a direction vector, used for
raycasting against 2D shapes (Rect, Circle).
Implementations§
Source§impl Ray2D
impl Ray2D
pub fn get_origin(&self) -> Vector2D
pub fn get_mut_origin(&mut self) -> &mut Vector2D
pub fn set_origin(&mut self, val: Vector2D) -> &mut Self
pub fn get_direction(&self) -> Vector2D
pub fn get_mut_direction(&mut self) -> &mut Vector2D
pub fn set_direction(&mut self, val: Vector2D) -> &mut Self
Trait Implementations§
impl Copy for Ray2D
Source§impl PartialOrd for Ray2D
impl PartialOrd for Ray2D
impl StructuralPartialEq for Ray2D
Auto Trait Implementations§
impl Freeze for Ray2D
impl RefUnwindSafe for Ray2D
impl Send for Ray2D
impl Sync for Ray2D
impl Unpin for Ray2D
impl UnsafeUnpin for Ray2D
impl UnwindSafe for Ray2D
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more