Commit graph

19 commits

Author SHA1 Message Date
584d0326a9 Get rid of object's origin 2014-08-09 08:59:11 -07:00
ab9ac5e963 Clean up constructors for Object and Sphere
Use default arguments instead of multiple constructors. I forgot about those! Use Vector4s all around.
2014-08-09 08:57:41 -07:00
4828cb313f Add Write methods to scene objects
Write methods are polymorphic, overridden by subclasses. There is a single operator<< for Objects that calls the right Write() method for the object. Neat.
2014-08-03 17:25:00 -07:00
79c951030d Move Stats to its own module
Move Stats to its own module and pass it around to the intersection methods to keep track of how many tests and successful intersections there are.
2014-08-02 15:21:14 -07:00
d2b2382c95 Include <memory> in object.h 2014-07-25 15:10:29 -07:00
2036521f42 Update code style for Object
- Remove Shape, because it seems to be mostly extra. All renderable objects now
derive from Object, rather than Shape
- Light (which inherited from Object before) now defines its own origin, but
this is coming in a later commit...
- Use charles namespace

- Use a std::vector<double> instead of float** to pass back intersection points.
This is kind of a biggie because it made the render process 50% slower :( I'll
have to work out why and maybe fix it...
2014-07-20 16:48:09 -07:00
0a14661da8 Set material to NULL in Shape 2014-07-19 15:41:17 -07:00
68d0083ba8 Object::get_material returns a pointer instead of a reference 2014-07-19 14:09:47 -07:00
c405302613 Add operator<< overload for Object 2013-09-22 10:16:15 -07:00
e55828890b Add virtual destructor for Shape class 2013-09-13 14:14:45 -07:00
2c23fb819e Add Materials to the shapes in the scene 2013-09-11 09:05:27 -07:00
86a9c74c1e Activate point_is_on_surface() and calculate_normal() 2013-09-10 22:32:46 -07:00
72c0d1475e Yay! 2013-09-10 21:04:56 -07:00
e5601e7f43 Define constructors for Object and Shape; move a bunch of Sphere code to object_sphere 2013-09-10 15:45:13 -07:00
a02e31952e Update object.cc for C++ 2013-09-10 09:18:05 -07:00
ca13877c19 Add texture to objects 2013-09-07 22:22:27 -07:00
974ebd6ccd Add sphere intersection function 2013-09-07 18:26:32 -07:00
da3aa51f1b Code for objects and spheres 2013-09-07 16:48:50 -07:00
8d51a521bb Add object module 2013-09-07 16:09:19 -07:00