94 Commits

Author SHA1 Message Date
Josh Holtrop
396400c18c fix strange unfinished coding bug 2011-02-08 17:13:16 -05:00
Josh Holtrop
b4717b7cbc added Scene::loadTexture(), filename->image map
git-svn-id: svn://anubis/fart/trunk@384 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-13 21:48:23 +00:00
Josh Holtrop
b24aea4dba minor Vector::refract() sign changes
git-svn-id: svn://anubis/fart/trunk@377 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-12 15:50:00 +00:00
Josh Holtrop
22f4a79671 added refraction computations to Scene::traceRay()
git-svn-id: svn://anubis/fart/trunk@376 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-11 16:14:13 +00:00
Josh Holtrop
931cde802e moved Material constructor into Material.h, removed Material.cc
git-svn-id: svn://anubis/fart/trunk@375 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-11 15:56:39 +00:00
Josh Holtrop
e39dbf9279 added refraction parameters to materials
git-svn-id: svn://anubis/fart/trunk@374 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-11 15:38:10 +00:00
Josh Holtrop
ed58d2ec7a added Vector::refract()
git-svn-id: svn://anubis/fart/trunk@372 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-11 15:26:41 +00:00
Josh Holtrop
1eee61002e reworked Vector::reflect() to reflect an INCOMING ray
git-svn-id: svn://anubis/fart/trunk@371 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-11 15:21:50 +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
ad6ef8f315 moved some Matrix and Transform functionality into header files
git-svn-id: svn://anubis/fart/trunk@310 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-28 18:18:42 +00:00
Josh Holtrop
9fd9c5774e removed a few emtpy Vector x; statements
git-svn-id: svn://anubis/fart/trunk@309 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-28 17:53:31 +00:00
Josh Holtrop
835a0c968f moved a bunch of functionality from Ray.cc and Color.cc into Ray.h and Color.h
git-svn-id: svn://anubis/fart/trunk@308 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-28 17:16:39 +00:00
Josh Holtrop
3f0d6cd83e moved most Vector functionality into the header so it could be inlined
git-svn-id: svn://anubis/fart/trunk@307 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-28 16:55:39 +00:00
Josh Holtrop
9e4191fb61 added AABB class, calculating AABB in Extrude objects, added Extrude intersect() optimization to throw out rays not hitting the AABB
git-svn-id: svn://anubis/fart/trunk@306 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-28 16:37:27 +00:00
Josh Holtrop
437fa8b07a added Box intersect() optimization... ~2% faster
git-svn-id: svn://anubis/fart/trunk@305 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-09-28 15:52:52 +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
17d69c54ce Polygon objects now prune adjacent points that are the same -- no more fuzzies in extrudes with offsets of 0
git-svn-id: svn://anubis/fart/trunk@281 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-09 14:29:17 +00:00
Josh Holtrop
d2b37a1687 updated extrudes scene, fixed Extrude objects to return backfaces so that boolean objects work properly
git-svn-id: svn://anubis/fart/trunk@280 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-08 19:01:00 +00:00
Josh Holtrop
53ebaeec3e end caps on extrudes working!
git-svn-id: svn://anubis/fart/trunk@279 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-08 18:33:39 +00:00
Josh Holtrop
d0fe38566c added mult() and div() to Vector
git-svn-id: svn://anubis/fart/trunk@277 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-08 16:55:30 +00:00
Josh Holtrop
9546c8dde4 updated some Vector operations and made them member functions
git-svn-id: svn://anubis/fart/trunk@276 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-08 16:39:34 +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
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
77e99ac5a5 added initial ambient occlusion attempt... but don't like it
git-svn-id: svn://anubis/fart/trunk@261 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-06-29 17:44:36 +00:00
Josh Holtrop
57a4e6ed8a trying new jitter method for soft shadows, getting better
git-svn-id: svn://anubis/fart/trunk@257 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-07-13 06:35:45 +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
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
bc27be0f85 added Ray::randomRay() to generated a ray with origin at (0,0,0) and a random direction
git-svn-id: svn://anubis/fart/trunk@254 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-06-25 16:16:08 +00:00
Josh Holtrop
8fb2492e0a added double cast operator to Vector to return its length
git-svn-id: svn://anubis/fart/trunk@249 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-06-18 01:53:54 +00:00
Josh Holtrop
86888fa461 changed Scene::calculateLightContribution() to return a Color instead of a double and take into account the color of any semi-transparent objects that are passed through en route to the light source... this leads to shadow colors tainted by the color of the objects through which the light is travelling
git-svn-id: svn://anubis/fart/trunk@211 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-12 02:30:28 +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
f9cf1381a6 working on shadows but they are appearing in weird places...
git-svn-id: svn://anubis/fart/trunk@185 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-04 02:03:21 +00:00
Josh Holtrop
e233056880 added Color::operator*=(), added jitter computation to reflectance and transparency recursion, recursing now but there is still a jitter or recursion issue
git-svn-id: svn://anubis/fart/trunk@182 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-03 04:30:46 +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
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
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
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
527dc6f1dc added virtual ~Solver() in util/Solver to avoid compiler warnings
git-svn-id: svn://anubis/fart/trunk@153 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-24 03:05:43 +00:00
Josh Holtrop
25d6432dbd trying to get a custom comparator to sort my IntersectionList after a merge()
git-svn-id: svn://anubis/fart/trunk@149 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-23 22:26:46 +00:00
Josh Holtrop
cda03ad45a moved main/Material to util/Material
git-svn-id: svn://anubis/fart/trunk@136 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-19 18:45:52 +00:00
Josh Holtrop
52103bf543 added static const cyan color, added cone to sample scene
git-svn-id: svn://anubis/fart/trunk@134 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-19 18:30:02 +00:00
Josh Holtrop
4b0f506522 added Color::yellow, finished shapes/Box, added a couple boxes to sample scene
git-svn-id: svn://anubis/fart/trunk@121 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-17 05:36:48 +00:00
Josh Holtrop
c136bda827 added the_Color to Node, material gathering AMBIENT, DIFFUSE, SPECULAR color values
git-svn-id: svn://anubis/fart/trunk@103 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-12 03:07:22 +00:00
Josh Holtrop
8b9b6332cc changed getPtr() to isNull() in util/refptr, filled in parser logic a lot more
git-svn-id: svn://anubis/fart/trunk@99 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-11 04:27:44 +00:00
Josh Holtrop
236cbc7db0 added getPtr() to util/refptr
git-svn-id: svn://anubis/fart/trunk@98 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-10 01:21:54 +00:00
Josh Holtrop
0fc1e468fe removed test directory, converted Shape's material handle to a refptr<Material> instead of a Material *, made refptr<T>::operator*() and operator->() const members
git-svn-id: svn://anubis/fart/trunk@96 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-10 01:09:07 +00:00
Josh Holtrop
0181e82653 added dereference and indirection operators to util/refptr, converted parser to use refptr<Node> as YYSTYPE
git-svn-id: svn://anubis/fart/trunk@94 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-10 00:37:49 +00:00
Josh Holtrop
c6e1a2c7e4 added refptr<T>::operator=(const T * ptr) method, including refptr in parser
git-svn-id: svn://anubis/fart/trunk@93 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-02-10 00:18:07 +00:00