Main Page | Class Hierarchy | Class List | Class Members

RayScene Class Reference

List of all members.

Public Member Functions

RayMaterialgetMaterial (int index)
int read (char *fileName, int transformType=RayKeyData::MATRIX)
int read (FILE *fp, int transformType)
int write (char *fileName)
int write (FILE *fp=stdout)
Point3D GetColor (Ray3D ray, int rDepth, Point3D cLimit)
void drawOpenGL (void)
void setUpOpenGL (int cplx)
void setCurrentTime (double t, int curveFit=LINEAR)

Static Public Member Functions

static Point3D Reflect (Point3D v, Point3D n)
static int Refract (Point3D v, Point3D n, double ir, Point3D &refract)
static Ray3D GetRay (RayCamera *camera, int i, int j, int width, int height)

Public Attributes

Point3D ambient
Point3D background
RayCameracamera
RayLight ** lights
int lightNum
StaticRayGroupgroup

Detailed Description

This class stores all of the information read out from a .ray file.


Member Function Documentation

void RayScene::drawOpenGL void   ) 
 

This method calls the OpenGL commands for drawing the scene.

Point3D RayScene::GetColor Ray3D  ray,
int  rDepth,
Point3D  cLimit
 

This is the function responsible for the recursive ray-tracing returning the color obtained by shooting a ray into the scene and recursing until either the recursion depth has been reached or the contribution from subsequent bounces is guaranteed to be less than the cut-off.

RayMaterial * RayScene::getMaterial int  index  ) 
 

This method returns the material with the specified index.

Ray3D RayScene::GetRay RayCamera camera,
int  i,
int  j,
int  width,
int  height
[static]
 

This function returns that leaves the camera and goes through pixel (i,j) of the view plane

int RayScene::read FILE *  fp,
int  transformType
 

This method reads in the scene-graph from a .ray file.

int RayScene::read char *  fileName,
int  transformType = RayKeyData::MATRIX
 

This method reads in the scene-graph from a .ray file.

Point3D RayScene::Reflect Point3D  v,
Point3D  n
[static]
 

This function will reflect the vector v about the normal n

int RayScene::Refract Point3D  v,
Point3D  n,
double  ir,
Point3D refract
[static]
 

This function will refract the vector about the normal using the provided indices of refraction The refracted vector is written into refract and a value of 1 is returned if the refraction succeeded (i.e. the necessary arcsin could be computed)

void RayScene::setCurrentTime double  t,
int  curveFit = LINEAR
 

This method updates the current time, changing the parameter values as needed

void RayScene::setUpOpenGL int  cplx  ) 
 

This method class the OpenGL commands to set up everything that needs to be set up prior to rendering

int RayScene::write FILE *  fp = stdout  ) 
 

This method writes out the scene-graph to a .ray file. If no file is specified the scene-graph is written out stdout.

int RayScene::write char *  fileName  ) 
 

This method writes out the scene-graph to a .ray file.


Member Data Documentation

Point3D RayScene::ambient
 

The ambient light in the scene

Point3D RayScene::background
 

The color of the background

RayCamera* RayScene::camera
 

The camera

class StaticRayGroup* RayScene::group
 

The root of the scene-graph

int RayScene::lightNum
 

The number of lights in the scene

class RayLight** RayScene::lights
 

The list of lights in the scene


Generated on Wed Feb 22 15:44:23 2006 for Assignment 2 by  doxygen 1.4.1