cpe::ray Class Reference

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

Collaboration diagram for cpe::ray:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ray ()
 empty constructor
 ray (const v3 &_x0, const v3 &_u)
 direct constructor (position+direction)
const v3x0 () const
 get initial position
v3x0 ()
 get initial position
const v3u () const
 get direction
v3u ()
 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

Detailed Description

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


Constructor & Destructor Documentation

cpe::ray::ray (  ) 

empty constructor

Referenced by generate_ray_from_camera().

cpe::ray::ray ( const v3 _x0,
const v3 _u 
)

direct constructor (position+direction)


Member Function Documentation

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().

Here is the call graph for this function:

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().


Member Data Documentation

internal direction of the ray

Referenced by operator()(), and u().

internal initial position of the ray

Referenced by operator()(), and x0().


The documentation for this class was generated from the following files:
Generated on Mon Apr 18 16:13:46 2011 by  doxygen 1.6.3