pub struct Intersection {
pub node_id: NodeId,
pub mesh_id: MeshId,
pub material_id: MaterialId,
pub distance: f32,
pub point: Vec3,
pub normal: Vec3,
pub uv: Vec2,
}Expand description
A world-space ray intersection against a scene mesh node.
Fields§
§node_id: NodeIdScene node hit by the ray.
mesh_id: MeshIdMesh resource attached to the hit node.
material_id: MaterialIdMaterial resource attached to the hit node.
distance: f32Parametric distance along the ray.
point: Vec3World-space hit point.
normal: Vec3World-space surface normal.
uv: Vec2Interpolated primary UV coordinates, or zero when unavailable.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Intersection
Source§impl Debug for Intersection
impl Debug for Intersection
Source§impl PartialEq for Intersection
impl PartialEq for Intersection
Source§fn eq(&self, other: &Intersection) -> bool
fn eq(&self, other: &Intersection) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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