53 Commits

Author SHA1 Message Date
Josh Holtrop
d84fc2a96f actually saving off the parsed shapes helps a lot
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@342 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-06 20:17:40 +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
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
74f27c2076 removed processNode() and processChildren()
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@334 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-04 21:47:07 +00:00
Josh Holtrop
e23b762a01 evaluating stmt_expression's in processGeneralItems()
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@333 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-04 21:27:47 +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
91ea5a20e0 added ShapeRef typedef, added Scene::processGeneralItems()
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@330 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-04 20:47:39 +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
e2569c0a54 added util/Scope.h
git-svn-id: svn://anubis/fart/branches/scene-file-scripting@328 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-01 15:49:40 +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
b0dfa2ee1f bool sub-objects using relative coordinates, shape definitions using relative coordinates, this allows transform blocks in each, and shape references to combine absolute transform with the relative transform
git-svn-id: svn://anubis/fart/trunk@287 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-09 19:37:05 +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
c1f39da3e2 added shape definition processing and shape cloning capabilities
git-svn-id: svn://anubis/fart/trunk@284 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-09 17:11:14 +00:00
Josh Holtrop
7bac2fb076 added Polygon::add(), Polygon::containsPoint(); initial attempt at rendering Extrude objects
git-svn-id: svn://anubis/fart/trunk@272 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-02 16:14:46 +00:00
Josh Holtrop
b51d11d043 catch a few error conditions for extrudes and polygons
git-svn-id: svn://anubis/fart/trunk@271 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-01 21:24:39 +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
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
eb14077ab7 added jitter parameter to lights, currently uses random vectors, which i'm not happy with; added Vector::getPerpendicularVector() which will be used to replace random jitter for lights
git-svn-id: svn://anubis/fart/trunk@256 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-06-25 18:12:00 +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
7d9eb65fde working on die scene, fixed bug in Scene-load for loading colors applied to lights
git-svn-id: svn://anubis/fart/trunk@216 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-15 21:11:01 +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
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
88444e25b8 added scenes/csg.fart, fixed bug in loading boolean objects in Scene-load.cc
git-svn-id: svn://anubis/fart/trunk@196 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-09 00:09:33 +00:00
Josh Holtrop
db72b5ba82 scanning scene files for camera definitions before shapes and lights
git-svn-id: svn://anubis/fart/trunk@194 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-08 22:31:15 +00:00
Josh Holtrop
608939bff4 Scene-load setting light position based on the current transform
git-svn-id: svn://anubis/fart/trunk@188 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-06 23:32:00 +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
73cc495a79 removed debug print
git-svn-id: svn://anubis/fart/trunk@180 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 03:08:11 +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
56a5fa6166 added cyls.fart sample scene, removed hard-coded scene from Scene-load.cc; reading from a file is working!
git-svn-id: svn://anubis/fart/trunk@176 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-02 00:41:27 +00:00
Josh Holtrop
84f6b04cd7 removed static const Material::white (had a problem with C++ since the order that the static const constructors were being called in was not correct according to the order that the code depended on them), made Shape constructor use a common default material instead of recreating one every time
git-svn-id: svn://anubis/fart/trunk@174 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-02 00:17:56 +00:00
Josh Holtrop
6a649ecac7 fixed Lighting to ignore dot products less than 0 for diffuse coefficients; this broke shapes/Subtract again. fixed Material::white to be assigned to by Material() as evidently it was not calling the constructor properly otherwise. added initializer in Material::Material() to set ambient color to white. Scene constructing PointLight instead of a raw Light when loading from a file
git-svn-id: svn://anubis/fart/trunk@173 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-01 23:50:53 +00:00
Josh Holtrop
adf7997417 added .todo file, commented out hard-coded sample scene
git-svn-id: svn://anubis/fart/trunk@172 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-01 22:52:51 +00:00
Josh Holtrop
65c447f85a filled out Scene::processLight(), added color keyword to light specification
git-svn-id: svn://anubis/fart/trunk@171 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-01 22:41:23 +00:00
Josh Holtrop
0ea6e96e0a filled out Scene::processTransformBlock()
git-svn-id: svn://anubis/fart/trunk@170 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-01 22:31:42 +00:00
Josh Holtrop
84249c8231 filled in Scene::processOptions()
git-svn-id: svn://anubis/fart/trunk@169 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 23:22:36 +00:00
Josh Holtrop
bb07e12193 added Scene::process{Camera,Options,TransformBlock}()
git-svn-id: svn://anubis/fart/trunk@168 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 22:59:11 +00:00
Josh Holtrop
32fcafc687 filled out Scene::processBool() to handle all boolean shapes; added Node::isShape() virtual function to determine whether a node object represents a shape node
git-svn-id: svn://anubis/fart/trunk@167 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 21:22:30 +00:00
Josh Holtrop
5a83786103 filled out Scene::processPlane()
git-svn-id: svn://anubis/fart/trunk@166 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 20:39:29 +00:00
Josh Holtrop
e40677ba77 added "cyl" token to parser and parser rules for cyl object
git-svn-id: svn://anubis/fart/trunk@165 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 20:32:23 +00:00
Josh Holtrop
0462a2e7bc working on Scene::process*() functions to load the scene from a file
git-svn-id: svn://anubis/fart/trunk@164 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 19:59:22 +00:00
Josh Holtrop
44ba550f68 moved sample scene a bit, reset plane color to white, showing a Subtract object in the sample scene
git-svn-id: svn://anubis/fart/trunk@162 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 17:10:20 +00:00
Josh Holtrop
9ef826df43 fixed bug in shapes/Plane which would return negative results, fixed bug in main/Scene which would not check for shape to be non-null after calling getRayClosestHit()
git-svn-id: svn://anubis/fart/trunk@161 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 17:07:30 +00:00
Josh Holtrop
5035c80d94 Subtract working, but reflected normals being returned... and where did my plane and cyl go?
git-svn-id: svn://anubis/fart/trunk@159 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-28 00:06:12 +00:00
Josh Holtrop
16f38f1f27 added sample Intersect object to sample scene, added Color::magenta constant
git-svn-id: svn://anubis/fart/trunk@155 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-24 03:35:20 +00:00
Josh Holtrop
e23d5cdca4 added shapes/Intersect, need to rework IntersectList
git-svn-id: svn://anubis/fart/trunk@142 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-23 05:51:51 +00:00
Josh Holtrop
29b60f346e added process*() functions in Scene-load.cc for various shape types
git-svn-id: svn://anubis/fart/trunk@141 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-21 14:36:18 +00:00