end caps on extrudes working!
git-svn-id: svn://anubis/fart/trunk@279 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
da47ae6fd3
commit
53ebaeec3e
4 files changed
+42
-7
No files matched your search
+4
-4
@@ -83,7 +83,7 @@ Shape::IntersectionList Extrude::intersect(refptr<Shape> _this, const Ray & ray)
|
||||
Vector ipoint = ray_inv[solutions.results[0]];
|
||||
Polygon quad;
|
||||
quad.add(p1).add(p2).add(p3).add(p4);
|
||||
if (quad.containsPoint(ipoint))
|
||||
if (quad.containsPointConvex(ipoint))
|
||||
{
|
||||
res.add(Intersection(_this,
|
||||
m_transform.transform_point(ipoint),
|
||||
@@ -115,7 +115,7 @@ Shape::IntersectionList Extrude::intersect(refptr<Shape> _this, const Ray & ray)
|
||||
for (int p = 0; p < n_polygons; p++)
|
||||
{
|
||||
refptr<Polygon> polygon = m_polygons[p];
|
||||
if (polygon->containsPoint(ipoint))
|
||||
if (polygon->containsPoint2D(ipoint))
|
||||
{
|
||||
res.add(Intersection(_this,
|
||||
m_transform.transform_point(ipoint),
|
||||
@@ -126,7 +126,7 @@ Shape::IntersectionList Extrude::intersect(refptr<Shape> _this, const Ray & ray)
|
||||
}
|
||||
if (scale[0] > 0.0 && scale[1] > 0.0)
|
||||
{
|
||||
a = 0, b = 0, c = 1.0, d = distance;
|
||||
a = 0, b = 0, c = 1.0, d = -distance;
|
||||
if (ray_inv.getDirection() % Vector(a, b, c) < 0)
|
||||
{
|
||||
LinearSolver solver( a * ray_inv.getDirection()[0]
|
||||
@@ -148,7 +148,7 @@ Shape::IntersectionList Extrude::intersect(refptr<Shape> _this, const Ray & ray)
|
||||
tp[i] = new Vector(tp[i]->mult(scale) + shift);
|
||||
(*tp[i])[2] += distance;
|
||||
}
|
||||
if (tp.containsPoint(ipoint))
|
||||
if (tp.containsPoint2D(ipoint))
|
||||
{
|
||||
res.add(Intersection(_this,
|
||||
m_transform.transform_point(ipoint),
|
||||
|
||||
Reference in new issue
Block a user