Struct oxygengine_physics_2d::prelude::ncollide2d::query::Ray [−][src]
pub struct Ray<N> where
N: RealField, { pub origin: Point<N, U2>, pub dir: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>, }
A Ray.
Fields
origin: Point<N, U2>
Starting point of the ray.
dir: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, 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, U2>,
dir: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> Ray<N>
[src]
origin: Point<N, U2>,
dir: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, 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, U2, Unit<Complex<N>>>) -> Ray<N>
[src]
Transforms this ray by the given isometry.
pub fn inverse_transform_by(
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>
) -> Ray<N>
[src]
&self,
m: &Isometry<N, U2, Unit<Complex<N>>>
) -> Ray<N>
Transforms this ray by the inverse of the given isometry.
pub fn translate_by(
&self,
v: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> Ray<N>
[src]
&self,
v: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, 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, U2>
[src]
Computes the point at the given parameter on this line.
This computes self.origin + self.dir * t
.
Trait Implementations
Auto Trait Implementations
impl<N> RefUnwindSafe for Ray<N> where
N: RefUnwindSafe,
impl<N> RefUnwindSafe for Ray<N> where
N: RefUnwindSafe,
impl<N> UnwindSafe for Ray<N> where
N: UnwindSafe,
impl<N> UnwindSafe for Ray<N> where
N: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
pub fn get_type_id(&self) -> TypeId
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,