pub struct Ray {
pub origin: Point,
pub direction: Vector3,
}
Expand description
An infinite ray
Fields§
§origin: Point
The starting point of the ray
direction: Vector3
The direction of the ray
Implementations§
Trait Implementations§
Source§impl ClosestPoint<Capsule> for Ray
impl ClosestPoint<Capsule> for Ray
Source§fn closest_point(&self, other: &Capsule) -> Point
fn closest_point(&self, other: &Capsule) -> Point
The closest point to another object
Source§impl ClosestPoint<Line> for Ray
impl ClosestPoint<Line> for Ray
Source§fn closest_point(&self, other: &Line) -> Point
fn closest_point(&self, other: &Line) -> Point
The closest point to another object
Source§impl ClosestPoint<LineSegment> for Ray
impl ClosestPoint<LineSegment> for Ray
Source§fn closest_point(&self, other: &LineSegment) -> Point
fn closest_point(&self, other: &LineSegment) -> Point
The closest point to another object
Source§impl ClosestPoint<Point> for Ray
impl ClosestPoint<Point> for Ray
Source§fn closest_point(&self, other: &Point) -> Point
fn closest_point(&self, other: &Point) -> Point
The closest point to another object
Source§impl ClosestPoint<Ray> for Capsule
impl ClosestPoint<Ray> for Capsule
Source§fn closest_point(&self, other: &Ray) -> Point
fn closest_point(&self, other: &Ray) -> Point
The closest point to another object
Source§impl ClosestPoint<Ray> for Line
impl ClosestPoint<Ray> for Line
Source§fn closest_point(&self, other: &Ray) -> Point
fn closest_point(&self, other: &Ray) -> Point
The closest point to another object
Source§impl ClosestPoint<Ray> for LineSegment
impl ClosestPoint<Ray> for LineSegment
Source§fn closest_point(&self, other: &Ray) -> Point
fn closest_point(&self, other: &Ray) -> Point
The closest point to another object
Source§impl ClosestPoint<Ray> for Plane
impl ClosestPoint<Ray> for Plane
Source§fn closest_point(&self, other: &Ray) -> Point
fn closest_point(&self, other: &Ray) -> Point
The closest point to another object
Source§impl ClosestPoint<Ray> for Ray
impl ClosestPoint<Ray> for Ray
Source§fn closest_point(&self, other: &Ray) -> Point
fn closest_point(&self, other: &Ray) -> Point
The closest point to another object
Source§impl ClosestPoint<Ray> for Sphere
impl ClosestPoint<Ray> for Sphere
Source§fn closest_point(&self, other: &Ray) -> Point
fn closest_point(&self, other: &Ray) -> Point
The closest point to another object
Source§impl ClosestPoint<Ray> for Triangle
impl ClosestPoint<Ray> for Triangle
Source§fn closest_point(&self, other: &Ray) -> Point
fn closest_point(&self, other: &Ray) -> Point
The closest point to another object
Source§impl ClosestPoint<Sphere> for Ray
impl ClosestPoint<Sphere> for Ray
Source§fn closest_point(&self, other: &Sphere) -> Point
fn closest_point(&self, other: &Sphere) -> Point
The closest point to another object
Source§impl Distance<LineSegment> for Ray
impl Distance<LineSegment> for Ray
Source§fn distance(&self, l: &LineSegment) -> f32
fn distance(&self, l: &LineSegment) -> f32
The distance between two objects
Source§impl Distance<Ray> for LineSegment
impl Distance<Ray> for LineSegment
Source§impl Intersection<Capsule> for Ray
impl Intersection<Capsule> for Ray
Source§fn intersects(&self, rhs: &Capsule) -> bool
fn intersects(&self, rhs: &Capsule) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Plane> for Ray
impl Intersection<Plane> for Ray
Source§fn intersects(&self, plane: &Plane) -> bool
fn intersects(&self, plane: &Plane) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Ray> for Capsule
impl Intersection<Ray> for Capsule
Source§fn intersects(&self, rhs: &Ray) -> bool
fn intersects(&self, rhs: &Ray) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Ray> for Plane
impl Intersection<Ray> for Plane
Source§fn intersects(&self, ray: &Ray) -> bool
fn intersects(&self, ray: &Ray) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Ray> for Sphere
impl Intersection<Ray> for Sphere
Source§fn intersects(&self, ray: &Ray) -> bool
fn intersects(&self, ray: &Ray) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Ray> for Triangle
impl Intersection<Ray> for Triangle
Source§fn intersects(&self, ray: &Ray) -> bool
fn intersects(&self, ray: &Ray) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Sphere> for Ray
impl Intersection<Sphere> for Ray
Source§fn intersects(&self, sphere: &Sphere) -> bool
fn intersects(&self, sphere: &Sphere) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Triangle> for Ray
impl Intersection<Triangle> for Ray
Source§fn intersects(&self, triangle: &Triangle) -> bool
fn intersects(&self, triangle: &Triangle) -> bool
Whether this shape intersect with the other
Auto Trait Implementations§
impl Freeze for Ray
impl RefUnwindSafe for Ray
impl Send for Ray
impl Sync for Ray
impl Unpin for Ray
impl UnwindSafe for Ray
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more