fixed compile issues with switch to new Shape::IntersectionList
git-svn-id: svn://anubis/fart/branches/2009-02-23_Shape_IntersectList_Update@145 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
0c7f85db96
commit
ab2832a660
2 files changed
+6
-6
No files matched your search
+4
-4
@@ -171,17 +171,17 @@ vector<Scene::ShapeDistance> Scene::getRayHits(const Ray & ray)
|
||||
it != m_shapes.end();
|
||||
it++)
|
||||
{
|
||||
Shape::IntersectionList intersections = (*it)->intersect(ray);
|
||||
Shape::IntersectionList intersections = (*it)->intersect(*it, ray);
|
||||
|
||||
for (int i = 0, num_results = intersections.size();
|
||||
i < num_results;
|
||||
i++)
|
||||
{
|
||||
refptr<Shape> shape = intersections[i].first;
|
||||
refptr<Vector> isect_point = intersections[i].second;
|
||||
Vector normal = shape->getNormalAt(*isect_point);
|
||||
const Vector & isect_point = intersections[i].second;
|
||||
Vector normal = shape->getNormalAt(isect_point);
|
||||
double dot = normal % ray.getDirection();
|
||||
double intersect_dist = ((*isect_point) - ray.getOrigin()).mag();
|
||||
double intersect_dist = (isect_point - ray.getOrigin()).mag();
|
||||
if (dot < 0.0) /* cull back faces */
|
||||
{
|
||||
double transparency = (*it)->getTransparency();
|
||||
|
||||
Reference in new issue
Block a user