#include <ray.h>
Collaboration diagram for Ray:

Public Member Functions | |
| const Vector & | direction () const |
| bool | is_normalized () |
| void | normalize () |
| Normalize the direction vector with the origin. | |
| Point3D | origin () const |
| Ray (const Ray &other) | |
| Ray (Point3D origin, Point3D direction) | |
| Ray () | |
| std::string | to_string () |
| ~Ray () | |
Protected Attributes | |
| Vector | _direction |
| bool | _is_normalized |
| Point3D | _origin |
Definition at line 12 of file ray.h.
Definition at line 22 of file ray.h.
References normalize().
Here is the call graph for this function:

| Ray::Ray | ( | const Ray & | other | ) | [inline] |
Definition at line 30 of file ray.h.
References _is_normalized, and normalize().
Here is the call graph for this function:

| const Vector& Ray::direction | ( | ) | const [inline] |
Get the direction of the ray.
Definition at line 53 of file ray.h.
References _direction.
Referenced by Polygon::add_vertex(), Sphere::collides_with(), Polygon::collides_with(), Plane::collides_with(), ImageMap::get_color(), Renderable::get_color_contribution(), Polygon::get_normal(), Plane::get_normal(), operator==(), RippleBumpMap::perturb_normal(), ConcentricBumpMap::perturb_normal(), Plane::Plane(), and trace_ray().
Here is the caller graph for this function:

| bool Ray::is_normalized | ( | ) | [inline] |
| void Ray::normalize | ( | ) | [inline] |
Normalize the direction vector with the origin.
Definition at line 67 of file ray.h.
References _direction, Point3D::x, Point3D::y, and Point3D::z.
Referenced by Ray().
Here is the caller graph for this function:

| Point3D Ray::origin | ( | ) | const [inline] |
Returns the origin
Definition at line 49 of file ray.h.
References _origin.
Referenced by Sphere::collides_with(), Polygon::collides_with(), Plane::collides_with(), operator==(), RippleBumpMap::perturb_normal(), ConcentricBumpMap::perturb_normal(), and trace_ray().
Here is the caller graph for this function:

| std::string Ray::to_string | ( | ) | [inline] |
Convert the ray to a printable representation
Definition at line 57 of file ray.h.
References _direction, _origin, and Point3D::to_string().
Here is the call graph for this function:

Vector Ray::_direction [protected] |
bool Ray::_is_normalized [protected] |
Point3D Ray::_origin [protected] |
1.5.2