Sphere Class Reference

#include <sphere.h>

Inheritance diagram for Sphere:

GObject List of all members.

Public Member Functions

 Sphere ()
 Sphere (Material mat, Point centre, float radius, bool transmitted=false, float refraction=0.0f)
Pointcentre ()
float & radius ()
const float & radius () const
virtual Point objectCentre (void)
Vector normal (Point p)
bool intersect (Ray ray, float &t, Colour &colour)
bool sample (Point &p, float &pdf, const Point &f, float s, float t)
void print (ostream &)
void read (istream &)
virtual eObjectType objectType (void) const

Private Attributes

Point Centre
float Radius
bool Transmitted
float Refraction

Friends

ostream & operator<< (ostream &, Sphere)
istream & operator>> (istream &, Sphere &)

Constructor & Destructor Documentation

Sphere::Sphere (  )  [inline]

Sphere::Sphere ( Material  mat,
Point  centre,
float  radius,
bool  transmitted = false,
float  refraction = 0.0f 
)


Member Function Documentation

Point& Sphere::centre (  )  [inline]

float& Sphere::radius (  )  [inline]

const float& Sphere::radius (  )  const [inline]

virtual Point Sphere::objectCentre ( void   )  [inline, virtual]

Implements GObject.

Vector Sphere::normal ( Point  p  )  [inline, virtual]

Implements GObject.

bool Sphere::intersect ( Ray  ray,
float &  t,
Colour colour 
) [virtual]

Implements GObject.

bool Sphere::sample ( Point p,
float &  pdf,
const Point f,
float  s,
float  t 
) [virtual]

Implements GObject.

void Sphere::print ( ostream &   )  [virtual]

Implements GObject.

void Sphere::read ( istream &   )  [virtual]

Implements GObject.

virtual eObjectType Sphere::objectType ( void   )  const [inline, virtual]

Implements GObject.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  s,
Sphere  sphere 
) [friend]

istream& operator>> ( istream &  s,
Sphere sphere 
) [friend]


Member Data Documentation

Point Sphere::Centre [private]

float Sphere::Radius [private]

bool Sphere::Transmitted [private]

float Sphere::Refraction [private]


The documentation for this class was generated from the following files:
Generated on Fri Jan 12 10:15:53 2007 for Path tracing coursework by  doxygen 1.5.1-p1