[−][src]Struct ncollide_geometry::query::RayIntersection
Structure containing the result of a successful ray cast.
Fields
toi: V::Real
The time of impact of the ray with the object. The exact contact point can be computed
with: origin + dir * toi
where origin
is the origin of the ray; dir
is its direction and
toi
is the value of this field.
normal: V
The normal at the intersection point.
If the toi
is exactly zero, the normal might not be reliable.
uvs: Option<Point2<V::Real>>
The textures coordinates at the intersection point. This is an Option
because some shape
do not support texture coordinates.
Methods
impl<V: Vector> RayIntersection<V>
[src]
pub fn new_with_uvs(
toi: V::Real,
normal: V,
uvs: Option<Point2<V::Real>>
) -> RayIntersection<V>
[src]
toi: V::Real,
normal: V,
uvs: Option<Point2<V::Real>>
) -> RayIntersection<V>
Creates a new RayIntersection
.
pub fn new(toi: V::Real, normal: V) -> RayIntersection<V>
[src]
Creates a new RayIntersection
.
Auto Trait Implementations
impl<V> Send for RayIntersection<V> where
<V as InnerSpace>::Real: Scalar + Send,
<V as InnerSpace>::Real: Scalar + Send,
impl<V> Sync for RayIntersection<V> where
<V as InnerSpace>::Real: Scalar + Sync,
<V as InnerSpace>::Real: Scalar + Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> Same for T
type Output = T
Should always be Self