Commit graph

13 commits

Author SHA1 Message Date
d0d667d6d2 Object::Intersect
A new intersect method that converts to object space before doing the intersection. Now all objects are at their own origin!
2014-08-09 09:59:00 -07:00
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
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
e5601e7f43 Define constructors for Object and Shape; move a bunch of Sphere code to object_sphere 2013-09-10 15:45:13 -07:00
2d66ba0945 Move Sphere::does_intersect to object_sphere; fill out object_sphere in C++ 2013-09-10 09:33:59 -07:00
a02e31952e Update object.cc for C++ 2013-09-10 09:18:05 -07:00
Renamed from src/object.c (Browse further)