95 Commits

Author SHA1 Message Date
Josh Holtrop
8aaeb8d0fa merged in branch flat-parser
git-svn-id: svn://anubis/fart/trunk@356 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-07 16:55:43 +00:00
Josh Holtrop
208d0a99ac handling if elses
git-svn-id: svn://anubis/fart/trunk@355 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-07 16:37:16 +00:00
Josh Holtrop
e3087bb26c making parser flat
git-svn-id: svn://anubis/fart/branches/flat-parser@354 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-07 16:37:02 +00:00
Josh Holtrop
9712dab456 added "if" parser rule and IfNode class, "if_more" still in progress... changed ForNode::evaluate() and IfNode::evaluate() to use Node::evaluateChildren()
git-svn-id: svn://anubis/fart/trunk@352 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-07 15:23:15 +00:00
Josh Holtrop
fc33024b28 added MOD operator, converting operands to ints
git-svn-id: svn://anubis/fart/trunk@351 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-07 14:43:56 +00:00
Josh Holtrop
c4d8327665 formatting... for()s in for()s still causing problems
git-svn-id: svn://anubis/fart/trunk@350 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 21:32:39 +00:00
Josh Holtrop
ef769f7b4c fixed ForNode::evaluate() recursing properly
git-svn-id: svn://anubis/fart/trunk@349 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 21:18:05 +00:00
Josh Holtrop
4f6af31fc0 bool expressions were being evaluated backwards... whoops
git-svn-id: svn://anubis/fart/trunk@347 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 21:05:41 +00:00
Josh Holtrop
5dbe3c6d8f restored missing GREATER token (whoops), added column tracking to lexer
git-svn-id: svn://anubis/fart/trunk@346 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 20:54:36 +00:00
Josh Holtrop
c4fc36bb5c added <= and >= operators
git-svn-id: svn://anubis/fart/trunk@345 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 20:36:48 +00:00
Josh Holtrop
1dc370c99f fixed NumberNode and VectorNode "direct" bugs
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@341 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 19:27:54 +00:00
Josh Holtrop
4d488b9e55 moved Node::evaluateChildren() to nodes.cc, added EvaluatePropagateNode support
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@340 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 17:54:54 +00:00
Josh Holtrop
18886ef767 reworked ForNode evaluation()
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@339 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 17:42:37 +00:00
Josh Holtrop
f36c1fa60f added evaluate() method for all non-scripting nodes, made evaluateChildren() recursive
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@338 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 16:32:27 +00:00
Josh Holtrop
793c7afb2d removed DEC_NUMBER parsing token and IntegerNode node, replaced with NumberNode
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@337 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 15:48:33 +00:00
Josh Holtrop
04022756e5 added NodeRef typedef
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@336 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 15:41:47 +00:00
Josh Holtrop
b851c3be98 added Node::evaluate(parent)
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@335 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 15:38:25 +00:00
Josh Holtrop
01a713af98 added Scene::processForNode() to process for nodes
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@332 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-04 21:26:12 +00:00
Josh Holtrop
71e40b0277 added stmt_expression rule to parser, added to general_items
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@331 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-04 20:54:47 +00:00
Josh Holtrop
7014605fe3 added parser_scope global, added local assignments and local declarations to parser, reworked Scope class to use get(), putLocal(), and putGlobal() methods
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@329 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-04 19:54:43 +00:00
Josh Holtrop
cd2f565df3 introduced ScaleScalarNode() node type to avoid evaluating expression multiple times
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@327 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-01 15:01:51 +00:00
Josh Holtrop
741ca57e11 added assignment expressions, for loop nodes, boolean expressions, ForNode class, BoolExpressionNode class, AssignmentNode class
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@326 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-29 21:33:22 +00:00
Josh Holtrop
442a7bdeda added VARREF in lexer matching $[a-zA-Z_][a-zA-Z_0-9]*, added VarRefNode class
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@325 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-29 20:59:26 +00:00
Josh Holtrop
35d6e536ae removed optional negative sign preceding number literals in lexer since it was interfering with minus operator with no whitespace
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@324 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-29 20:55:02 +00:00
Josh Holtrop
26d8d1a081 fixed NumberNode storing the expression as a child node
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@323 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-29 20:33:11 +00:00
Josh Holtrop
f54446bd6a fixed Ngon using an expression for n_sides and implementing getInteger()
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@322 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-29 20:16:33 +00:00
Josh Holtrop
bd60471dfa fixed VectorNode storing expression nodes as children instead of class members; fixed JitterNode not implementing getInteger()
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@321 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-29 20:09:36 +00:00
Josh Holtrop
83fd083af8 removed annoying consts
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@320 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-29 19:58:21 +00:00
Josh Holtrop
1afa2b6510 fixed parser/nodes.h node classes not specifying "const" when overriding methods
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@319 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-29 19:47:38 +00:00
Josh Holtrop
2f825f29f9 moved computation of numbers and vectors from parser.yy to Scene-load.cc
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@318 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-29 19:30:14 +00:00
Josh Holtrop
20017370f0 added expression production to grammar, changed grammar refs from number to expression, added BinOpNode class, currently segfaulting :(
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@315 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-28 20:39:42 +00:00
Josh Holtrop
e5e4f991fb added optional block following shape references which can contain transforms or materials specific to the shape instance
git-svn-id: svn://anubis/fart/trunk@312 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-28 19:31:26 +00:00
Josh Holtrop
a4e85f8eff added comments to lexer
git-svn-id: svn://anubis/fart/branches/parser-comments@293 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-15 17:04:12 +00:00
Josh Holtrop
b4a2c8ef8e allowing transform blocks inside boolean shapes, but using a shape reference to a boolean shape does not propagate transform properly
git-svn-id: svn://anubis/fart/trunk@286 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-09 18:33:26 +00:00
Josh Holtrop
5308913bdb added shape definitions into parser, not using them yet
git-svn-id: svn://anubis/fart/trunk@283 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-09 16:35:16 +00:00
Josh Holtrop
4c5444f053 creating polygons for extrude objects, ngon takes radius parameter
git-svn-id: svn://anubis/fart/trunk@270 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-01 20:35:20 +00:00
Josh Holtrop
7d844667c3 added Extrude and Polygon classes, still in progress
git-svn-id: svn://anubis/fart/trunk@269 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-01 20:04:44 +00:00
Josh Holtrop
ad017df3b5 added extrude, offset, polygon, ngon to parser; changed items accepting SCALE vector to also accept SCALE number (ex: "scale 3.2" instead of "scale <3.2, 3.2, 3.2>")
git-svn-id: svn://anubis/fart/trunk@268 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-01 15:14:59 +00:00
Josh Holtrop
96f2b7d276 added ambient_occlusion global scene option to parser and vim keywords; added ambient_occlusion scene file
git-svn-id: svn://anubis/fart/trunk@263 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-06-29 19:37:53 +00:00
Josh Holtrop
c115dec69b added ambient parameter in global options{} for parser to set scene's global ambient color
git-svn-id: svn://anubis/fart/trunk@260 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-06-29 15:39:35 +00:00
Josh Holtrop
1af787b9ab added jitter and radius parameters to light objects; not using them yet
git-svn-id: svn://anubis/fart/trunk@255 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-06-25 16:37:17 +00:00
Josh Holtrop
ef003f6100 added exposure equations to avoid saturation; default exposure 1.0; added "exposure" keyword to global scene options in parser
git-svn-id: svn://anubis/fart/trunk@250 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-06-25 04:05:34 +00:00
Josh Holtrop
97392f2271 updated parser a little, still figuring out why the server process exits early
git-svn-id: svn://anubis/fart/trunk@231 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-04-07 12:42:45 +00:00
Josh Holtrop
5590c533ce Fixed boolean objects to determine if rays start inside or outside the boolean; changed constructors to accept a list of shapes instead of just two shapes; changed parser to accept any number of top-level shapes inside of a boolean shape block; changed scenes/die.fart to reflect this change (a drastic simplification)
git-svn-id: svn://anubis/fart/trunk@215 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-15 19:51:21 +00:00
Josh Holtrop
72a5023539 updated Makefiles to not print the "*.dep: No such file or directory" warnings
git-svn-id: svn://anubis/fart/trunk@204 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-10 01:54:23 +00:00
Josh Holtrop
9f9ce1a8f5 added maximum depth command-line argument (-d) and scene option (max_depth); prettified elapsed time output when greater than 60 seconds
git-svn-id: svn://anubis/fart/trunk@203 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-10 00:01:21 +00:00
Josh Holtrop
b50c4de1bc added parser, nodes, Scene-load support for transparency in materials
git-svn-id: svn://anubis/fart/trunk@186 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-05 20:04:13 +00:00
Josh Holtrop
bb5eb07c75 fixed bug in material definitions, added them to cyls.fart, they are working now!
git-svn-id: svn://anubis/fart/trunk@179 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 03:06:56 +00:00
Josh Holtrop
31e2604f98 Scene-load.cc handling material definitions
git-svn-id: svn://anubis/fart/trunk@178 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 02:56:33 +00:00
Josh Holtrop
fce4d82a73 added material definitions to parser
git-svn-id: svn://anubis/fart/trunk@177 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 02:30:43 +00:00