Polygon Class Reference

#include <polygon.h>

Inheritance diagram for Polygon:

GObject List of all members.

Public Member Functions

 Polygon ()
 Polygon (Material, int)
 Polygon (Material mat)
virtual Point objectCentre (void)
void setMaxPoints (int m)
int numPoints ()
Point point (int i)
void set (Point p)
void planeEquation (void)
void planeEquation (Vector &normal, float &d)
float evalPlaneEquation (Point)
float evalPlaneEquation (Vector v)
Vector normal (Point)
bool intersect (Ray ray, float &t, Colour &colour)
float TriangularSampling (Point &p, float s, float t, int Type)
float RectangularSampling (Point &p, float s, float t, int Type)
float PolygonSampling (Point &p, float s, float t, int Type)
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

int Max
int N
PointP
Vector Nm
float D

Friends

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

Constructor & Destructor Documentation

Polygon::Polygon (  )  [inline]

Polygon::Polygon ( Material  ,
int   
)

Polygon::Polygon ( Material  mat  )  [inline]


Member Function Documentation

Point Polygon::objectCentre ( void   )  [virtual]

Implements GObject.

void Polygon::setMaxPoints ( int  m  )  [inline]

int Polygon::numPoints (  )  [inline]

Point Polygon::point ( int  i  )  [inline]

void Polygon::set ( Point  p  ) 

void Polygon::planeEquation ( void   ) 

void Polygon::planeEquation ( Vector normal,
float &  d 
)

float Polygon::evalPlaneEquation ( Point   ) 

float Polygon::evalPlaneEquation ( Vector  v  ) 

Vector Polygon::normal ( Point   )  [inline, virtual]

Implements GObject.

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

Implements GObject.

float Polygon::TriangularSampling ( Point p,
float  s,
float  t,
int  Type 
)

float Polygon::RectangularSampling ( Point p,
float  s,
float  t,
int  Type 
)

float Polygon::PolygonSampling ( Point p,
float  s,
float  t,
int  Type 
)

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

Implements GObject.

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

Implements GObject.

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

Implements GObject.

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

Implements GObject.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  s,
Polygon  poly 
) [friend]

istream& operator>> ( istream &  s,
Polygon poly 
) [friend]


Member Data Documentation

int Polygon::Max [private]

int Polygon::N [private]

Point* Polygon::P [private]

Vector Polygon::Nm [private]

float Polygon::D [private]


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