i think i have union working, need to test after transparency is working
git-svn-id: svn://anubis/fart/trunk@157 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
27cea5e702
commit
5af3f0deca
@ -33,7 +33,7 @@ Shape::IntersectionList Union::intersect(refptr<Shape> _this, const Ray & ray)
|
||||
in1 = true;
|
||||
else
|
||||
in2 = true;
|
||||
if (!in_bool && in1 && in2)
|
||||
if (!in_bool && (in1 || in2))
|
||||
{
|
||||
/* we found an intersection point with the boolean object */
|
||||
in_bool = true;
|
||||
@ -42,16 +42,16 @@ Shape::IntersectionList Union::intersect(refptr<Shape> _this, const Ray & ray)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (in_bool && in1 && in2)
|
||||
{
|
||||
/* we found an intersection point with the boolean object */
|
||||
res.add( merged[i].intersection );
|
||||
}
|
||||
if (left)
|
||||
in1 = false;
|
||||
else
|
||||
in2 = false;
|
||||
in_bool = false;
|
||||
if (in_bool && !(in1 || in2))
|
||||
{
|
||||
/* we found an intersection point with the boolean object */
|
||||
res.add( merged[i].intersection );
|
||||
in_bool = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user