Straight ray (initial position + direction) used for ray-tracing algorithm. More...

Public Member Functions | |
| ray () | |
| empty constructor | |
| ray (const v3 &_x0, const v3 &_u) | |
| direct constructor (position+direction) | |
| const v3 & | x0 () const |
| get initial position | |
| v3 & | x0 () |
| get initial position | |
| const v3 & | u () const |
| get direction | |
| v3 & | u () |
| get direction | |
| v3 | operator() (const double &t) const |
| evaluate 3D position at x0+t*u | |
Static Public Member Functions | |
| static ray | generate_ray_from_camera (const double &alpha_x, const double &alpha_y, const v3 &cam, const v3 &screen_0, const v3 &screen_dx, const v3 &screen_dy) |
| helper static method to generate a ray given a camera position and a screen definition | |
Private Attributes | |
| v3 | internal_x0 |
| internal initial position of the ray | |
| v3 | internal_u |
| internal direction of the ray | |
Straight ray (initial position + direction) used for ray-tracing algorithm.
| cpe::ray::ray | ( | ) |
empty constructor
Referenced by generate_ray_from_camera().
| ray cpe::ray::generate_ray_from_camera | ( | const double & | alpha_x, | |
| const double & | alpha_y, | |||
| const v3 & | cam, | |||
| const v3 & | screen_0, | |||
| const v3 & | screen_dx, | |||
| const v3 & | screen_dy | |||
| ) | [static] |
helper static method to generate a ray given a camera position and a screen definition
References ray().
Referenced by cpe::ray_tracer::trace().

| v3 cpe::ray::operator() | ( | const double & | t | ) | const |
evaluate 3D position at x0+t*u
References internal_u, and internal_x0.
| v3 & cpe::ray::u | ( | ) |
get direction
References internal_u.
| const v3 & cpe::ray::u | ( | ) | const |
get direction
References internal_u.
Referenced by cpe::sphere::intersect(), and cpe::plane::intersect().
| v3 & cpe::ray::x0 | ( | ) |
get initial position
References internal_x0.
| const v3 & cpe::ray::x0 | ( | ) | const |
get initial position
References internal_x0.
Referenced by cpe::sphere::intersect(), and cpe::plane::intersect().
v3 cpe::ray::internal_u [private] |
internal direction of the ray
Referenced by operator()(), and u().
v3 cpe::ray::internal_x0 [private] |
internal initial position of the ray
Referenced by operator()(), and x0().
1.6.3