Code Overview for Assignment 5 (Animation)


This web page describes the code that is used for assignment 5. It contains:

Note:

FILE LIST:

Main Ray File Viewer:

Shape Classes: Light Classes: Other Code: Return to top.


CLASS AND STRUCT LIST:
 
 
File Name Type Name Subclass Of
shape.h class Shape
group.[cpp/h] class ShapeListElement
group.[cpp/h] class Group Shape
group.[cpp/h] class StaticGroup Group
group.[cpp/h] class ParametrizedGroup Group
rayFileInstance.[cpp/h] class RayFileInstance Shape
triangle.[cpp/h] class Triangle Shape
sphere.[cpp/h] class Sphere Shape
cone.[cpp/h] class Cone Shape
cylinder.[cpp/h] class Cylinder Shape
box.[cpp/h] class Box Shape
light.h class Light
pointLight.[cpp/h] class PointLight Light
directionalLight.[cpp/h] class DirectionalLight Light
spotLight.[cpp/h] class SpotLight Light
key.[cpp/h] class Key
key.[cpp/h] class KeyFile
scene.[cpp/h] class Camera
scene.[cpp/h] class Vertex
scene.[cpp/h] class Material
scene.[cpp/h] class Texture
scene.[cpp/h] class RayFile
scene.[cpp/h] class Scene
geometry.[cpp/h] class Point2D
geometry.[cpp/h] class Point3D
geometry.[cpp/h] class Ray
geometry.[cpp/h] class Matrix
pMatrix.[cpp/h] class Parameter
pMatrix.[cpp/h] class ParametrizedMatrix
image.[cpp/h] struct Pixel
image.[cpp/h] class Image

Return to top.



FUNCTION LIST:
 
File Name Function Name
rayView.[cpp/h] void RayView(const char* fileName, int width, int height, int complexity)
main.cpp int main(int argc, char** argv)
geometry.[cpp/h] Matrix IdentityMatrix(void)
bmp.[cpp/h] Image* BMPReadImage(FILE* fp)
bmp.[cpp/h] void BMPWriteImage(Image* img, FILE* fp)

Return to top.



CLASS AND STRUCT DESCRIPTION: Return to top.


MEMBERS AND METHODS LIST:
 
