Struct rin::scene::physics::Ray [−][src]
pub struct Ray<N> where
N: RealField, { pub origin: Point<N, U3>, pub dir: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>, }
A Ray.
Fields
origin: Point<N, U3>
Starting point of the ray.
dir: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
Direction of the ray.
Implementations
impl<N> Ray<N> where
N: RealField,
[src]
impl<N> Ray<N> where
N: RealField,
[src]pub fn new(
origin: Point<N, U3>,
dir: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
) -> Ray<N>
[src]
origin: Point<N, U3>,
dir: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
) -> Ray<N>
Creates a new ray starting from origin
and with the direction dir
. dir
must be
normalized.
pub fn transform_by(&self, m: &Isometry<N, U3, Unit<Quaternion<N>>>) -> Ray<N>
[src]
Transforms this ray by the given isometry.
pub fn inverse_transform_by(
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>
) -> Ray<N>
[src]
&self,
m: &Isometry<N, U3, Unit<Quaternion<N>>>
) -> Ray<N>
Transforms this ray by the inverse of the given isometry.
pub fn translate_by(
&self,
v: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
) -> Ray<N>
[src]
&self,
v: Matrix<N, U3, U1, <DefaultAllocator as Allocator<N, U3, U1>>::Buffer>
) -> Ray<N>
Translates this ray by the given vector. Its direction is left unchanged.
pub fn point_at(&self, t: N) -> Point<N, U3>
[src]
Computes the point at the given parameter on this line.
This computes self.origin + self.dir * t
.
Trait Implementations
impl<N> Copy for Ray<N> where
N: Copy + RealField,
[src]
N: Copy + RealField,
Auto Trait Implementations
impl<N> RefUnwindSafe for Ray<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for Ray<N>
impl<N> Sync for Ray<N>
impl<N> Unpin for Ray<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for Ray<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,