Straight ray (initial position + direction) used for ray-tracing algorithm. More...
Public Member Functions | |
ray (const vec3 &x0=vec3(), const vec3 &u=vec3()) | |
direct constructor (position+direction) More... | |
vec3 | operator() (float t) const |
evaluate 3D position at x0+t*u More... | |
void | offset (const double &epsilon=1e-3) |
offset the ray by epsilon in the direction of the normal More... | |
Public Attributes | |
vec3 | x0 |
internal initial position of the ray More... | |
vec3 | u |
internal direction of the ray More... | |
Straight ray (initial position + direction) used for ray-tracing algorithm.
direct constructor (position+direction)
References cpe::vec3::norm2(), cpe::vec3::normalized(), and u.
void cpe::ray::offset | ( | const double & | epsilon = 1e-3 | ) |
vec3 cpe::ray::u |
internal direction of the ray
Referenced by cpe::plane::intersect(), cpe::sphere::intersect(), offset(), operator()(), cpe::operator<<(), and ray().
vec3 cpe::ray::x0 |
internal initial position of the ray
Referenced by cpe::plane::intersect(), cpe::sphere::intersect(), offset(), operator()(), and cpe::operator<<().