cpe::sphere Class Reference

Object3d of type Sphere (center+radius). Analytically compute intersection with a ray. More...

Inheritance diagram for cpe::sphere:
Inheritance graph
[legend]
Collaboration diagram for cpe::sphere:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 sphere ()
 empty constructor
 sphere (const v3 &x0, const double &r)
 direct constructor (center+radius)
virtual ~sphere ()
 desctructor
virtual std::vector
< intersection_data
intersect (const ray &seg) const
 Analytic intersection between a ray and the sphere.

Private Attributes

v3 x0
 internal center of the sphere
double r
 internal radius of the sphere

Detailed Description

Object3d of type Sphere (center+radius). Analytically compute intersection with a ray.


Constructor & Destructor Documentation

cpe::sphere::sphere (  ) 

empty constructor

cpe::sphere::sphere ( const v3 x0,
const double &  r 
)

direct constructor (center+radius)

cpe::sphere::~sphere (  )  [virtual]

desctructor


Member Function Documentation

std::vector< intersection_data > cpe::sphere::intersect ( const ray seg  )  const [virtual]

Analytic intersection between a ray and the sphere.

Implements cpe::object3d.

References cpe::v3::dot(), cpe::ray::u(), x0, and cpe::ray::x0().

Here is the call graph for this function:


Member Data Documentation

double cpe::sphere::r [private]

internal radius of the sphere

v3 cpe::sphere::x0 [private]

internal center of the sphere

Referenced by intersect().


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