Intersection utilities. More...

#include <intersectionutils.h>

Public Member Functions

 LM_DISABLE_CONSTRUCT (IntersectionUtils)
 

Static Public Member Functions

static auto CreateTriangleIntersection (const Primitive *primitive, const Vec3 &p, const Vec2 &b, int faceIndex) -> Intersection
 Create intersection structure. More...
 

Detailed Description

Intersection utilities.

Utility functions for ray-triangle intersections.

Member Function Documentation

static auto IntersectionUtils::CreateTriangleIntersection ( const Primitive primitive,
const Vec3 p,
const Vec2 b,
int  faceIndex 
) -> Intersection
inlinestatic

Create intersection structure.

Helper function to fill in the intersection data from the triangle intersection info. This function is utilized in the implementation of Accel interface.

Parameters
primitivePrimitive on the intersection point.
pIntersection point
bBarycentric coordinates of the triangle at the intersection point.
faceIndexTriangle face index.