Ray Class Reference
3-Dimensional Ray (origin + direction), including several optimization fields (inverse direction and "mailbox ID") More...
#include <Ray.h>
Inheritance diagram for Ray:

Public Member Functions | |
Constructors | |
| Ray () | |
| Ray (const Point3 &origin_, const Vector3 &direction_) | |
Static Public Member Functions | |
| static bool | isValid (real_t t) |
Public Attributes | |
Public Data | |
| Vector3 | direction |
| Vector3 | invDir |
| Point3 | origin |
Detailed Description
3-Dimensional Ray (origin + direction), including several optimization fields (inverse direction and "mailbox ID")
- Date:
- Fall 2008
Definition at line 17 of file Ray.h.
Constructor & Destructor Documentation
Member Function Documentation
| static bool Ray::isValid | ( | real_t | t | ) | [inline, static] |
- Returns:
- whether or not the given t-value represents a valid intersection point
- Note:
- a ray defined by P + t*d, where P is the ray's origin, d is a direction vector, and t is the distance along the ray in meters; with this definition, a valid t-value representing a point along the ray where an intersection could have occurred is positive (not behind the ray's origin) and not at at infinity. In practice, in addition to ensuring that an intersection point's t-value is positive, it dramatically increases robustness to define valid t-values as greater than an epsilon value to prevent self-intersections when a ray's origin and intersection point coincide and the calculated t-value is close to zero but not necessarily equal to zero due to floating point inprecision; by throwing out t-values that are smaller than epsilon, we safeguard ourselves from this numerical instability and disregard invalid self-intersections
Member Data Documentation
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6