GeometricObject

GeometricObject - g protected: p RGBColor color; // only...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#ifndef __GEOMETRIC_OBJECT__ #define __GEOMETRIC_OBJECT__ # // this file contains the declaration of the class GeometricObject / #include "RGBColor.h" #include "Point3D.h" #include "Normal.h" #include "Ray.h" #include "ShadeRec.h" # #include "Constants.h" # class GeometricObject { c public: p GeometricObject(void); // default constructor / GeometricObject(const GeometricObject& object); // copy constructor c virtual GeometricObject* // virtual copy constructor clone(void) const = 0; c virtual // destructor ~GeometricObject (void); ~ virtual bool hit(const Ray& ray, double& t, ShadeRec& s) const = 0; h // the following three functions are only required for Chapter 3 / void set_color(const RGBColor& c); s void set_color(const float r, const float g, const float b); s RGBColor get_color(void);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: g protected: p RGBColor color; // only used for Bare Bones ray tracing B GeometricObject& // assignment operator operator= (const GeometricObject& rhs); }; } // -------------------------------------------------------------------- set_colour / inline void GeometricObject::set_color(const RGBColor& c) { color = c; } // -------------------------------------------------------------------- set_colour / inline void GeometricObject::set_color(const float r, const float g, const float b) { color.r = r; color.b = b; color.g = g; } // -------------------------------------------------------------------- get_colour / inline RGBColor GeometricObject::get_color(void) { return (color); } #endif...
View Full Document

This note was uploaded on 02/19/2010 for the course CS 390 taught by Professor Hu during the Spring '10 term at Westminster UT.

Page1 / 2

GeometricObject - g protected: p RGBColor color; // only...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online