Commit graph

39 commits

Author SHA1 Message Date
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
6f844f7c2a Update ObjectParser for new code style... 2014-07-20 16:55:26 -07:00
c564791d1a Camera doesn't inherit from Object; defines its own origin. 2014-07-20 12:37:04 -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
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
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
41327c92fd Remove a bunch of debugging printfs and add verbosity levels 2014-07-19 16:04:47 -07:00
575ed822b4 Set shouldExpectKey after finishing radius; clean up asserts in ObjectParser 2014-07-19 15:46:06 -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
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
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
09b0065611 Use a stringstream instead of sscanf for ParseScalar 2014-07-19 10:59:22 -07:00
5517aadb0a Remove prints from SConscript 2014-07-18 21:27:17 -07:00
e7b9ee8257 Reformat some comments 2014-07-17 20:17:17 -07:00
c429be330d Reset SceneParser::mSection after parsing dimensions vector 2014-07-17 20:15:44 -07:00
87c544cec7 '%lf' for doubles, not '%ld' 2014-07-17 20:15:20 -07:00
6ff108f360 Implement ObjectParser 2014-07-17 20:14:52 -07:00
2834fa45c6 Replace dimensions code in SceneParser with a few lines of VectorParser magic
Neat!
2014-07-15 23:33:02 -07:00
bdd0afddf5 Define format strings for int and double ParseScalar() methods 2014-07-15 23:32:20 -07:00
b8d0b274b1 Implement templated VectorParser 2014-07-15 23:31:48 -07:00
d12f8c9fa6 Define ParseScalar<T> and ParseScalarTraits
For parsing single YAML scalar values into C++ datatypes (mostly ints and doubles).
2014-07-15 23:28:59 -07:00
557d9a047f Define the Notify() method on UtilityParser 2014-07-15 23:27:24 -07:00
d20e4154fe Big YAML parser cleanup 2014-07-15 17:27:27 -07:00