pub struct Ray<N> {
pub point: Vec2<N>,
pub dir: Vec2<N>,
}
Expand description
A Ray.
Fields§
§point: Vec2<N>
§dir: Vec2<N>
Implementations§
source§impl<N: FloatCore + FloatType> Ray<N>
impl<N: FloatCore + FloatType> Ray<N>
sourcepub fn cast_to_circle(&self, center: Vec2<N>, radius: N) -> CastResult<N>
pub fn cast_to_circle(&self, center: Vec2<N>, radius: N) -> CastResult<N>
Checks if a ray intersects a circle.
source§impl<B: Copy> Ray<B>
impl<B: Copy> Ray<B>
pub fn inner_as<C: 'static + Copy>(&self) -> Ray<C>where B: AsPrimitive<C>,
source§impl<N: Copy + Add<Output = N> + Mul<Output = N>> Ray<N>
impl<N: Copy + Add<Output = N> + Mul<Output = N>> Ray<N>
pub fn point_at_tval(&self, tval: N) -> Vec2<N>
source§impl<S> Ray<S>
impl<S> Ray<S>
pub fn inner_into<A>(self) -> Ray<A>where S: Into<A>,
pub fn inner_try_into<A>(self) -> Result<Ray<A>, S::Error>where S: TryInto<A>,
source§impl<N: PartialOrd + Copy> Ray<N>
impl<N: PartialOrd + Copy> Ray<N>
pub fn range_side(&self, axis: impl Axis, range: &Range<N>) -> Ordering
source§impl<N: Num + Signed + PartialOrd + Copy + Debug> Ray<N>
impl<N: Num + Signed + PartialOrd + Copy + Debug> Ray<N>
pub fn cast_to_aaline<A: Axis>(&self, a: A, line: N) -> CastResult<N>
pub fn cast_to_rect(&self, rect: &Rect<N>) -> CastResult<N>
Trait Implementations§
impl<N: Copy> Copy for Ray<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for Ray<N>where N: RefUnwindSafe,
impl<N> Send for Ray<N>where N: Send,
impl<N> Sync for Ray<N>where N: Sync,
impl<N> Unpin for Ray<N>where N: Unpin,
impl<N> UnwindSafe for Ray<N>where N: UnwindSafe,
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