lighttransport / nanort

NanoRT, single header only modern ray tracing kernel.

Repository from Github https://github.comlighttransport/nanortRepository from Github https://github.comlighttransport/nanort

Documentation Return type of Traverse

cadop opened this issue · comments

commented

In the readme/documentation, the code example says that the accel.Traverse() returns the nearest hit point. However, it is a bool, so I don't think it can actually return a point.

// Returns nearest hit point(if exists)
BVHTraceOptions trace_options; // optional
bool hit = accel.Traverse(ray, triangle_intersecter, trace_options);

Is there a different method that does return the hitpoint?

nanort/nanort.h

Line 736 in 8f8ce22

/// @brief Traverse into BVH along ray and find closest hit point & primitive if

Documentation for Traverse is described here.

There was some inconsistencies in README.md and the source code, so modified it in this commit: 65d776e