pub struct Sphere {
pub center: Point,
pub radius: f32,
}
Expand description
A sphere
Fields§
§center: Point
The center of the sphere
radius: f32
The radius of the sphere
Implementations§
Trait Implementations§
Source§impl ClosestPoint<Point> for Sphere
impl ClosestPoint<Point> for Sphere
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 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<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 ClosestPoint<Sphere> for Sphere
impl ClosestPoint<Sphere> for Sphere
Source§fn closest_point(&self, other: &Sphere) -> Point
fn closest_point(&self, other: &Sphere) -> Point
The closest point to another object
Source§impl Intersection<LineSegment> for Sphere
impl Intersection<LineSegment> for Sphere
Source§fn intersects(&self, line: &LineSegment) -> bool
fn intersects(&self, line: &LineSegment) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Plane> for Sphere
impl Intersection<Plane> for Sphere
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 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<Sphere> for LineSegment
impl Intersection<Sphere> for LineSegment
Source§fn intersects(&self, sphere: &Sphere) -> bool
fn intersects(&self, sphere: &Sphere) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Sphere> for Plane
impl Intersection<Sphere> for Plane
Source§fn intersects(&self, sphere: &Sphere) -> bool
fn intersects(&self, sphere: &Sphere) -> 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<Sphere> for Sphere
impl Intersection<Sphere> for Sphere
Source§fn intersects(&self, sphere: &Sphere) -> bool
fn intersects(&self, sphere: &Sphere) -> bool
Whether this shape intersect with the other
Source§impl Intersection<Sphere> for Triangle
impl Intersection<Sphere> for Triangle
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 Sphere
impl Intersection<Triangle> for Sphere
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 Sphere
impl RefUnwindSafe for Sphere
impl Send for Sphere
impl Sync for Sphere
impl Unpin for Sphere
impl UnwindSafe for Sphere
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