Commit graph

321 commits

Author SHA1 Message Date
fb0a5212d8 Move vectorParser -> scalarSequenceParser 2014-07-29 20:40:24 -07:00
ab0ff81fab Remove a useless doc comment from ScalarSequenceParser 2014-07-29 08:14:55 -07:00
7d991cea86 Move ScalarSequenceParser::HandleSequenceEnd to .cc 2014-07-28 17:38:45 -07:00
a393a8fb5a Fixed up ScalarSequenceParser
Also, Vector3Parser and ColorParser. Go me!
2014-07-28 17:21:49 -07:00
1f51ba2dd7 Default implementations of Handle* methods 2014-07-28 16:07:15 -07:00
b9199ff3fe Remove out-lined getters/settings; implement HandleStreamStart 2014-07-28 15:31:29 -07:00
5aff8a2df2 All the event handling routines return bools 2014-07-28 15:31:05 -07:00
db6fe5af8b Pass version and tag directives to HandleDocumentStart 2014-07-28 15:01:59 -07:00
dfe4d6f721 Define a TagDirective 2014-07-25 21:36:13 -07:00
0d9ac3474a Merge branch 'develop' into feature/yaml-parser-refactoring 2014-07-25 21:12:45 -07:00
6b95941e53 Implement Parser::HandleEvent
Dispatch an event to the appropriate handler, breaking up the event's data into
function arguments.
2014-07-25 21:11:02 -07:00
958b4d0c46 Add Encoding and fix up a couple compiler errors 2014-07-25 21:10:41 -07:00
d2b2382c95 Include <memory> in object.h 2014-07-25 15:10:29 -07:00
bad80c9895 Scons default build target: charles 2014-07-25 13:31:09 -07:00
f999dcd0e7 Functional cast of stream to bool in ParseScalar 2014-07-25 08:56:01 -07:00
000b8879e2 Lots of documentation for handler event methods 2014-07-25 08:55:47 -07:00
c3a19f7d2e Fix duplicate SequenceStyle enum (use MappingStyle) 2014-07-25 08:55:31 -07:00
74757c618c Include <memory> for Parser::Ptr 2014-07-25 08:55:11 -07:00
d464cc328e Type clean up: ParserStack -> Stack 2014-07-24 08:28:05 -07:00
2fb555e253 Fully define methods to handle parser events
HandleFoo() takes parameters for all the data provided in the event struct. Getting data into my YAML parser thus has no dependency on the format of data in libyaml.

Maybe this is a good thing?
2014-07-24 08:24:10 -07:00
6a9c1e87e2 Ignore *.log files 2014-07-24 08:05:03 -07:00
900c667994 Couple more scenes to test coordinate grids 2014-07-24 08:03:13 -07:00
63bb28a94a Push tNear and tFar onto t&, rather than t0 and t1 2014-07-23 07:39:55 -07:00
2b9d3a3824 Add a new scene with a single unit-box at the origin 2014-07-22 21:40:39 -07:00
f5f47f5a9a Print number of objects in the scene before rendering 2014-07-22 21:40:25 -07:00
deff3079b8 Update ObjectParser for boxes
ObjectParser's constructor takes the tag value, which determines the type of object constructed.

ObjectParser adds "near" and "far" sections for boxes.
2014-07-22 21:40:13 -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
d69d708b31 Convert Vector3 to use Doubles 2014-07-22 20:46:10 -07:00
1d22e27d81 Specify object types in threeSpheres.yml
These don't actually do anything yet, but I'd like to get this going once I start
adding more object types.
2014-07-20 16:55:52 -07:00
6f844f7c2a Update ObjectParser for new code style... 2014-07-20 16:55:26 -07:00
5a8d634590 Update Scene a bit for new code style and namespaces in Object and Sphere 2014-07-20 16:54:10 -07:00
cf7806484f Some generic, useful types
- Double -> double
- DoubleVector -> std::vector<Double>
- TVector -> DoubleVector
2014-07-20 16:53:39 -07:00
e5cb9be1aa Don't include or build object_plane.{cc,h} because it hasn't been updated and it doesn't work. 2014-07-20 16:53:03 -07:00
c185a24f34 Define shared_ptr<Sphere> as Sphere::Ptr 2014-07-20 16:51:58 -07:00
12f180a3de Light implements its own origin 2014-07-20 16:51:20 -07:00
19aeb7b14e Update Sphere to inherit from Object
- Had to do a couple updates here to adapt to the new code style...
- Update DoesIntersect for code style and to pass back t values in the vector
instead of the float array.
2014-07-20 16:49:55 -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
ac8421b5e1 Update code style for Material objects 2014-07-20 16:45:40 -07:00
0d2011931c Account all types of rays -- print them at the end 2014-07-20 14:21:12 -07:00
c65c6a3cfd Use shared_ptr for Scene::mCamera
Makes memory management a bit easier...
2014-07-20 12:37:31 -07:00
c564791d1a Camera doesn't inherit from Object; defines its own origin. 2014-07-20 12:37:04 -07:00
709453adcb Fix a comment about Camera::mUp 2014-07-20 12:19:59 -07:00
06c2986280 Don't duplicate build files
Turns out keeping files in place, instead of symlinking or hard linking into
build/ means that Xcode can actually break on files in src/. This is cool!

There's still a problem with Xcode not getting appropriate type information
though.
2014-07-20 12:17:55 -07:00
6ed121a039 Some notes 2014-07-20 08:36:46 -07:00
ea43af46ba charles.hh – defines extern'd verbosity 2014-07-19 21:20:50 -07:00
54ab0d6641 Fix aspect ratio of the three-spheres scene 2014-07-19 21:19:32 -07:00
54796a74b7 Notify end-of-section after camera stuff 2014-07-19 21:12:45 -07:00
4d5796e6e7 Parse the camera section of a scene 2014-07-19 21:00:34 -07:00
eaabdfddc0 OHGOD TABS WERE HERE INSTEAD OF SPACES 2014-07-19 21:00:15 -07:00