#[repr(C)]pub struct IPLHit {
pub distance: IPLfloat32,
pub triangleIndex: IPLint32,
pub objectIndex: IPLint32,
pub materialIndex: IPLint32,
pub normal: IPLVector3,
pub material: *mut IPLMaterial,
}Expand description
Information about a ray’s intersection with 3D geometry.
This information should be provided by ray tracer callbacks when using \c IPL_SCENETYPE_CUSTOM. Not all fields are required.
Fields§
§distance: IPLfloat32Distance along the ray from origin to hit point. Set to \c INFINITY if nothing was hit.
triangleIndex: IPLint32(Optional) Index of the primitive hit by the ray. \c -1 if not provided.
objectIndex: IPLint32(Optional) Index of the scene object hit by the ray. \c -1 if not provided.
materialIndex: IPLint32(Optional) Index of the material associated with the primitive hit by the ray. \c -1 if not provided.
normal: IPLVector3Unit length surface normal at the hit point. Ignored if nothing was hit.
material: *mut IPLMaterialPointer to the material at the hit point. Ignored if nothing was hit.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IPLHit
impl RefUnwindSafe for IPLHit
impl !Send for IPLHit
impl !Sync for IPLHit
impl Unpin for IPLHit
impl UnwindSafe for IPLHit
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