World - c public p ViewPlane vp RGBColor background_color...

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

View Full Document Right Arrow Icon
#ifndef __WORLD__ #define __WORLD__ # // This file contains the declaration of the class World // The World class does not have a copy constructor or an assignment operator, for the followign reasons: t // 1 There's no need to copy construct or assign the World // 2 We wouldn't want to do this anyway, because the world can contain an arbitray amount of data // 3 These operations wouldn't work because the world is self-referencing: // the Tracer base class contains a pointer to the world. If we wrote a correct copy constructor for the // Tracer class, the World copy construtor would call itself recursively until we ran out of memory. u #include <vector> # #include "ViewPlane.h" #include "RGBColor.h" #include "Tracer.h" #include "GeometricObject.h" #include "Sphere.h" #include "Ray.h" # using namespace std; u class RenderThread; //part of skeleton - wxRaytracer.h / class World {
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: c public: p ViewPlane vp; RGBColor background_color; Tracer* tracer_ptr; Sphere sphere; // for Chapter 3 only vector<GeometricObject*> objects; o RenderThread* paintArea; //connection to skeleton - wxRaytracer.h-public: p World(void); W ~World(); ~ void add_object(GeometricObject* object_ptr); a void v build(void); b void v render_scene(void) const; r RGBColor max_to_one(const RGBColor& c) const; m RGBColor clamp_to_color(const RGBColor& c) const; c void display_pixel(const int row, const int column, const RGBColor& pixel_color) const; p ShadeRec S hit_bare_bones_objects(const Ray& ray); h private: p void delete_objects(void); d }; } // ------------------------------------------------------------------ add_object / inline void World::add_object(GeometricObject* object_ptr) { objects.push_back(object_ptr); o } #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

World - c public p ViewPlane vp RGBColor background_color...

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