pub struct Triangle {
pub a: Point,
pub b: Point,
pub c: Point,
}
Expand description
A triangle
Fields§
§a: Point
§b: Point
§c: Point
Implementations§
Trait Implementations§
Source§impl ClosestPoint<Point> for Triangle
impl ClosestPoint<Point> for Triangle
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 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 Collision<Triangle> for LineSegment
impl Collision<Triangle> for LineSegment
Source§impl Intersection<LineSegment> for Triangle
impl Intersection<LineSegment> for Triangle
Source§fn intersects(&self, line: &LineSegment) -> bool
fn intersects(&self, line: &LineSegment) -> 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 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 LineSegment
impl Intersection<Triangle> for LineSegment
Source§fn intersects(&self, triangle: &Triangle) -> bool
fn intersects(&self, triangle: &Triangle) -> 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
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 Triangle
impl RefUnwindSafe for Triangle
impl Send for Triangle
impl Sync for Triangle
impl Unpin for Triangle
impl UnwindSafe for Triangle
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