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:

SSEAligned

List of all members.

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")

Author:
Travis Fischer (fisch0920@gmail.com)

Matthew Jacobs (jacobs.mh@gmail.com)

Date:
Fall 2008

Definition at line 17 of file Ray.h.


Constructor & Destructor Documentation

Ray::Ray (  )  [inline]

Definition at line 31 of file Ray.h.

Ray::Ray ( const Point3 origin_,
const Vector3 direction_ 
) [inline]

Parameters:
origin_ is the origin of the ray
direction_ is the direction of the ray

Definition at line 38 of file Ray.h.


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

Definition at line 66 of file Ray.h.


Member Data Documentation

Definition at line 22 of file Ray.h.

Definition at line 23 of file Ray.h.

Definition at line 24 of file Ray.h.


The documentation for this class was generated from the following files:

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6