hiprtGeomTraversalClosestCustomStack

Initiates BVH traversal for a ray and finds the closest hit for a custom primitive hipGeometry. A user can provide a custom stack allocated in local memory for traversal.

Public Member Functions

Function

Description

hiprtGeomTraversalClosestCustomStack (hiprtGeometry geom, const hiprtRay& ray, hiprtStack &stack);

Constructor taking an instance of hiprtGeometry, a ray and pointer to function table with custom primitives intersection functions for initating traversal.

getNextHit();

Returns the next closest hit. For return value see the structure hiprtHit.

getCurrentState();

Queries current traversal state. Return value can be one of the values from hiprtTraversalState enum.