#[repr(C)]pub struct Intersection {
pub t: f32,
pub u: f32,
pub v: f32,
pub prim: u32,
}Expand description
Intersection data.
Contains intersection distance, as well as barycentric coordinates.
Fields§
§t: f32Intersection distance. crate::INFINITE when empty.
u: f32Barycentric weight along the first edge.
v: f32Barycentric weight along the second edge.
prim: u32Primitive index.
Implementations§
Source§impl Intersection
impl Intersection
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new intersection.
The intersection distance defaults tocrate::INFINITE with empty
barycentric coordinates, and primitive.
Trait Implementations§
Source§impl Clone for Intersection
impl Clone for Intersection
Source§fn clone(&self) -> Intersection
fn clone(&self) -> Intersection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Intersection
impl Debug for Intersection
Source§impl Default for Intersection
impl Default for Intersection
Source§fn default() -> Intersection
fn default() -> Intersection
Returns the “default value” for a type. Read more
Source§impl ExternType for Intersection
impl ExternType for Intersection
Source§impl PartialEq for Intersection
impl PartialEq for Intersection
impl Copy for Intersection
impl Pod for Intersection
impl StructuralPartialEq for Intersection
Auto Trait Implementations§
impl Freeze for Intersection
impl RefUnwindSafe for Intersection
impl Send for Intersection
impl Sync for Intersection
impl Unpin for Intersection
impl UnwindSafe for Intersection
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.