[−][src]Struct quick_maths::Ray
Fields
pos: Vector<N, T>
dir: Vector<N, T>
Implementations
impl<const N: usize, T> Ray<T, N>
[src]
pub fn new(pos: Vector<N, T>, dir: Vector<N, T>) -> Self
[src]
Returns a new ray with the given position and direction
impl<const N: usize, T: Float> Ray<T, N>
[src]
pub fn at(&self, t: T) -> Vector<N, T>
[src]
Returns the position along a ray that corresponds to some parameter T
pub fn step(&mut self, t: T)
[src]
pub fn flip(&self) -> Self
[src]
Flips the direction of this ray
pub fn set_length(&mut self, t: T)
[src]
Sets the length of this ray to the given amount
Trait Implementations
impl<T: Clone, const N: usize> Clone for Ray<T, N>
[src]
impl<T: Copy, const N: usize> Copy for Ray<T, N>
[src]
impl<T: Debug, const N: usize> Debug for Ray<T, N>
[src]
impl<T: Eq, const N: usize> Eq for Ray<T, N>
[src]
impl<T: PartialEq, const N: usize> PartialEq<Ray<T, N>> for Ray<T, N>
[src]
impl<T, const N: usize> StructuralEq for Ray<T, N>
[src]
impl<T, const N: usize> StructuralPartialEq for Ray<T, N>
[src]
Auto Trait Implementations
impl<T, const N: usize> RefUnwindSafe for Ray<T, N> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, const N: usize> Send for Ray<T, N> where
T: Send,
T: Send,
impl<T, const N: usize> Sync for Ray<T, N> where
T: Sync,
T: Sync,
impl<T, const N: usize> Unpin for Ray<T, N> where
T: Unpin,
T: Unpin,
impl<T, const N: usize> UnwindSafe for Ray<T, N> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,