File Name Method/Member Name
Shape
shape.h virtual char* Shape::name(void)
shape.h virtual void Shape::write(int indent, FILE* fp=stdout)
shape.h void Shape::draw(int complexity)
ShapeListElement
group.[cpp/h] ShapeListElement* ShapeListElement::next
group.[cpp/h] Shape* ShapeListElement::shape
group.[cpp/h] ShapeListElement::ShapeListElement(Shape* shape)
group.[cpp/h] void ShapeListElement::~ShapeListElement(void)
group.[cpp/h] void ShapeListElement::addShape(Shape* shape)
Group
group.[cpp/h] ShapeListElement* Group::shapeList
group.[cpp/h] Group::Group(void)
group.[cpp/h] Group::~Group(void)
group.[cpp/h] void Group::addShape(Shape* shape)
group.[cpp/h] int Group::shapeNum(void)
group.[cpp/h] void Group::draw(int complexity)
group.[cpp/h] void Group::write(int indent, FILE* fp=stdout)
group.[cpp/h] virtual void Group::writeBegin(int indent, FILE* fp=stdout)
group.[cpp/h] virtual void Group::writeEnd(int indent, FILE* fp=stdout)
group.[cpp/h] virtual Matrix Group::getMatrix(void)
StaticGroup
group.[cpp/h] Matrix StaticGroup::localTransform
group.[cpp/h] StaticGroup::StaticGroup(FILE* fp)
group.[cpp/h] StaticGroup::StaticGroup(Matrix localTransform)
group.[cpp/h] char* StaticGroup::name(void)
group.[cpp/h] Matrix StaticGroup::getMatrix(void)
group.[cpp/h] void StaticGroup::writeBegin(int indent, FILE* fp=stdout)
group.[cpp/h] void StaticGroup::writeEnd(int indent, FILE* fp=stdout)
ParametrizedGroup
group.[cpp/h] Parameter* ParametrizedGroup::parameter
group.[cpp/h] ParametrizedMatrix ParametrizedGroup::localTransform
group.[cpp/h] ParametrizedGroup::ParametrizedGroup(FILE* fp)
group.[cpp/h] char* ParametrizedGroup::name(void)
group.[cpp/h] Matrix ParametrizedGroup::getMatrix(void)
group.[cpp/h] void ParametrizedGroup::writeBegin(int indent, FILE* fp=stdout)
group.[cpp/h] void ParametrizedGroup::writeEnd(int indent, FILE* fp=stdout)
RayFileInstance
rayFileInstance.[cpp/h] RayFileInstance::RayFileInstance(RayFile* rayFile)
rayFileInstance.[cpp/h] char* RayFileInstance::name(void)
rayFileInstance.[cpp/h] void RayFileInstance::write(int indent, FILE* fp=stdout)
rayFileInstance.[cpp/h] void RayFileInstance::draw(int complexity)
Triangle
triangle.[cpp/h] Vertex* Triangle::v[3]
triangle.[cpp/h] Material Triangle::material
triangle.[cpp/h] Triangle::Triangle(Vertex* v1, Vertex* v2, Vertex* v3, Material* material)
triangle.[cpp/h] Triangle::Triangle(FILE* fp, int* materialIndex, Vertex* vList, int vSize)
triangle.[cpp/h] char* Triangle::name(void)
triangle.[cpp/h] void Triangle::write(int indent, FILE* fp=stdout)
triangle.[cpp/h] void Triangle::draw(int complexity)
Sphere
sphere.[cpp/h] Point3D Sphere::center
sphere.[cpp/h] Flt Sphere::radius
sphere.[cpp/h] Material* Sphere::material
sphere.[cpp/h] Sphere::Sphere(Point3D center, Flt radius, Material* material)
sphere.[cpp/h] Sphere::Sphere(FILE* fp, int* materialIndex)
sphere.[cpp/h] char* Sphere::name(void)
sphere.[cpp/h] void Sphere::write(int indent, FILE* fp=stdout)
sphere.[cpp/h] void Sphere::draw(int complexity)
Cone
cone.[cpp/h] Point3D Cone::center
cone.[cpp/h] Flt Cone::height
cone.[cpp/h] Flt Cone::radius
cone.[cpp/h] Material* Cone::material
cone.[cpp/h] Cone::Cone(Point3D center, Flt height, Flt radius, Material* material)
cone.[cpp/h] Cone::Cone(FILE* fp, int* materialIndex)
cone.[cpp/h] char* Cone::name(void)
cone.[cpp/h] void Cone::write(int indent, FILE* fp=stdout)
cone.[cpp/h] void Cone::draw(int complexity)
Cylinder
cylinder.[cpp/h] Point3D Cylinder::center
cylinder.[cpp/h] Flt Cylinder::height
cylinder.[cpp/h] Flt Cylinder::radius
cylinder.[cpp/h] Material* Cylinder::material
cylinder.[cpp/h] Cylinder::Cylinder(Point3D center, Flt height, Flt radius, Material* material)
cylinder.[cpp/h] Cylinder::Cylinder(FILE* fp, int* materialIndex)
cylinder.[cpp/h] char* Cylinder::name(void)
cylinder.[cpp/h] void Cylinder::write(int indent, FILE* fp=stdout)
cylinder.[cpp/h] void Cylinder::draw(int complexity)
Box
box.[cpp/h] Point3D Box::center
box.[cpp/h] Point3D Box::length
box.[cpp/h] Material* Box::material
box.[cpp/h] Box::Box(Point3D center, Point3D length, Material* material)
box.[cpp/h] Box::Box(FILE* fp, int* materialIndex)
box.[cpp/h] char* Box::name(void)
box.[cpp/h] void Box::write(int indent, FILE* fp=stdout)
box.[cpp/h] void Box::draw(int complexity)
Light
light.h Point3D Light::color
light.h virtual int Light::read(FILE* fp)
light.h virtual void Light::write(FILE* fp=stdout)
light.h virtual void Light::draw(int lightNum)
PointLight
pointLight.[cpp/h] Point3D PointLight::location
pointLight.[cpp/h] Flt PointLight::constAtten
pointLight.[cpp/h] Flt PointLight::linearAtten
pointLight.[cpp/h] Flt PointLight::quadAtten
pointLight.[cpp/h] int PointLight::read(FILE* fp)
pointLight.[cpp/h] void PointLight::write(FILE* fp=stdout)
pointLight.[cpp/h] void PointLight::draw(int lightNum)
DirectionalLight
directionalLight.[cpp/h] Point3D DirectionalLight::direction
directionalLight.[cpp/h] int DirectionalLight::read(FILE* fp)
directionalLight.[cpp/h] void DirectionalLight::write(FILE* fp=stdout)
directionalLight.[cpp/h] void DirectionalLight::draw(int lightNum)
SpotLight
spotLight.[cpp/h] Point3D SpotLight::location
spotLight.[cpp/h] Point3D SpotLight::direction
spotLight.[cpp/h] Flt SpotLight::constAtten
spotLight.[cpp/h] Flt SpotLight::linearAtten
spotLight.[cpp/h] Flt SpotLight::quadAtten
spotLight.[cpp/h] Flt SpotLight::cutOffAngle
spotLight.[cpp/h] Flt SpotLight::dropOffRate
spotLight.[cpp/h] int SpotLight::read(FILE* fp)
spotLight.[cpp/h] void SpotLight::write(FILE* fp=stdout)
spotLight.[cpp/h] void SpotLight::draw(int lightNum)
Key
key.[cpp/h] Parameter* Key::parameter
key.[cpp/h] Key::Key(void)
key.[cpp/h] Key::~Key(void)
key.[cpp/h] void Key::setParameterName(char* name)
key.[cpp/h] void Key::setSize(int size)
key.[cpp/h] int Key::samples(void)
key.[cpp/h] char* Key::name(void)
key.[cpp/h] float& Key::operator[ ] (int index)
key.[cpp/h] float& Key::index(int index)
KeyFile
key.[cpp/h] Key* KeyFile::keyList
key.[cpp/h] char KeyFile::fileName[ ]
key.[cpp/h] KeyFile::KeyFile(char* fileName)
key.[cpp/h] KeyFile::~KeyFile(void)
key.[cpp/h] void KeyFile::write(char* fileName)
key.[cpp/h] void KeyFile::write(FILE* fp=stdout)
key.[cpp/h] void KeyFile::read(char* fileName)
key.[cpp/h] void KeyFile::read(FILE* fp)
key.[cpp/h] int KeyFile::keyNum(void)
key.[cpp/h] int KeyFile::frameNum(void)
key.[cpp/h] float KeyFile::duration(void)
key.[cpp/h] int KeyFile::indexOf(char* name)
key.[cpp/h] void KeyFile::setParameterValues(float time)
key.[cpp/h] void KeyFile::linkParameters(Parameter** parameterList, int pCount)
Camera
scene.[cpp/h] Flt Camera::heightAngle
scene.[cpp/h] Flt Camera::aspectRatio
scene.[cpp/h] Point3D Camera::position
scene.[cpp/h] Point3D Camera::direction
scene.[cpp/h] Point3D Camera::up
scene.[cpp/h] Point3D Camera::right
scene.[cpp/h] int Camera::read(FILE* fp)
scene.[cpp/h] void Camera::write(FILE* fp=stdout)
Vertex
scene.[cpp/h] int Vertex::index
scene.[cpp/h] Point3D Vertex::position
scene.[cpp/h] Point3D Vertex::normal
scene.[cpp/h] Point2D Vertex::texCoordinate
scene.[cpp/h] int Vertex::read(FILE* fp)
scene.[cpp/h] void Vertex::write(FILE* fp=stdout)
Material
scene.[cpp/h] int Material::index
scene.[cpp/h] Point3D Material::ambient
scene.[cpp/h] Point3D Material::diffuse
scene.[cpp/h] Point3D Material::specular
scene.[cpp/h] Point3D Material::emmisive
scene.[cpp/h] Flt Material::kspec
scene.[cpp/h] Flt Material::ktran
scene.[cpp/h] Flt Material::refind
scene.[cpp/h] Texture* Material::tex
scene.[cpp/h] char Material::foo[ ]
scene.[cpp/h] GLuint Material::handle
scene.[cpp/h] Material::Material(void)
scene.[cpp/h] Material::Material(int index, Point3D ambient, Point3D color, Flt kspec)
scene.[cpp/h] void Material::setHandle(void)
scene.[cpp/h] int Material::read(FILE* fp)
scene.[cpp/h] void Material::write(FILE* fp=stdout)
Texture
scene.[cpp/h] int Texture::index
scene.[cpp/h] char Texture::filename[ ]
scene.[cpp/h] GLuint Texture::handle
scene.[cpp/h] Image* Texture::img
scene.[cpp/h] Texture::Texture(void)
scene.[cpp/h] Texture::~Texture(void)
scene.[cpp/h] void Texture::setHandle(void)
scene.[cpp/h] int Texture::read(FILE* fp)
scene.[cpp/h] void Texture::write(FILE* fp=stdout)
RayFile
scene.[cpp/h] int RayFile::index
scene.[cpp/h] char RayFile::filename[ ]
scene.[cpp/h] Scene* RayFile::scene
scene.[cpp/h] RayFile::~RayFile(void)
scene.[cpp/h] int RayFile::read(FILE* fp)
scene.[cpp/h] void RayFile::write(FILE* fp=stdout)
Scene
scene.[cpp/h] Point3D Scene::ambient
scene.[cpp/h] Point3D Scene::background
scene.[cpp/h] Camera Scene::camera
scene.[cpp/h] Light** Scene::lights
scene.[cpp/h] int Scene::lightNum
scene.[cpp/h] StaticGroup* Scene::group
scene.[cpp/h] KeyFile* Scene::keyFiles
scene.[cpp/h] int Scene::keyFileNum
scene.[cpp/h] Scene::Scene(void)
scene.[cpp/h] Scene::~Scene(void)
scene.[cpp/h] Material* Scene::getMaterial(int index)
scene.[cpp/h] void Scene::setHandles(void)
scene.[cpp/h] void Scene::setParameters(float time)
scene.[cpp/h] void Scene::read(const char* filename)
scene.[cpp/h] void Scene::write(FILE* fp=stdout)
Point2D
geometry.[cpp/h] Point2D::Point2D(void)
geometry.[cpp/h] Point2D::Point2D(Flt x, Flt y)
geometry.[cpp/h] Flt& Point2D::operator[ ] (int index)
geometry.[cpp/h] void Point2D::print(void)
geometry.[cpp/h] void Point2D::printnl(void)
geometry.[cpp/h] Flt Point2D::dot(Point2D pt)
geometry.[cpp/h] Flt Point2D::length(void)
geometry.[cpp/h] Point2D Point2D::unit(void)
geometry.[cpp/h] Point2D Point2D::negate(void)
geometry.[cpp/h] Point2D Point2D::operator- (void)
geometry.[cpp/h] Point2D Point2D::scale(Flt scl)
geometry.[cpp/h] Point2D Point2D::operator* (Flt scale)
geometry.[cpp/h] Point2D Point2D::operator/ (Flt scale)
geometry.[cpp/h] Point2D Point2D::add(Point2D pt)
geometry.[cpp/h] Point2D Point2D::operator+ (Point2D pt)
geometry.[cpp/h] Point2D Point2D::subtract(Point2D pt)
geometry.[cpp/h] Point2D Point2D::operator- (Point2D pt)
geometry.[cpp/h] Point2D Point2D::mult(Point2D pt)
Point3D
geometry.[cpp/h] Point3D::Point3D(void)
geometry.[cpp/h] Point3D::Point3D(Flt x, Flt y, Flt z)
geometry.[cpp/h] Flt& Point3D::operator[ ] (int index)
geometry.[cpp/h] void Point3D::print(void)
geometry.[cpp/h] void Point3D::printnl(void)
geometry.[cpp/h] Flt Point3D::dot(Point3D pt)
geometry.[cpp/h] Flt Point3D::length(void)
geometry.[cpp/h] Point3D Point3D::unit(void)
geometry.[cpp/h] Point3D Point3D::negate(void)
geometry.[cpp/h] Point3D Point3D::operator- (void)
geometry.[cpp/h] Point3D Point3D::scale(Flt scl)
geometry.[cpp/h] Point3D Point3D::operator* (Flt scale)
geometry.[cpp/h] Point3D Point3D::operator/ (Flt scale)
geometry.[cpp/h] Point3D Point3D::add(Point3D pt)
geometry.[cpp/h] Point3D Point3D::operator+ (Point3D pt)
geometry.[cpp/h] Point3D Point3D::subtract(Point3D pt)
geometry.[cpp/h] Point3D Point3D::operator- (Point3D pt)
geometry.[cpp/h] Point3D Point3D::crossProduct(Point3D pt)
geometry.[cpp/h] Point3D Point3D::mult(Point3D pt)
Ray
geometry.[cpp/h] Point3D Ray::p
geometry.[cpp/h] Point3D Ray::d
geometry.[cpp/h] Ray::Ray(void)
geometry.[cpp/h] Ray::Ray(Point3D p,Point3D d)
geometry.[cpp/h] void Ray::print(void)
geometry.[cpp/h] void Ray::printnl(void)
geometry.[cpp/h] Ray Ray::translate(Point3D pt)
geometry.[cpp/h] Point3D Ray::operator( ) (Flt param)
geometry.[cpp/h] Point3D Ray::position(Flt param)
Matrix
geometry.[cpp/h] Flt& Matrix::operator( ) (int col,int row)
geometry.[cpp/h] Flt Matrix::det(void)
geometry.[cpp/h] void Matrix::print(void)
geometry.[cpp/h] void Matrix::printnl(void)
geometry.[cpp/h] Matrix Matrix::mult(Matrix m)
geometry.[cpp/h] Matrix Matrix::operator* (Matrix m)
geometry.[cpp/h] Matrix Matrix::transpose(void)
geometry.[cpp/h] Matrix Matrix::invert(void)
geometry.[cpp/h] Point3D Matrix::multPosition(Point3D position)
geometry.[cpp/h] Point3D Matrix::multDirection(Point3D direction)
geometry.[cpp/h] Point3D Matrix::multNormal(Point3D normal)
geometry.[cpp/h] Ray Matrix::mult(Ray ray)
geometry.[cpp/h] Ray Matrix::operator* (Ray ray)
Parameter
pMatrix.[cpp/h] float Parameter::value
pMatrix.[cpp/h] char Parameter::name[ ]
pMatrix.[cpp/h] Parameter::Parameter(void)
ParametrizedMatrix
pMatrix.[cpp/h] void ParametrizedMatrix::setType(int type)
pMatrix.[cpp/h] int ParametrizedMatrix::getType(void)
pMatrix.[cpp/h] Matrix ParametrizedMatrix::getMatrix(float t)
Pixel
image.[cpp/h] unsigned char Pixel::r
image.[cpp/h] unsigned char Pixel::g
image.[cpp/h] unsigned char Pixel::b
image.[cpp/h] unsigned char Pixel::a
Image
image.[cpp/h] Pixel* Image::pixelList
image.[cpp/h] Image::Image(void)
image.[cpp/h] Image::~Image(void)
image.[cpp/h] int Image::width(void)
image.[cpp/h] int Image::height(void)
image.[cpp/h] Pixel& Image::operator( ) (int x, int y)
image.[cpp/h] Pixel& Image::pixel(int x, int y)

Return to top.



FUNCTION DESCRIPTION:
  Return to top.


CLASS AND STRUCT MEMBERS AND METHODS DESCRIPTION: