Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
sorry for my poor english~.
I have some confuse at the code *isect = (*ObjectToWorld)(SurfaceInteraction( ray(pc.z), pError, Point2f(u, v), -ray.d, dpdu, dpdv, Normal3f(0, 0, 0), Normal3f(0, 0, 0), ray.time, this)); in line 367 of curve.cpp.
the hit point is eq ray(pc.z) here,but i think is's ray((*tHit)) but not ray(pc.z) because the pc.z is not eq *tHit if the length of ray is not normalized.
sorry for my poor english~. I have some confuse at the code
*isect = (*ObjectToWorld)(SurfaceInteraction( ray(pc.z), pError, Point2f(u, v), -ray.d, dpdu, dpdv, Normal3f(0, 0, 0), Normal3f(0, 0, 0), ray.time, this));
in line 367 of curve.cpp. the hit point is eqray(pc.z)
here,but i think is'sray((*tHit))
but notray(pc.z)
because thepc.z
is not eq*tHit
if the length of ray is not normalized.