Commit graph

14 commits

Author SHA1 Message Date
392871a1ee Updates for Box 2014-08-09 10:54:00 -07:00
2c2bf09140 Compiler errors in Box::DoIntersect, hidden until now... 2014-08-09 10:11:44 -07:00
3846a1aa3a Move Box intersection code to DoIntersect 2014-08-09 10:08:21 -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
ecc6c1efcd TODO about raising an error for non-intersecting normals 2014-08-03 16:37:03 -07:00
92e67215b9 Get rid of commented out Box intersection code 2014-08-03 16:36:12 -07:00
2ade996783 p.z comparison was comparing against mFar.y 2014-08-03 12:45:34 -07:00
d79c95be71 Playing with the implementation of slab intersection
This stuff is commented out anyway because it all moved to IntersectSlab...
2014-08-03 12:23:59 -07:00
8831dec40c Use NearlyEqual in Box::compute_normal 2014-08-03 12:23:05 -07:00
8d5dfe5154 Move slab intersection to Box::IntersectSlab
Makes it easier to debug because I don't have to change things in three places.

This change also includes the fix! The swap was the problem. I didn't have the optimization right. I'll have to go back and figure it out.
2014-08-03 12:20:48 -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
63bb28a94a Push tNear and tFar onto t&, rather than t0 and t1 2014-07-23 07:39:55 -07:00
b878db592c Getters and setters for Near and Far vectors 2014-07-22 21:37:49 -07:00
15db0c42d4 Box objects, parallel to the coordinate axes
This change implements Kay-Kajiya intersection (with slabs) too!
2014-07-22 20:46:47 -07:00