Intersection data structure. More...
#include <shape.h>
Public Member Functions | |
Intersection () | |
Create an uninitialized intersection record. | |
Vector3f | toLocal (const Vector3f &d) const |
Transform a direction vector into the local shading frame. | |
Vector3f | toWorld (const Vector3f &d) const |
Transform a direction vector from local to world coordinates. | |
std::string | toString () const |
Return a human-readable summary of the intersection record. | |
Public Attributes | |
Point3f | p |
Position of the surface intersection. | |
float | t |
Unoccluded distance along the ray. | |
Point2f | uv |
UV coordinates, if any. | |
Frame | shFrame |
Shading frame (based on the shading normal) | |
Frame | geoFrame |
Geometric frame (based on the true geometry) | |
const Shape * | mesh |
Pointer to the associated shape. | |
Intersection data structure.
This data structure records local information about a ray-triangle intersection. This includes the position, traveled ray distance, uv coordinates, as well as well as two local coordinate frames (one that corresponds to the true geometry, and one that is used for shading computations).