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
e2b5ffaf6c
Fixing up CameraParser
...
- Compiler errors
- Coulple name tweaks
- Headers
2014-07-19 20:59:48 -07:00
3ec5b20f16
Rename Scene::camera -> mCamera
2014-07-19 20:57:12 -07:00
6f04526d36
Default and copy constructors for Perspective and Orthographic cameras
2014-07-19 20:56:47 -07:00
672ff82e03
add cameraParser.cc to the build
2014-07-19 17:25:54 -07:00
b85abacd26
Move camera_parser -> cameraParser
2014-07-19 17:25:17 -07:00
b85a6aed7b
Bit more clean up of cameras
2014-07-19 17:24:52 -07:00
b03ad0ac2d
Add CameraParser
2014-07-19 17:24:28 -07:00
76a13e61de
Update call sites and instantiation for Vector3 and Color parsers
2014-07-19 17:19:54 -07:00
2c4f6a4d29
Some more helpful utility parsers
...
- Rename VectorParser -> ScalarSequenceParser
- Add Vector3Parser and ColorParser, subclasses of the above, which handle
Vector3s and Colors
2014-07-19 17:17:33 -07:00
daf5c7d8a6
Clean up camera module
2014-07-19 16:30:26 -07:00
41327c92fd
Remove a bunch of debugging printfs and add verbosity levels
2014-07-19 16:04:47 -07:00
17df0d4adf
Add "Three Spheres" scene
2014-07-19 15:53:47 -07:00
1eff46006a
Comment out adding objects from main() – they come from YAML now!! :D
2014-07-19 15:46:38 -07:00
575ed822b4
Set shouldExpectKey after finishing radius; clean up asserts in ObjectParser
2014-07-19 15:46:06 -07:00
0ed3b524f4
Print all events; properly handle document and mapping-start events from top-level run loop
2014-07-19 15:45:04 -07:00
523eaef902
ScalarMappingParser::mShouldExpectKey should be true to start/end the top-level mapping
2014-07-19 15:44:29 -07:00
49e3395a4c
Add objects parsing to SceneParser
2014-07-19 15:43:44 -07:00
43a1e790cb
Initialize Parser::mDone
2014-07-19 15:42:53 -07:00
0b9b5a784d
Add radius section for ObjectParser
2014-07-19 15:42:31 -07:00
5f02407b06
Initialize a new Sphere in ObjectParser and add it to the scene
2014-07-19 15:41:45 -07:00
0a14661da8
Set material to NULL in Shape
2014-07-19 15:41:17 -07:00
573f53b67c
ObjectParser using ScalarMappingParser
2014-07-19 14:45:37 -07:00
2f91e12296
Catch end-of-mapping event in ScalarMappingParser
2014-07-19 14:22:30 -07:00
68d0083ba8
Object::get_material returns a pointer instead of a reference
2014-07-19 14:09:47 -07:00
b62949416b
Rename object_parser.{cc,hh} -> objectParser.{cc,hh}
2014-07-19 13:42:36 -07:00
03c037730e
Move scene_parser.{cc,hh} to sceneParser.{cc,hh}
2014-07-19 11:43:09 -07:00
98fe95e1a5
Declare valueString before passing to ParseScalar
...
This is to account for the length of the scalar string value, which is passed as
an element of event.data.scalar.
2014-07-19 11:40:02 -07:00
693e4fa80d
Make SceneParser a subclass of ScalarMappingParser
2014-07-19 11:39:22 -07:00
325e9459fd
Create scalar value string before passing to ParseScalar in ObjectParser
2014-07-19 11:34:19 -07:00
625e3a6f47
Add ScalarMappingParser
2014-07-19 11:28:03 -07:00
7153ec759b
Sublime project and workspace settings
2014-07-19 11:27:32 -07:00
09b0065611
Use a stringstream instead of sscanf for ParseScalar
2014-07-19 10:59:22 -07:00
d65fc16219
Ignore unused parameters in PNG error functions
2014-07-19 10:15:00 -07:00
6214413e3e
NDEBUG *removes* asserts -- whoops
2014-07-19 10:11:51 -07:00
5517aadb0a
Remove prints from SConscript
2014-07-18 21:27:17 -07:00
56b79c9cfb
Parse test sconscripts before src -- i should probably push this commit up to base
2014-07-17 20:18:20 -07:00