#[repr(transparent)]pub struct Ray { /* private fields */ }
Implementations
sourceimpl Ray
impl Ray
pub fn closest_point_to_point(&self, p: &Point3D) -> Point3D
pub fn direction(&self) -> Vec3
pub fn distance_to_plane(&self, p: &Plane) -> f32
pub fn distance_to_point(&self, p: &Point3D) -> f32
pub fn origin(&self) -> Point3D
pub fn position_at(&self, t: f32) -> Point3D
pub fn intersect_box(&self, b: &Box) -> (RayIntersectionKind, f32)
pub fn intersect_sphere(&self, s: &Sphere) -> (RayIntersectionKind, f32)
pub fn intersect_triangle(&self, t: &Triangle) -> (RayIntersectionKind, f32)
pub fn intersects_box(&self, b: &Box) -> bool
pub fn intersects_sphere(&self, s: &Sphere) -> bool
pub fn intersects_triangle(&self, t: &Triangle) -> bool
Trait Implementations
sourceimpl PartialEq<Ray> for Ray
impl PartialEq<Ray> for Ray
sourceimpl StaticType for Ray
impl StaticType for Ray
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
impl Copy for Ray
impl Eq for Ray
Auto Trait Implementations
impl RefUnwindSafe for Ray
impl Send for Ray
impl Sync for Ray
impl Unpin for Ray
impl UnwindSafe for Ray
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for T where
T: ToValue,
impl<T> ToClosureReturnValue for T where
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.